Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4594331yba; Wed, 10 Apr 2019 00:19:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxuPxtehb+bi6Q0YKYweWlLAGKYh4f6HpXqs6c+lmCtfuUEcA+x2PKJmE6/qUessH5SHjPR X-Received: by 2002:a62:6c43:: with SMTP id h64mr42767845pfc.123.1554880792900; Wed, 10 Apr 2019 00:19:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554880792; cv=none; d=google.com; s=arc-20160816; b=NzozwzjzlgkZhkYT8iAC8mECgDXa15I/yI0LpVw1iCPzkJAbuEtWcs2BslCxYfqGbJ OAlizS+y+aaSSflYMAGvX2USCgZbcFGRJNZu3qG501MM5gajOuXyiC8nnZ0s1oyPOKrc mBVcDMy3BJ05ZdDDbW0YUgza35U9MDSJSs38uP5nSHtNO/9+vnW9epGUXWqkKuyqUbFy C1hW4rcz/qjYWHHhBcG8H3RrHduAZoXjXiHtI4dUc0i3DNkllHZg8QYx5jk3ylQyftX0 gzyHE0RU6oPjFQ1+jkaWIS4ipwnt5Z880kvNVx2Yzwd7CG1hn0Dab6+KQCozG+f3mq/o K8yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=eUy6uNd20IYE0HM61hq/WDfOphNCC2hmiq/ognC0Li0=; b=ZG0qkYD5kaZJWOs2IYj87ActCdzWs1pJqwuSLgi8TYcFYcj59WlGu15hqfMLdiHGAq JMjN78edv15Mycw3jpcr7qvxdLUP1l5YMnNuC4lt52S+Ua8+vewu8A9oOZRY+YRCurxR mIu5wW8eWkbJ78TttD3BGZuOr01GB8dKP/j6/j+YL/5wqxDusLWeF5pM06yGtxHr32rl 5ikBT0WtZDSZRVJursbawwY5W7VXNsyHs6ks1y1dwC451bBZMbPemT1KAN4phuzOHlD7 VbXDDb02O1FPKfFe6aukrFF1iDfzXDhqPQBub5i8KJmVNdCGKihSomzkIWee6xm1qZWG IvaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=RLKyRjyV; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f9si23040489plo.101.2019.04.10.00.19.35; Wed, 10 Apr 2019 00:19:52 -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; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=RLKyRjyV; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728830AbfDJG7M (ORCPT + 99 others); Wed, 10 Apr 2019 02:59:12 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:50596 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728647AbfDJG7M (ORCPT ); Wed, 10 Apr 2019 02:59:12 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x3A6s3KB107629; Wed, 10 Apr 2019 06:56:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2018-07-02; bh=eUy6uNd20IYE0HM61hq/WDfOphNCC2hmiq/ognC0Li0=; b=RLKyRjyVa1eDa8Wtlw0800FywfAOqyVuwzvDOe+0DCgQQRFWcxH4tB947aFQDZ2vFfCv Ot7KxM2KJKfq2xNinZqcgvWuh3nidCddrNcRmpkwwcqg0fiad9WgaPUUrNUZsemyPHNa 7SUqb7ipupeQWGRMqx3LUpyOM+z3h43BScoqp05ktY0pWxOJo49KRLb7jDBHkqrYG0N5 wpIincfr87c1v7e6iES1tBNxOKIW3vLq0WwtzxdqXZXnoYBUOEuyw4+jn0lMUwXYYtw2 SiO5WtUp1RSXG3djmjhC+WvC2DZ5fu25eTcj8slgDF8bUafIEgq4hI8k0plONv8ktNPr Uw== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2120.oracle.com with ESMTP id 2rpmrq9365-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 10 Apr 2019 06:56:58 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x3A6tdvQ002850; Wed, 10 Apr 2019 06:56:57 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3020.oracle.com with ESMTP id 2rpytc2p5s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 10 Apr 2019 06:56:57 +0000 Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x3A6ukAF026990; Wed, 10 Apr 2019 06:56:46 GMT Received: from kadam (/197.157.0.42) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 09 Apr 2019 23:56:45 -0700 Date: Wed, 10 Apr 2019 09:56:27 +0300 From: Dan Carpenter To: "Alastair D'Silva" Cc: alastair@d-silva.org, linux-fbdev@vger.kernel.org, Stanislaw Gruszka , Petr Mladek , David Airlie , Joonas Lahtinen , dri-devel@lists.freedesktop.org, devel@driverdev.osuosl.org, linux-scsi@vger.kernel.org, Jassi Brar , ath10k@lists.infradead.org, intel-gfx@lists.freedesktop.org, Jose Abreu , Tom Lendacky , "James E.J. Bottomley" , Jani Nikula , linux-fsdevel@vger.kernel.org, Steven Rostedt , Rodrigo Vivi , Benson Leung , Kalle Valo , Karsten Keil , "Martin K. Petersen" , Greg Kroah-Hartman , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, Sergey Senozhatsky , Daniel Vetter , netdev@vger.kernel.org, Enric Balletbo i Serra , Andrew Morton , "David S. Miller" , Alexander Viro Subject: Re: [PATCH 3/4] lib/hexdump.c: Replace ascii bool in hex_dump_to_buffer with flags Message-ID: <20190410065627.GF6095@kadam> References: <20190410031720.11067-1-alastair@au1.ibm.com> <20190410031720.11067-4-alastair@au1.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190410031720.11067-4-alastair@au1.ibm.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9222 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=630 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904100050 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9222 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=652 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904100050 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 10, 2019 at 01:17:19PM +1000, Alastair D'Silva wrote: > @@ -107,7 +108,7 @@ EXPORT_SYMBOL(bin2hex); > * string if enough space had been available. > */ > int hex_dump_to_buffer(const void *buf, size_t len, int rowsize, int groupsize, > - char *linebuf, size_t linebuflen, bool ascii) > + char *linebuf, size_t linebuflen, u64 flags) > { > const u8 *ptr = buf; > int ngroups; > @@ -184,7 +185,7 @@ int hex_dump_to_buffer(const void *buf, size_t len, int rowsize, int groupsize, > if (j) > lx--; > } > - if (!ascii) > + if (!flags & HEXDUMP_ASCII) ^^^^^^^^^^^^^^^^^^^^^^ This is a precedence bug. It should be if (!(flags & HEXDUMP_ASCII)). > goto nil; > regards, dan carpenter