From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f194.google.com ([209.85.128.194]:35450 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932986AbeCIWYY (ORCPT ); Fri, 9 Mar 2018 17:24:24 -0500 Received: by mail-wr0-f194.google.com with SMTP id a27so2715336wra.2 for ; Fri, 09 Mar 2018 14:24:23 -0800 (PST) Date: Fri, 9 Mar 2018 23:24:19 +0100 From: Laszlo Toth To: David Miller Cc: laszlth@gmail.com, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, netdev@vger.kernel.org Subject: Re: [PATCH] net: remove VLA usage Message-ID: <20180309222419.GA2781@laszlth> References: <20180308001953.GA2190@laszlth> <20180307.202614.2171616742901831874.davem@davemloft.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180307.202614.2171616742901831874.davem@davemloft.net> Sender: netdev-owner@vger.kernel.org List-ID: On Wed, Mar 07, 2018 at 08:26:14PM -0500, David Miller wrote: > From: Laszlo Toth > Date: Thu, 8 Mar 2018 01:19:53 +0100 > > > Separated snmp_seq_show_tcp_udp() to tcp and udp variants, > > so the usage of max_t() for the array size can be emitted. > > > > Signed-off-by: Laszlo Toth > > But it's a max on a constant value, computed at compile > time. > > I don't see at all why this is necessary. > > If the compiler can't figure this out, fix it. > > If the compiler warns on this with -Wvla, fix it. > > Because there is no reason to have two separate routines for this. > > Thank you. Yea, since then they'll fix max* defines, so this is unnecessary. Let's just ignore it. Laszlo