netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Pavel Machek' <pavel@ucw.cz>, Kees Cook <keescook@chromium.org>
Cc: "David S. Miller" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Salvatore Mesoraca <s.mesoraca16@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>
Subject: RE: [PATCH v2] net: dsa: Remove VLA usage
Date: Mon, 30 Jul 2018 08:59:01 +0000	[thread overview]
Message-ID: <6e5b57f59ca6420489d65392a1e8dbc8@AcuMS.aculab.com> (raw)
In-Reply-To: <20180729114006.GA11104@amd>

From: Pavel Machek
> Sent: 29 July 2018 12:40
...
> > > +	unsigned long		*bitmap;
> > > +	unsigned long		_bitmap;
> >
> > This looks rather confusing. _bitmap -> bitmap_data? bitmap_bits?
> 
> Actually, AFAICT that long is not used as a long, but as array of
> bits. So maybe char bitmap_data[8] would be more appropriate?

Unfortunately the 'bitmap' functions are defined to work in a 
specific way on unsigned long[].
This means, for example, that they can't use the x86 'bit' instructions.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

      reply	other threads:[~2018-07-30  8:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-17  4:10 [PATCH v2] net: dsa: Remove VLA usage Kees Cook
2018-07-18 20:33 ` David Miller
2018-07-18 20:37   ` Andrew Lunn
2018-07-18 22:08     ` David Miller
2018-07-29 11:38 ` Pavel Machek
2018-07-29 11:40   ` Pavel Machek
2018-07-30  8:59     ` David Laight [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=6e5b57f59ca6420489d65392a1e8dbc8@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=s.mesoraca16@gmail.com \
    /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).