Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2046033yba; Mon, 15 Apr 2019 03:57:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqyTfaVtn2J1mpUTo5Msee2YUSE1TH30Vx5csz9JFdUCzhO3P6amgaJMUNwrSD1r27jjwWVb X-Received: by 2002:a17:902:3183:: with SMTP id x3mr75376148plb.170.1555325862366; Mon, 15 Apr 2019 03:57:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555325862; cv=none; d=google.com; s=arc-20160816; b=mp8XSoVfzuN7hl2koeSvEld/oF5JmuQns5DYAU348cBHSef40BQ2J4jpFxqtyDf74A LDaf3Jf4XrGBh6e3vDMB+aQ8TB+5ykFtwcoVECuX4OMEB0EFx+RajW1dGn128iP33u/z Skxb1VRhgPvusdybappKKkxzJulmCd+s8aeGp7qww8NuN1VxpbuUxbUvC0fXozuc6ycA N4GlnNoEZNYWyQ1HdRVfbPXJ1xwLMOpfUjbof+jrTXIjOx3FhIT9K3t6m/sR4+7h7u4u aHtlJXIbZ4qnIZHJdN3niELfAeIE4Pl5k/ml/3WJfpOXgAQSQ1L+hj31R7ucN7lgBp2A 1/ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=5LW352ZMgBfFn3npqhI+v4OhH+2/k6L3szfX9xALS48=; b=BKzTRbJQGjxtylzOjfv7x2SSxfVV95BCyJatg9Z9X8f8ERT31jNvm+ydQxdsS7mYJF js+kOdNzSHuCf94VsAlprjlWuhyUTmPjQ5jRXknHYabDr5nyBUDK9LBnKlnj3m5bfL63 uTTTT0PvouB/aNfLCLtdcnelDNIXTMKxldvPE81XmlNDxFrmd30hQ4jsAvybHPYfoGqk 4yxE6kdwNjWbtRS8rhHfay31B3o9BQF7TMBmNIzeVCyxes7SO4PlDJ/EglIJhdNk+oP0 d0VM2c3JUshRc/DyxoHLpsgoGYTJX4r+kkHZEKnM0Kn0BHaqbAGGsyjeuMviAyVoxiKK LCQQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y66si40001417pgy.186.2019.04.15.03.57.26; Mon, 15 Apr 2019 03:57:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726214AbfDOKzf convert rfc822-to-8bit (ORCPT + 99 others); Mon, 15 Apr 2019 06:55:35 -0400 Received: from eu-smtp-delivery-151.mimecast.com ([146.101.78.151]:35790 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726751AbfDOKzd (ORCPT ); Mon, 15 Apr 2019 06:55:33 -0400 Received: from AcuMS.aculab.com (156.67.243.126 [156.67.243.126]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-163-7kMGV5O_PDmlrIf3f2xIYw-1; Mon, 15 Apr 2019 11:55:29 +0100 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) by AcuMS.aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Mon, 15 Apr 2019 11:56:39 +0100 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Mon, 15 Apr 2019 11:56:39 +0100 From: David Laight 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' , 'Sergey Senozhatsky' , 'Steven Rostedt' , 'Andrew Morton' , "intel-gfx@lists.freedesktop.org" , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , "ath10k@lists.infradead.org" , "linux-wireless@vger.kernel.org" , "linux-scsi@vger.kernel.org" , "linux-fbdev@vger.kernel.org" , "devel@driverdev.osuosl.org" , "linux-fsdevel@vger.kernel.org" Subject: RE: [PATCH 1/4] lib/hexdump.c: Allow 64 bytes per line Thread-Topic: [PATCH 1/4] lib/hexdump.c: Allow 64 bytes per line Thread-Index: AQMagew30YCVD5mEhyHx4HPts9xr1AHAzoGyAvGIFSMBrjp8bwNRRzUuo2RTc0CAAAzpEA== 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> In-Reply-To: <0dad01d4f376$113df2b0$33b9d810$@d-silva.org> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-MC-Unique: 7kMGV5O_PDmlrIf3f2xIYw-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)