Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp468939yba; Fri, 12 Apr 2019 07:13:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqyKNdVNIOEr13dI4KalG8Blg5p8432B/qEK3a6XpIDj603E4y/sHejhKac6Aem9KliXalSa X-Received: by 2002:a62:f20e:: with SMTP id m14mr57400919pfh.228.1555078395022; Fri, 12 Apr 2019 07:13:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555078395; cv=none; d=google.com; s=arc-20160816; b=qEXdA58crCp70qdCuAAw3sfxRBTo9t3iGTHEPt5QkQ8JULmWgrXCpaCbdKlB+sc6s1 HTmoTruTM/yJQd8fKqYwurUpHmRWDGKhf0l/GiREdqpkD7CWzAmHgQ0/KMsV2WDKmI2Y PrUIOI24aEV9yuUdFas3MvorRFgutCnmTQPLbVncZTiBRJHY7Pb/Q14i+NvXRqyfdor2 bxl/7Ahspr0eQ10IS3vUKdYCR+F1ykYFjGxcZO9PNpYX795ffVfUmIr++M7N5w24WXYM UDvq6yFaD4AdD/5iEdvk1j2cT0tq+5UCS8I/2tC8+lQ0MdhR/wpHnS0VbqZxGTk2o0kV SrAQ== 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; bh=B5xTw8ZgJhaQkdAnM8MG/8DF+f1vGWZuPu3UXawb9dI=; b=eoA6RYsg0ZWuaCybi+PNWOPy3MSMeB4eC8g8V9wcYZ1AKL2QDewOveeAeqofFj9B9f +Z1ac938hc2t2cKGA9ugh8Wcpd/WvMbpqKbvvOo9simye6AHtLnuI+FysBqKP4+FZJ/J eP9OkCMfWnoyBEs0cepixTZRUIkEA0J3f5khkQ19UPR+GYA0tXTbuyc9T1VrUntzHLmK EJYwtc+QzTlsNWRyrSojx7073B2809nWg4/xE+6QfcEmB4Rywnh0wCN5R8WP1m3LW50W 5eDX/EmpKodyBN3qs7YmaJ9LILjPzdMxFsUh1X9kBOLDDEN8KBk+aI4FUwYUZITINc2G CVaA== 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 q142si4085779pfq.175.2019.04.12.07.12.59; Fri, 12 Apr 2019 07:13:15 -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 S1727078AbfDLOMT (ORCPT + 99 others); Fri, 12 Apr 2019 10:12:19 -0400 Received: from mx2.suse.de ([195.135.220.15]:53600 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726327AbfDLOMP (ORCPT ); Fri, 12 Apr 2019 10:12:15 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 7290BAD72; Fri, 12 Apr 2019 14:12:12 +0000 (UTC) Date: Fri, 12 Apr 2019 16:12:11 +0200 From: Petr Mladek To: Alastair D'Silva Cc: alastair@d-silva.org, 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 3/4] lib/hexdump.c: Replace ascii bool in hex_dump_to_buffer with flags Message-ID: <20190412141211.lvnz6wb7mwkykmxf@pathway.suse.cz> 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: NeoMutt/20170912 (1.9.0) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 2019-04-10 13:17:19, Alastair D'Silva wrote: > From: Alastair D'Silva > > In order to support additional features in hex_dump_to_buffer, replace > the ascii bool parameter with flags. > > Signed-off-by: Alastair D'Silva > --- > drivers/gpu/drm/i915/intel_engine_cs.c | 2 +- > drivers/isdn/hardware/mISDN/mISDNisar.c | 6 ++++-- > drivers/mailbox/mailbox-test.c | 2 +- > drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 2 +- > drivers/net/ethernet/synopsys/dwc-xlgmac-common.c | 2 +- > drivers/net/wireless/ath/ath10k/debug.c | 3 ++- > drivers/net/wireless/intel/iwlegacy/3945-mac.c | 2 +- > drivers/platform/chrome/wilco_ec/debugfs.c | 3 ++- > drivers/scsi/scsi_logging.c | 8 +++----- > drivers/staging/fbtft/fbtft-core.c | 2 +- > fs/seq_file.c | 3 ++- > include/linux/printk.h | 2 +- > lib/hexdump.c | 15 ++++++++------- > lib/test_hexdump.c | 5 +++-- > 14 files changed, 31 insertions(+), 26 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c > index 49fa43ff02ba..fb133e729f9a 100644 > --- a/drivers/gpu/drm/i915/intel_engine_cs.c > +++ b/drivers/gpu/drm/i915/intel_engine_cs.c > @@ -1318,7 +1318,7 @@ static void hexdump(struct drm_printer *m, const void *buf, size_t len) > WARN_ON_ONCE(hex_dump_to_buffer(buf + pos, len - pos, > rowsize, sizeof(u32), > line, sizeof(line), > - false) >= sizeof(line)); > + 0) >= sizeof(line)); It might be more clear when we define: #define HEXDUMP_BINARY 0 > drm_printf(m, "[%04zx] %s\n", pos, line); > > prev = buf + pos; > diff --git a/include/linux/printk.h b/include/linux/printk.h > index c014e5573665..82975853c400 100644 > --- a/include/linux/printk.h > +++ b/include/linux/printk.h > @@ -493,7 +493,7 @@ enum { > > extern int hex_dump_to_buffer(const void *buf, size_t len, int rowsize, > int groupsize, char *linebuf, size_t linebuflen, > - bool ascii); > + u64 flags); I wonder how fancy hex_dump could be. IMHO, u32 should be enough. The last famous words ;-) Best Regards, Petr