From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Alastair D'Silva" Date: Mon, 15 Apr 2019 10:59:36 +0000 Subject: RE: [PATCH 1/4] lib/hexdump.c: Allow 64 bytes per line Message-Id: <0dc901d4f37a$52733a70$f759af50$@d-silva.org> List-Id: 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> <6912ef2d83d34c9299d5a5ad120c276f@AcuMS.aculab.com> In-Reply-To: <6912ef2d83d34c9299d5a5ad120c276f@AcuMS.aculab.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: 'David Laight' , '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' > 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. Good point, the base requirement is that it should be a multiple of groupsize. -- Alastair D'Silva mob: 0423 762 819 skype: alastair_dsilva msn: alastair@d-silva.org blog: http://alastair.d-silva.org Twitter: @EvilDeece