Messages in this thread | | | From | David Laight <> | Subject | RE: [PATCH v2] net: dsa: Remove VLA usage | Date | Mon, 30 Jul 2018 08:59:01 +0000 |
| |
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)
| |