[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fc844ffdfbc028e635f46e7a4a301b4ea8748ee1.camel@perches.com>
Date: Fri, 01 Mar 2019 17:13:09 -0800
From: Joe Perches <joe@...ches.com>
To: Alastair D'Silva <alastair@....ibm.com>, alastair@...ilva.org
Cc: Frederic Barrat <fbarrat@...ux.ibm.com>,
Andrew Donnellan <andrew.donnellan@....ibm.com>,
Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/5] ocxl: Clean up printf formats
On Wed, 2019-02-27 at 15:57 +1100, Alastair D'Silva wrote:
> From: Alastair D'Silva <alastair@...ilva.org>
>
> Use %# instead of using a literal '0x'
<shrug> I think it's better not to change this unless
the compilation unit already uses a mix of styles.
Overall, the kernel uses "0x%<hex type>" over "%#<hex type>"
by ~8:1
$ git grep -P '0x%\d*[hl]*x' | wc -l
27654
$ git grep -P '%#\d*[hl]*x' | wc -l
3454
> diff --git a/drivers/misc/ocxl/config.c b/drivers/misc/ocxl/config.c
[]
> @@ -178,9 +178,9 @@ static int read_dvsec_vendor(struct pci_dev *dev)
> pci_read_config_dword(dev, pos + OCXL_DVSEC_VENDOR_DLX_VERS, &dlx);
>
> dev_dbg(&dev->dev, "Vendor specific DVSEC:\n");
> - dev_dbg(&dev->dev, " CFG version = 0x%x\n", cfg);
> - dev_dbg(&dev->dev, " TLX version = 0x%x\n", tlx);
> - dev_dbg(&dev->dev, " DLX version = 0x%x\n", dlx);
> + dev_dbg(&dev->dev, " CFG version = %#x\n", cfg);
> + dev_dbg(&dev->dev, " TLX version = %#x\n", tlx);
> + dev_dbg(&dev->dev, " DLX version = %#x\n", dlx);
[...]
Powered by blists - more mailing lists