From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Laight Subject: RE: [PATCH v2] net: dsa: Remove VLA usage Date: Mon, 30 Jul 2018 08:59:01 +0000 Message-ID: <6e5b57f59ca6420489d65392a1e8dbc8@AcuMS.aculab.com> References: <20180717041034.GA37382@beast> <20180729113806.GC7333@amd> <20180729114006.GA11104@amd> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Cc: "David S. Miller" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Salvatore Mesoraca , Florian Fainelli , Andrew Lunn To: 'Pavel Machek' , Kees Cook Return-path: In-Reply-To: <20180729114006.GA11104@amd> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org 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)