On Sat 2019-04-13 09:31:27, Alastair D'Silva wrote: > > -----Original Message----- > > From: Petr Mladek <pmla...@suse.com> > > Sent: Saturday, 13 April 2019 12:12 AM > > To: Alastair D'Silva <alast...@au1.ibm.com> > > Cc: alast...@d-silva.org; Jani Nikula <jani.nik...@linux.intel.com>; > Joonas > > Lahtinen <joonas.lahti...@linux.intel.com>; Rodrigo Vivi > > <rodrigo.v...@intel.com>; David Airlie <airl...@linux.ie>; Daniel Vetter > > <dan...@ffwll.ch>; Karsten Keil <i...@linux-pingi.de>; Jassi Brar > > <jassisinghb...@gmail.com>; Tom Lendacky <thomas.lenda...@amd.com>; > > David S. Miller <da...@davemloft.net>; Jose Abreu > > <jose.ab...@synopsys.com>; Kalle Valo <kv...@codeaurora.org>; > > Stanislaw Gruszka <sgrus...@redhat.com>; Benson Leung > > <ble...@chromium.org>; Enric Balletbo i Serra > > <enric.balle...@collabora.com>; James E.J. Bottomley > > <j...@linux.ibm.com>; Martin K. Petersen <martin.peter...@oracle.com>; > > Greg Kroah-Hartman <gre...@linuxfoundation.org>; Alexander Viro > > <v...@zeniv.linux.org.uk>; Sergey Senozhatsky > > <sergey.senozhat...@gmail.com>; Steven Rostedt <rost...@goodmis.org>; > > Andrew Morton <a...@linux-foundation.org>; intel- > > g...@lists.freedesktop.org; dri-devel@lists.freedesktop.org; linux- > > ker...@vger.kernel.org; net...@vger.kernel.org; > > ath...@lists.infradead.org; linux-wirel...@vger.kernel.org; linux- > > s...@vger.kernel.org; linux-fb...@vger.kernel.org; > > de...@driverdev.osuosl.org; linux-fsde...@vger.kernel.org > > Subject: Re: [PATCH 3/4] lib/hexdump.c: Replace ascii bool in > > hex_dump_to_buffer with flags > > > > On Wed 2019-04-10 13:17:19, Alastair D'Silva wrote: > > > From: Alastair D'Silva <alast...@d-silva.org> > > > > > > In order to support additional features in hex_dump_to_buffer, replace > > > the ascii bool parameter with flags. > > > > > > Signed-off-by: Alastair D'Silva <alast...@d-silva.org> > > > --- > > > 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 > > This feels unnecessary, and weird. Omitting the flag won't disable the hex > output (as expected), and if you don't want hex output why call hexdump in > the first place?
Why do we have HEXDUMP_ASCII then? Why is the above funtion not using HEXDUMP_ASCII? Who would call it with (HEXDUMP_ASCII | HEXDUMP_BINARY)? Best Regards, Petr _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel