netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laszlo Toth <laszlth@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: laszlth@gmail.com, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH] net: remove VLA usage
Date: Fri, 9 Mar 2018 23:24:19 +0100	[thread overview]
Message-ID: <20180309222419.GA2781@laszlth> (raw)
In-Reply-To: <20180307.202614.2171616742901831874.davem@davemloft.net>

On Wed, Mar 07, 2018 at 08:26:14PM -0500, David Miller wrote:
> From: Laszlo Toth <laszlth@gmail.com>
> 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 <laszlth@gmail.com>
> 
> 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

      reply	other threads:[~2018-03-09 22:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-08  0:19 [PATCH] net: remove VLA usage Laszlo Toth
2018-03-08  1:26 ` David Miller
2018-03-09 22:24   ` Laszlo Toth [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180309222419.GA2781@laszlth \
    --to=laszlth@gmail.com \
    --cc=davem@davemloft.net \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=netdev@vger.kernel.org \
    --cc=yoshfuji@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).