From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Laight Subject: RE: [PATCH 1/4] lib/hexdump.c: Allow 64 bytes per line Date: Mon, 15 Apr 2019 10:56:39 +0000 Message-ID: <6912ef2d83d34c9299d5a5ad120c276f@AcuMS.aculab.com> References: <20190410031720.11067-1-alastair@au1.ibm.com> <20190410031720.11067-2-alastair@au1.ibm.com> <20190412134802.kprel2c2iqijd4ai@pathway.suse.cz> <092f01d4f186$8e9e7cd0$abdb7670$@d-silva.org> <20190415090232.3ualhrt5ssrb2ixq@pathway.suse.cz> <0dad01d4f376$113df2b0$33b9d810$@d-silva.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Return-path: In-Reply-To: <0dad01d4f376$113df2b0$33b9d810$@d-silva.org> Content-Language: en-US Sender: linux-wireless-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: 'Alastair D'Silva' , 'Petr Mladek' Cc: 'Jani Nikula' , 'Joonas Lahtinen' , 'Rodrigo Vivi' , 'David Airlie' , 'Daniel Vetter' , 'Karsten Keil' , 'Jassi Brar' , 'Tom Lendacky' , "'David S. Miller'" , 'Jose Abreu' , 'Kalle Valo' , 'Stanislaw Gruszka' , 'Benson Leung' , 'Enric Balletbo i Serra' , "'James E.J. Bottomley'" , "'Martin K. Petersen'" , 'Greg Kroah-Hartman' 'Alexander Viro' List-Id: intel-gfx@lists.freedesktop.org From: Alastair D'Silva > Sent: 15 April 2019 11:29 ... > I do, and I believe the choice of the output length should be in the hands > of the caller. > > On further thought, it would make more sense to remove the hardcoded list of > sizes and just enforce a power of 2. The function shouldn't dictate what the > caller can and can't do beyond the technical limits of it's implementation. Why powers of two? You may want the length to match sizeof (struct foo). You might even want the address increment to be larger that the number of lines dumped. David