All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] cris: fix %d confusingly prefixed with 0x in format string
@ 2014-08-02 22:20 Hans Wennborg
       [not found] ` <1407018043-648-1-git-send-email-hans-7z9IcJk4adCsTnJN9+BGXg@public.gmane.org>
  0 siblings, 1 reply; 22+ messages in thread
From: Hans Wennborg @ 2014-08-02 22:20 UTC (permalink / raw)
  To: starvik, linux-cris-kernel, linux-kernel; +Cc: Hans Wennborg

Signed-off-by: Hans Wennborg <hans@hanshq.net>
---
 arch/cris/arch-v32/drivers/cryptocop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c
index 877da19..0ae4f65 100644
--- a/arch/cris/arch-v32/drivers/cryptocop.c
+++ b/arch/cris/arch-v32/drivers/cryptocop.c
@@ -3155,7 +3155,7 @@ static void print_dma_descriptors(struct cryptocop_int_operation *iop)
 	printk("print_dma_descriptors start\n");
 
 	printk("iop:\n");
-	printk("\tsid: 0x%lld\n", iop->sid);
+	printk("\tsid: 0x%llx\n", iop->sid);
 
 	printk("\tcdesc_out: 0x%p\n", iop->cdesc_out);
 	printk("\tcdesc_in: 0x%p\n", iop->cdesc_in);
-- 
2.0.0.526.g5318336


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/1] cris: fix %d confusingly prefixed with 0x in format string
  2014-08-02 22:20 [PATCH 1/1] cris: fix %d confusingly prefixed with 0x in format string Hans Wennborg
       [not found] ` <1407018043-648-1-git-send-email-hans-7z9IcJk4adCsTnJN9+BGXg@public.gmane.org>
@ 2014-08-03  0:46     ` Joe Perches
  0 siblings, 0 replies; 22+ messages in thread
From: Joe Perches @ 2014-08-03  0:46 UTC (permalink / raw)
  To: Hans Wennborg
  Cc: starvik-VrBV9hrLPhE, linux-cris-kernel-VrBV9hrLPhE,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, kernel-janitors, netdev,
	devel, linux-cifs-u79uwXL29TY76Z2rM5mHXA,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw

On Sat, 2014-08-02 at 15:20 -0700, Hans Wennborg wrote:
> Signed-off-by: Hans Wennborg <hans-7z9IcJk4adCsTnJN9+BGXg@public.gmane.org>
> ---
>  arch/cris/arch-v32/drivers/cryptocop.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c
[]
> @@ -3155,7 +3155,7 @@ static void print_dma_descriptors(struct cryptocop_int_operation *iop)
>  	printk("print_dma_descriptors start\n");
>  
>  	printk("iop:\n");
> -	printk("\tsid: 0x%lld\n", iop->sid);
> +	printk("\tsid: 0x%llx\n", iop->sid);
>  
>  	printk("\tcdesc_out: 0x%p\n", iop->cdesc_out);
>  	printk("\tcdesc_in: 0x%p\n", iop->cdesc_in);

Thanks.

This is a surprisingly common error:

$ /usr/bin/git grep -P '0x\%(?!ull\b|ul\b|u\b|lu\b|llu\b|llux\b|lux\b|lx\b|lluX\b|luX\b|lX\b)[ul]*[ud]'
arch/arm/mach-omap2/id.c:               pr_warn("%s: unknown idcode=0x%08x (hawkeye=0x%08x,rev=0x%d)\n",
arch/cris/arch-v32/drivers/cryptocop.c: printk("\tsid: 0x%lld\n", iop->sid);
drivers/atm/eni.c:                      return sprintf(page,"tx[%d]:    0x%ld-0x%ld "
drivers/atm/eni.c:                              length += sprintf(page+length,"0x%ld-0x%ld "
drivers/block/DAC960.c:         DAC960_Error("IO port 0x%d busy for Controller at\n",
drivers/block/DAC960.c:         DAC960_Error("IO port 0x%d busy for Controller at\n",
drivers/block/cciss.c:  dev_dbg(&h->pdev->dev, "   Max outstanding commands = 0x%d\n",
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:        mfc_debug(2, "stream buf addr: 0x%08lx, size: 0x%d\n",
drivers/mfd/htc-i2cpld.c:       snprintf(client->name, I2C_NAME_SIZE, "Chip_0x%d", client->addr);
drivers/mfd/omap-usb-host.c:                     "USB HOST Rev:0x%d not recognized, assuming %d ports\n",
drivers/misc/sgi-gru/grumain.c: gru_dbg(grudev, "gid %d, gts %p, gms %p, ctxnum 0x%d, asidmap 0x%lx\n",
drivers/net/ethernet/smsc/smc911x.c:    DBG(SMC_DEBUG_MISC, dev, "phy_id1=0x%x, phy_id2=0x%x phyaddr=0x%d\n",
drivers/net/wireless/ath/ath6kl/init.c:                            "found reserved ram size ie 0x%d\n",
drivers/net/wireless/ath/ath6kl/main.c:         ath6kl_err("failed to write 0x%x during diagnose window to 0x%d\n",
drivers/net/wireless/iwlegacy/4965-mac.c:                       IL_ERR("failed setting tx power (0x%d).\n", ret);
drivers/net/wireless/rtlwifi/pci.c:                              "more desc left, wake skb_queue@%d, ring->idx = %d, skb_queue_len = 0x%d\n",
drivers/net/wireless/rtlwifi/pci.c:                              "No more TX desc@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%d\n",
drivers/net/wireless/rtlwifi/pci.c:                      "less desc left, stop skb_queue@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%d\n",
drivers/net/wireless/rtlwifi/rtl8192de/phy.c:            "MCSTxPowerLevelOriginalOffset[%d][%d] = 0x%ulx\n",
drivers/net/wireless/rtlwifi/rtl8192de/phy.c:                   "ver 1 set RF-A, 5G,    0x28 = 0x%ulx !!\n", u4tmp);
drivers/net/wireless/rtlwifi/rtl8192de/phy.c:                   "ver 3 set RF-B, 2G, 0x28 = 0x%ulx !!\n", u4tmp);
drivers/net/wireless/rtlwifi/rtl8192de/phy.c:                   "ver 3 set RF-B, 2G, 0x28 = 0x%ulx !!\n",
drivers/parisc/dino.c:          printk(KERN_ERR "DINO: Hey! Someone took my MMIO space (0x%ld)!\n",
drivers/scsi/hpsa.c:    dev_info(dev, "   Max outstanding commands = 0x%d\n",
drivers/staging/nokia_h4p/nokia_core.c:         dev_err(info->dev, "Cannot get GPIO line 0x%d",
drivers/staging/rtl8192ee/pci.c:                                 ("more desc left, wake skb_queue@%d,ring->idx = %d, skb_queue_len = 0x%d\n",
drivers/staging/rtl8192ee/pci.c:                                 ("No more TX desc@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%d\n",
drivers/staging/rtl8192ee/pci.c:                         ("less desc left, stop skb_queue@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%d\n",
drivers/staging/rtl8821ae/pci.c:                                         "skb_queue_len = 0x%d\n",
drivers/staging/rtl8821ae/pci.c:                                  "idx = %d, skb_queue_len = 0x%d\n",
drivers/staging/rtl8821ae/pci.c:                          "idx = %d, skb_queue_len = 0x%d\n",
fs/cifs/cifs_debug.c:                                   "\n\tPathComponentMax: %d Status: 0x%d",
fs/cifs/misc.c:                 cifs_dbg(FYI, "notify err 0x%d\n",
fs/cifs/misc.c: cifs_dbg(FYI, "oplock type 0x%d level 0x%d\n",
fs/cifs/smb2misc.c:             cifs_dbg(FYI, "lease key match, lease break 0x%d\n",
fs/cifs/smb2misc.c:             cifs_dbg(FYI, "lease key match, lease break 0x%d\n",
fs/cifs/smb2misc.c:     cifs_dbg(FYI, "oplock level 0x%d\n", rsp->OplockLevel);
sound/firewire/fireworks/fireworks_proc.c:                          "phys in grp[0x%d]: type 0x%d, count 0x%d\n",
sound/firewire/fireworks/fireworks_proc.c:                          "phys out grps[0x%d]: type 0x%d, count 0x%d\n",
sound/pci/riptide/riptide.c:    snd_printdd("sent mixer %d: 0x%d 0x%d\n", num, rval, lval);
sound/pci/riptide/riptide.c:    snd_printdd("got mixer %d: 0x%d 0x%d\n", num, *rval, *lval);

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/1] cris: fix %d confusingly prefixed with 0x in format string
@ 2014-08-03  0:46     ` Joe Perches
  0 siblings, 0 replies; 22+ messages in thread
From: Joe Perches @ 2014-08-03  0:46 UTC (permalink / raw)
  To: Hans Wennborg
  Cc: starvik, linux-cris-kernel, linux-kernel, kernel-janitors,
	netdev, devel, linux-cifs, alsa-devel

On Sat, 2014-08-02 at 15:20 -0700, Hans Wennborg wrote:
> Signed-off-by: Hans Wennborg <hans@hanshq.net>
> ---
>  arch/cris/arch-v32/drivers/cryptocop.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c
[]
> @@ -3155,7 +3155,7 @@ static void print_dma_descriptors(struct cryptocop_int_operation *iop)
>  	printk("print_dma_descriptors start\n");
>  
>  	printk("iop:\n");
> -	printk("\tsid: 0x%lld\n", iop->sid);
> +	printk("\tsid: 0x%llx\n", iop->sid);
>  
>  	printk("\tcdesc_out: 0x%p\n", iop->cdesc_out);
>  	printk("\tcdesc_in: 0x%p\n", iop->cdesc_in);

Thanks.

This is a surprisingly common error:

$ /usr/bin/git grep -P '0x\%(?!ull\b|ul\b|u\b|lu\b|llu\b|llux\b|lux\b|lx\b|lluX\b|luX\b|lX\b)[ul]*[ud]'
arch/arm/mach-omap2/id.c:               pr_warn("%s: unknown idcode=0x%08x (hawkeye=0x%08x,rev=0x%d)\n",
arch/cris/arch-v32/drivers/cryptocop.c: printk("\tsid: 0x%lld\n", iop->sid);
drivers/atm/eni.c:                      return sprintf(page,"tx[%d]:    0x%ld-0x%ld "
drivers/atm/eni.c:                              length += sprintf(page+length,"0x%ld-0x%ld "
drivers/block/DAC960.c:         DAC960_Error("IO port 0x%d busy for Controller at\n",
drivers/block/DAC960.c:         DAC960_Error("IO port 0x%d busy for Controller at\n",
drivers/block/cciss.c:  dev_dbg(&h->pdev->dev, "   Max outstanding commands = 0x%d\n",
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:        mfc_debug(2, "stream buf addr: 0x%08lx, size: 0x%d\n",
drivers/mfd/htc-i2cpld.c:       snprintf(client->name, I2C_NAME_SIZE, "Chip_0x%d", client->addr);
drivers/mfd/omap-usb-host.c:                     "USB HOST Rev:0x%d not recognized, assuming %d ports\n",
drivers/misc/sgi-gru/grumain.c: gru_dbg(grudev, "gid %d, gts %p, gms %p, ctxnum 0x%d, asidmap 0x%lx\n",
drivers/net/ethernet/smsc/smc911x.c:    DBG(SMC_DEBUG_MISC, dev, "phy_id1=0x%x, phy_id2=0x%x phyaddr=0x%d\n",
drivers/net/wireless/ath/ath6kl/init.c:                            "found reserved ram size ie 0x%d\n",
drivers/net/wireless/ath/ath6kl/main.c:         ath6kl_err("failed to write 0x%x during diagnose window to 0x%d\n",
drivers/net/wireless/iwlegacy/4965-mac.c:                       IL_ERR("failed setting tx power (0x%d).\n", ret);
drivers/net/wireless/rtlwifi/pci.c:                              "more desc left, wake skb_queue@%d, ring->idx = %d, skb_queue_len = 0x%d\n",
drivers/net/wireless/rtlwifi/pci.c:                              "No more TX desc@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%d\n",
drivers/net/wireless/rtlwifi/pci.c:                      "less desc left, stop skb_queue@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%d\n",
drivers/net/wireless/rtlwifi/rtl8192de/phy.c:            "MCSTxPowerLevelOriginalOffset[%d][%d] = 0x%ulx\n",
drivers/net/wireless/rtlwifi/rtl8192de/phy.c:                   "ver 1 set RF-A, 5G,    0x28 = 0x%ulx !!\n", u4tmp);
drivers/net/wireless/rtlwifi/rtl8192de/phy.c:                   "ver 3 set RF-B, 2G, 0x28 = 0x%ulx !!\n", u4tmp);
drivers/net/wireless/rtlwifi/rtl8192de/phy.c:                   "ver 3 set RF-B, 2G, 0x28 = 0x%ulx !!\n",
drivers/parisc/dino.c:          printk(KERN_ERR "DINO: Hey! Someone took my MMIO space (0x%ld)!\n",
drivers/scsi/hpsa.c:    dev_info(dev, "   Max outstanding commands = 0x%d\n",
drivers/staging/nokia_h4p/nokia_core.c:         dev_err(info->dev, "Cannot get GPIO line 0x%d",
drivers/staging/rtl8192ee/pci.c:                                 ("more desc left, wake skb_queue@%d,ring->idx = %d, skb_queue_len = 0x%d\n",
drivers/staging/rtl8192ee/pci.c:                                 ("No more TX desc@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%d\n",
drivers/staging/rtl8192ee/pci.c:                         ("less desc left, stop skb_queue@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%d\n",
drivers/staging/rtl8821ae/pci.c:                                         "skb_queue_len = 0x%d\n",
drivers/staging/rtl8821ae/pci.c:                                  "idx = %d, skb_queue_len = 0x%d\n",
drivers/staging/rtl8821ae/pci.c:                          "idx = %d, skb_queue_len = 0x%d\n",
fs/cifs/cifs_debug.c:                                   "\n\tPathComponentMax: %d Status: 0x%d",
fs/cifs/misc.c:                 cifs_dbg(FYI, "notify err 0x%d\n",
fs/cifs/misc.c: cifs_dbg(FYI, "oplock type 0x%d level 0x%d\n",
fs/cifs/smb2misc.c:             cifs_dbg(FYI, "lease key match, lease break 0x%d\n",
fs/cifs/smb2misc.c:             cifs_dbg(FYI, "lease key match, lease break 0x%d\n",
fs/cifs/smb2misc.c:     cifs_dbg(FYI, "oplock level 0x%d\n", rsp->OplockLevel);
sound/firewire/fireworks/fireworks_proc.c:                          "phys in grp[0x%d]: type 0x%d, count 0x%d\n",
sound/firewire/fireworks/fireworks_proc.c:                          "phys out grps[0x%d]: type 0x%d, count 0x%d\n",
sound/pci/riptide/riptide.c:    snd_printdd("sent mixer %d: 0x%d 0x%d\n", num, rval, lval);
sound/pci/riptide/riptide.c:    snd_printdd("got mixer %d: 0x%d 0x%d\n", num, *rval, *lval);



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/1] cris: fix %d confusingly prefixed with 0x in format string
@ 2014-08-03  0:46     ` Joe Perches
  0 siblings, 0 replies; 22+ messages in thread
From: Joe Perches @ 2014-08-03  0:46 UTC (permalink / raw)
  To: Hans Wennborg
  Cc: starvik-VrBV9hrLPhE, linux-cris-kernel-VrBV9hrLPhE,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, kernel-janitors, netdev,
	devel, linux-cifs-u79uwXL29TY76Z2rM5mHXA,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw

On Sat, 2014-08-02 at 15:20 -0700, Hans Wennborg wrote:
> Signed-off-by: Hans Wennborg <hans@hanshq.net>
> ---
>  arch/cris/arch-v32/drivers/cryptocop.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c
[]
> @@ -3155,7 +3155,7 @@ static void print_dma_descriptors(struct cryptocop_int_operation *iop)
>  	printk("print_dma_descriptors start\n");
>  
>  	printk("iop:\n");
> -	printk("\tsid: 0x%lld\n", iop->sid);
> +	printk("\tsid: 0x%llx\n", iop->sid);
>  
>  	printk("\tcdesc_out: 0x%p\n", iop->cdesc_out);
>  	printk("\tcdesc_in: 0x%p\n", iop->cdesc_in);

Thanks.

This is a surprisingly common error:

$ /usr/bin/git grep -P '0x\%(?!ull\b|ul\b|u\b|lu\b|llu\b|llux\b|lux\b|lx\b|lluX\b|luX\b|lX\b)[ul]*[ud]'
arch/arm/mach-omap2/id.c:               pr_warn("%s: unknown idcode=0x%08x (hawkeye=0x%08x,rev=0x%d)\n",
arch/cris/arch-v32/drivers/cryptocop.c: printk("\tsid: 0x%lld\n", iop->sid);
drivers/atm/eni.c:                      return sprintf(page,"tx[%d]:    0x%ld-0x%ld "
drivers/atm/eni.c:                              length += sprintf(page+length,"0x%ld-0x%ld "
drivers/block/DAC960.c:         DAC960_Error("IO port 0x%d busy for Controller at\n",
drivers/block/DAC960.c:         DAC960_Error("IO port 0x%d busy for Controller at\n",
drivers/block/cciss.c:  dev_dbg(&h->pdev->dev, "   Max outstanding commands = 0x%d\n",
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:        mfc_debug(2, "stream buf addr: 0x%08lx, size: 0x%d\n",
drivers/mfd/htc-i2cpld.c:       snprintf(client->name, I2C_NAME_SIZE, "Chip_0x%d", client->addr);
drivers/mfd/omap-usb-host.c:                     "USB HOST Rev:0x%d not recognized, assuming %d ports\n",
drivers/misc/sgi-gru/grumain.c: gru_dbg(grudev, "gid %d, gts %p, gms %p, ctxnum 0x%d, asidmap 0x%lx\n",
drivers/net/ethernet/smsc/smc911x.c:    DBG(SMC_DEBUG_MISC, dev, "phy_id1=0x%x, phy_id2=0x%x phyaddr=0x%d\n",
drivers/net/wireless/ath/ath6kl/init.c:                            "found reserved ram size ie 0x%d\n",
drivers/net/wireless/ath/ath6kl/main.c:         ath6kl_err("failed to write 0x%x during diagnose window to 0x%d\n",
drivers/net/wireless/iwlegacy/4965-mac.c:                       IL_ERR("failed setting tx power (0x%d).\n", ret);
drivers/net/wireless/rtlwifi/pci.c:                              "more desc left, wake skb_queue@%d, ring->idx = %d, skb_queue_len = 0x%d\n",
drivers/net/wireless/rtlwifi/pci.c:                              "No more TX desc@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%d\n",
drivers/net/wireless/rtlwifi/pci.c:                      "less desc left, stop skb_queue@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%d\n",
drivers/net/wireless/rtlwifi/rtl8192de/phy.c:            "MCSTxPowerLevelOriginalOffset[%d][%d] = 0x%ulx\n",
drivers/net/wireless/rtlwifi/rtl8192de/phy.c:                   "ver 1 set RF-A, 5G,    0x28 = 0x%ulx !!\n", u4tmp);
drivers/net/wireless/rtlwifi/rtl8192de/phy.c:                   "ver 3 set RF-B, 2G, 0x28 = 0x%ulx !!\n", u4tmp);
drivers/net/wireless/rtlwifi/rtl8192de/phy.c:                   "ver 3 set RF-B, 2G, 0x28 = 0x%ulx !!\n",
drivers/parisc/dino.c:          printk(KERN_ERR "DINO: Hey! Someone took my MMIO space (0x%ld)!\n",
drivers/scsi/hpsa.c:    dev_info(dev, "   Max outstanding commands = 0x%d\n",
drivers/staging/nokia_h4p/nokia_core.c:         dev_err(info->dev, "Cannot get GPIO line 0x%d",
drivers/staging/rtl8192ee/pci.c:                                 ("more desc left, wake skb_queue@%d,ring->idx = %d, skb_queue_len = 0x%d\n",
drivers/staging/rtl8192ee/pci.c:                                 ("No more TX desc@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%d\n",
drivers/staging/rtl8192ee/pci.c:                         ("less desc left, stop skb_queue@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%d\n",
drivers/staging/rtl8821ae/pci.c:                                         "skb_queue_len = 0x%d\n",
drivers/staging/rtl8821ae/pci.c:                                  "idx = %d, skb_queue_len = 0x%d\n",
drivers/staging/rtl8821ae/pci.c:                          "idx = %d, skb_queue_len = 0x%d\n",
fs/cifs/cifs_debug.c:                                   "\n\tPathComponentMax: %d Status: 0x%d",
fs/cifs/misc.c:                 cifs_dbg(FYI, "notify err 0x%d\n",
fs/cifs/misc.c: cifs_dbg(FYI, "oplock type 0x%d level 0x%d\n",
fs/cifs/smb2misc.c:             cifs_dbg(FYI, "lease key match, lease break 0x%d\n",
fs/cifs/smb2misc.c:             cifs_dbg(FYI, "lease key match, lease break 0x%d\n",
fs/cifs/smb2misc.c:     cifs_dbg(FYI, "oplock level 0x%d\n", rsp->OplockLevel);
sound/firewire/fireworks/fireworks_proc.c:                          "phys in grp[0x%d]: type 0x%d, count 0x%d\n",
sound/firewire/fireworks/fireworks_proc.c:                          "phys out grps[0x%d]: type 0x%d, count 0x%d\n",
sound/pci/riptide/riptide.c:    snd_printdd("sent mixer %d: 0x%d 0x%d\n", num, rval, lval);
sound/pci/riptide/riptide.c:    snd_printdd("got mixer %d: 0x%d 0x%d\n", num, *rval, *lval);



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/1] cris: fix %d confusingly prefixed with 0x in format string
  2014-08-03  0:46     ` Joe Perches
@ 2014-08-03  1:19       ` Hans Wennborg
  -1 siblings, 0 replies; 22+ messages in thread
From: Hans Wennborg @ 2014-08-03  1:19 UTC (permalink / raw)
  To: Joe Perches
  Cc: starvik, linux-cris-kernel, linux-kernel, kernel-janitors,
	netdev, devel, linux-cifs, alsa-devel



On 08/02/2014 05:46 PM, Joe Perches wrote:
> On Sat, 2014-08-02 at 15:20 -0700, Hans Wennborg wrote:
>> Signed-off-by: Hans Wennborg <hans@hanshq.net>
>> ---
>>   arch/cris/arch-v32/drivers/cryptocop.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c
> []
>> @@ -3155,7 +3155,7 @@ static void print_dma_descriptors(struct cryptocop_int_operation *iop)
>>   	printk("print_dma_descriptors start\n");
>>
>>   	printk("iop:\n");
>> -	printk("\tsid: 0x%lld\n", iop->sid);
>> +	printk("\tsid: 0x%llx\n", iop->sid);
>>
>>   	printk("\tcdesc_out: 0x%p\n", iop->cdesc_out);
>>   	printk("\tcdesc_in: 0x%p\n", iop->cdesc_in);
>
> Thanks.
>
> This is a surprisingly common error:
>
> $ /usr/bin/git grep -P '0x\%(?!ull\b|ul\b|u\b|lu\b|llu\b|llux\b|lux\b|lx\b|lluX\b|luX\b|lX\b)[ul]*[ud]'
[...]

Yes, I have a patch for a bunch of these, but I figured it would be 
easier to get it merged if I split it up. (Complete kernel newbie here.)

  - Hans

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/1] cris: fix %d confusingly prefixed with 0x in format string
@ 2014-08-03  1:19       ` Hans Wennborg
  0 siblings, 0 replies; 22+ messages in thread
From: Hans Wennborg @ 2014-08-03  1:19 UTC (permalink / raw)
  To: Joe Perches
  Cc: starvik, linux-cris-kernel, linux-kernel, kernel-janitors,
	netdev, devel, linux-cifs, alsa-devel



On 08/02/2014 05:46 PM, Joe Perches wrote:
> On Sat, 2014-08-02 at 15:20 -0700, Hans Wennborg wrote:
>> Signed-off-by: Hans Wennborg <hans@hanshq.net>
>> ---
>>   arch/cris/arch-v32/drivers/cryptocop.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c
> []
>> @@ -3155,7 +3155,7 @@ static void print_dma_descriptors(struct cryptocop_int_operation *iop)
>>   	printk("print_dma_descriptors start\n");
>>
>>   	printk("iop:\n");
>> -	printk("\tsid: 0x%lld\n", iop->sid);
>> +	printk("\tsid: 0x%llx\n", iop->sid);
>>
>>   	printk("\tcdesc_out: 0x%p\n", iop->cdesc_out);
>>   	printk("\tcdesc_in: 0x%p\n", iop->cdesc_in);
>
> Thanks.
>
> This is a surprisingly common error:
>
> $ /usr/bin/git grep -P '0x\%(?!ull\b|ul\b|u\b|lu\b|llu\b|llux\b|lux\b|lx\b|lluX\b|luX\b|lX\b)[ul]*[ud]'
[...]

Yes, I have a patch for a bunch of these, but I figured it would be 
easier to get it merged if I split it up. (Complete kernel newbie here.)

  - Hans

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/1] cris: fix %d confusingly prefixed with 0x in format string
  2014-08-03  0:46     ` Joe Perches
  (?)
@ 2014-08-03  2:26       ` Steve French
  -1 siblings, 0 replies; 22+ messages in thread
From: Steve French @ 2014-08-03  2:26 UTC (permalink / raw)
  To: Joe Perches
  Cc: Hans Wennborg, starvik-VrBV9hrLPhE,
	linux-cris-kernel-VrBV9hrLPhE, LKML, kernel-janitors, netdev,
	devel, linux-cifs-u79uwXL29TY76Z2rM5mHXA,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw

Thanks for pointing this out.  I fixed the instances of this that you
spotted in the cifs.ko driver (pushed to cifs-2.6.git for-next) and
noted that you pointed it out in the commit message.

http://git.samba.org/?p=sfrench/cifs-2.6.git;a=commit;h=59b04c5df75bd715002bb535930ae1982a739269



On Sat, Aug 2, 2014 at 7:46 PM, Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org> wrote:
> On Sat, 2014-08-02 at 15:20 -0700, Hans Wennborg wrote:
>> Signed-off-by: Hans Wennborg <hans-7z9IcJk4adCsTnJN9+BGXg@public.gmane.org>
>> ---
>>  arch/cris/arch-v32/drivers/cryptocop.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c
> []
>> @@ -3155,7 +3155,7 @@ static void print_dma_descriptors(struct cryptocop_int_operation *iop)
>>       printk("print_dma_descriptors start\n");
>>
>>       printk("iop:\n");
>> -     printk("\tsid: 0x%lld\n", iop->sid);
>> +     printk("\tsid: 0x%llx\n", iop->sid);
>>
>>       printk("\tcdesc_out: 0x%p\n", iop->cdesc_out);
>>       printk("\tcdesc_in: 0x%p\n", iop->cdesc_in);
>
> Thanks.
>
> This is a surprisingly common error:
>
> $ /usr/bin/git grep -P '0x\%(?!ull\b|ul\b|u\b|lu\b|llu\b|llux\b|lux\b|lx\b|lluX\b|luX\b|lX\b)[ul]*[ud]'
> arch/arm/mach-omap2/id.c:               pr_warn("%s: unknown idcode=0x%08x (hawkeye=0x%08x,rev=0x%d)\n",
> arch/cris/arch-v32/drivers/cryptocop.c: printk("\tsid: 0x%lld\n", iop->sid);
> drivers/atm/eni.c:                      return sprintf(page,"tx[%d]:    0x%ld-0x%ld "
> drivers/atm/eni.c:                              length += sprintf(page+length,"0x%ld-0x%ld "
> drivers/block/DAC960.c:         DAC960_Error("IO port 0x%d busy for Controller at\n",
> drivers/block/DAC960.c:         DAC960_Error("IO port 0x%d busy for Controller at\n",
> drivers/block/cciss.c:  dev_dbg(&h->pdev->dev, "   Max outstanding commands = 0x%d\n",
> drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:        mfc_debug(2, "stream buf addr: 0x%08lx, size: 0x%d\n",
> drivers/mfd/htc-i2cpld.c:       snprintf(client->name, I2C_NAME_SIZE, "Chip_0x%d", client->addr);
> drivers/mfd/omap-usb-host.c:                     "USB HOST Rev:0x%d not recognized, assuming %d ports\n",
> drivers/misc/sgi-gru/grumain.c: gru_dbg(grudev, "gid %d, gts %p, gms %p, ctxnum 0x%d, asidmap 0x%lx\n",
> drivers/net/ethernet/smsc/smc911x.c:    DBG(SMC_DEBUG_MISC, dev, "phy_id1=0x%x, phy_id2=0x%x phyaddr=0x%d\n",
> drivers/net/wireless/ath/ath6kl/init.c:                            "found reserved ram size ie 0x%d\n",
> drivers/net/wireless/ath/ath6kl/main.c:         ath6kl_err("failed to write 0x%x during diagnose window to 0x%d\n",
> drivers/net/wireless/iwlegacy/4965-mac.c:                       IL_ERR("failed setting tx power (0x%d).\n", ret);
> drivers/net/wireless/rtlwifi/pci.c:                              "more desc left, wake skb_queue@%d, ring->idx = %d, skb_queue_len = 0x%d\n",
> drivers/net/wireless/rtlwifi/pci.c:                              "No more TX desc@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%d\n",
> drivers/net/wireless/rtlwifi/pci.c:                      "less desc left, stop skb_queue@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%d\n",
> drivers/net/wireless/rtlwifi/rtl8192de/phy.c:            "MCSTxPowerLevelOriginalOffset[%d][%d] = 0x%ulx\n",
> drivers/net/wireless/rtlwifi/rtl8192de/phy.c:                   "ver 1 set RF-A, 5G,    0x28 = 0x%ulx !!\n", u4tmp);
> drivers/net/wireless/rtlwifi/rtl8192de/phy.c:                   "ver 3 set RF-B, 2G, 0x28 = 0x%ulx !!\n", u4tmp);
> drivers/net/wireless/rtlwifi/rtl8192de/phy.c:                   "ver 3 set RF-B, 2G, 0x28 = 0x%ulx !!\n",
> drivers/parisc/dino.c:          printk(KERN_ERR "DINO: Hey! Someone took my MMIO space (0x%ld)!\n",
> drivers/scsi/hpsa.c:    dev_info(dev, "   Max outstanding commands = 0x%d\n",
> drivers/staging/nokia_h4p/nokia_core.c:         dev_err(info->dev, "Cannot get GPIO line 0x%d",
> drivers/staging/rtl8192ee/pci.c:                                 ("more desc left, wake skb_queue@%d,ring->idx = %d, skb_queue_len = 0x%d\n",
> drivers/staging/rtl8192ee/pci.c:                                 ("No more TX desc@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%d\n",
> drivers/staging/rtl8192ee/pci.c:                         ("less desc left, stop skb_queue@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%d\n",
> drivers/staging/rtl8821ae/pci.c:                                         "skb_queue_len = 0x%d\n",
> drivers/staging/rtl8821ae/pci.c:                                  "idx = %d, skb_queue_len = 0x%d\n",
> drivers/staging/rtl8821ae/pci.c:                          "idx = %d, skb_queue_len = 0x%d\n",
> fs/cifs/cifs_debug.c:                                   "\n\tPathComponentMax: %d Status: 0x%d",
> fs/cifs/misc.c:                 cifs_dbg(FYI, "notify err 0x%d\n",
> fs/cifs/misc.c: cifs_dbg(FYI, "oplock type 0x%d level 0x%d\n",
> fs/cifs/smb2misc.c:             cifs_dbg(FYI, "lease key match, lease break 0x%d\n",
> fs/cifs/smb2misc.c:             cifs_dbg(FYI, "lease key match, lease break 0x%d\n",
> fs/cifs/smb2misc.c:     cifs_dbg(FYI, "oplock level 0x%d\n", rsp->OplockLevel);
> sound/firewire/fireworks/fireworks_proc.c:                          "phys in grp[0x%d]: type 0x%d, count 0x%d\n",
> sound/firewire/fireworks/fireworks_proc.c:                          "phys out grps[0x%d]: type 0x%d, count 0x%d\n",
> sound/pci/riptide/riptide.c:    snd_printdd("sent mixer %d: 0x%d 0x%d\n", num, rval, lval);
> sound/pci/riptide/riptide.c:    snd_printdd("got mixer %d: 0x%d 0x%d\n", num, *rval, *lval);
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Thanks,

Steve

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/1] cris: fix %d confusingly prefixed with 0x in format string
@ 2014-08-03  2:26       ` Steve French
  0 siblings, 0 replies; 22+ messages in thread
From: Steve French @ 2014-08-03  2:26 UTC (permalink / raw)
  To: Joe Perches
  Cc: Hans Wennborg, starvik, linux-cris-kernel, LKML, kernel-janitors,
	netdev, devel, linux-cifs, alsa-devel

Thanks for pointing this out.  I fixed the instances of this that you
spotted in the cifs.ko driver (pushed to cifs-2.6.git for-next) and
noted that you pointed it out in the commit message.

http://git.samba.org/?p=sfrench/cifs-2.6.git;a=commit;h=59b04c5df75bd715002bb535930ae1982a739269



On Sat, Aug 2, 2014 at 7:46 PM, Joe Perches <joe@perches.com> wrote:
> On Sat, 2014-08-02 at 15:20 -0700, Hans Wennborg wrote:
>> Signed-off-by: Hans Wennborg <hans@hanshq.net>
>> ---
>>  arch/cris/arch-v32/drivers/cryptocop.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c
> []
>> @@ -3155,7 +3155,7 @@ static void print_dma_descriptors(struct cryptocop_int_operation *iop)
>>       printk("print_dma_descriptors start\n");
>>
>>       printk("iop:\n");
>> -     printk("\tsid: 0x%lld\n", iop->sid);
>> +     printk("\tsid: 0x%llx\n", iop->sid);
>>
>>       printk("\tcdesc_out: 0x%p\n", iop->cdesc_out);
>>       printk("\tcdesc_in: 0x%p\n", iop->cdesc_in);
>
> Thanks.
>
> This is a surprisingly common error:
>
> $ /usr/bin/git grep -P '0x\%(?!ull\b|ul\b|u\b|lu\b|llu\b|llux\b|lux\b|lx\b|lluX\b|luX\b|lX\b)[ul]*[ud]'
> arch/arm/mach-omap2/id.c:               pr_warn("%s: unknown idcode=0x%08x (hawkeye=0x%08x,rev=0x%d)\n",
> arch/cris/arch-v32/drivers/cryptocop.c: printk("\tsid: 0x%lld\n", iop->sid);
> drivers/atm/eni.c:                      return sprintf(page,"tx[%d]:    0x%ld-0x%ld "
> drivers/atm/eni.c:                              length += sprintf(page+length,"0x%ld-0x%ld "
> drivers/block/DAC960.c:         DAC960_Error("IO port 0x%d busy for Controller at\n",
> drivers/block/DAC960.c:         DAC960_Error("IO port 0x%d busy for Controller at\n",
> drivers/block/cciss.c:  dev_dbg(&h->pdev->dev, "   Max outstanding commands = 0x%d\n",
> drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:        mfc_debug(2, "stream buf addr: 0x%08lx, size: 0x%d\n",
> drivers/mfd/htc-i2cpld.c:       snprintf(client->name, I2C_NAME_SIZE, "Chip_0x%d", client->addr);
> drivers/mfd/omap-usb-host.c:                     "USB HOST Rev:0x%d not recognized, assuming %d ports\n",
> drivers/misc/sgi-gru/grumain.c: gru_dbg(grudev, "gid %d, gts %p, gms %p, ctxnum 0x%d, asidmap 0x%lx\n",
> drivers/net/ethernet/smsc/smc911x.c:    DBG(SMC_DEBUG_MISC, dev, "phy_id1=0x%x, phy_id2=0x%x phyaddr=0x%d\n",
> drivers/net/wireless/ath/ath6kl/init.c:                            "found reserved ram size ie 0x%d\n",
> drivers/net/wireless/ath/ath6kl/main.c:         ath6kl_err("failed to write 0x%x during diagnose window to 0x%d\n",
> drivers/net/wireless/iwlegacy/4965-mac.c:                       IL_ERR("failed setting tx power (0x%d).\n", ret);
> drivers/net/wireless/rtlwifi/pci.c:                              "more desc left, wake skb_queue@%d, ring->idx = %d, skb_queue_len = 0x%d\n",
> drivers/net/wireless/rtlwifi/pci.c:                              "No more TX desc@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%d\n",
> drivers/net/wireless/rtlwifi/pci.c:                      "less desc left, stop skb_queue@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%d\n",
> drivers/net/wireless/rtlwifi/rtl8192de/phy.c:            "MCSTxPowerLevelOriginalOffset[%d][%d] = 0x%ulx\n",
> drivers/net/wireless/rtlwifi/rtl8192de/phy.c:                   "ver 1 set RF-A, 5G,    0x28 = 0x%ulx !!\n", u4tmp);
> drivers/net/wireless/rtlwifi/rtl8192de/phy.c:                   "ver 3 set RF-B, 2G, 0x28 = 0x%ulx !!\n", u4tmp);
> drivers/net/wireless/rtlwifi/rtl8192de/phy.c:                   "ver 3 set RF-B, 2G, 0x28 = 0x%ulx !!\n",
> drivers/parisc/dino.c:          printk(KERN_ERR "DINO: Hey! Someone took my MMIO space (0x%ld)!\n",
> drivers/scsi/hpsa.c:    dev_info(dev, "   Max outstanding commands = 0x%d\n",
> drivers/staging/nokia_h4p/nokia_core.c:         dev_err(info->dev, "Cannot get GPIO line 0x%d",
> drivers/staging/rtl8192ee/pci.c:                                 ("more desc left, wake skb_queue@%d,ring->idx = %d, skb_queue_len = 0x%d\n",
> drivers/staging/rtl8192ee/pci.c:                                 ("No more TX desc@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%d\n",
> drivers/staging/rtl8192ee/pci.c:                         ("less desc left, stop skb_queue@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%d\n",
> drivers/staging/rtl8821ae/pci.c:                                         "skb_queue_len = 0x%d\n",
> drivers/staging/rtl8821ae/pci.c:                                  "idx = %d, skb_queue_len = 0x%d\n",
> drivers/staging/rtl8821ae/pci.c:                          "idx = %d, skb_queue_len = 0x%d\n",
> fs/cifs/cifs_debug.c:                                   "\n\tPathComponentMax: %d Status: 0x%d",
> fs/cifs/misc.c:                 cifs_dbg(FYI, "notify err 0x%d\n",
> fs/cifs/misc.c: cifs_dbg(FYI, "oplock type 0x%d level 0x%d\n",
> fs/cifs/smb2misc.c:             cifs_dbg(FYI, "lease key match, lease break 0x%d\n",
> fs/cifs/smb2misc.c:             cifs_dbg(FYI, "lease key match, lease break 0x%d\n",
> fs/cifs/smb2misc.c:     cifs_dbg(FYI, "oplock level 0x%d\n", rsp->OplockLevel);
> sound/firewire/fireworks/fireworks_proc.c:                          "phys in grp[0x%d]: type 0x%d, count 0x%d\n",
> sound/firewire/fireworks/fireworks_proc.c:                          "phys out grps[0x%d]: type 0x%d, count 0x%d\n",
> sound/pci/riptide/riptide.c:    snd_printdd("sent mixer %d: 0x%d 0x%d\n", num, rval, lval);
> sound/pci/riptide/riptide.c:    snd_printdd("got mixer %d: 0x%d 0x%d\n", num, *rval, *lval);
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Thanks,

Steve

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/1] cris: fix %d confusingly prefixed with 0x in format string
@ 2014-08-03  2:26       ` Steve French
  0 siblings, 0 replies; 22+ messages in thread
From: Steve French @ 2014-08-03  2:26 UTC (permalink / raw)
  To: Joe Perches
  Cc: Hans Wennborg, starvik-VrBV9hrLPhE,
	linux-cris-kernel-VrBV9hrLPhE, LKML, kernel-janitors, netdev,
	devel, linux-cifs-u79uwXL29TY76Z2rM5mHXA,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw

Thanks for pointing this out.  I fixed the instances of this that you
spotted in the cifs.ko driver (pushed to cifs-2.6.git for-next) and
noted that you pointed it out in the commit message.

http://git.samba.org/?p=sfrench/cifs-2.6.git;a=commit;hYb04c5df75bd715002bb535930ae1982a739269



On Sat, Aug 2, 2014 at 7:46 PM, Joe Perches <joe@perches.com> wrote:
> On Sat, 2014-08-02 at 15:20 -0700, Hans Wennborg wrote:
>> Signed-off-by: Hans Wennborg <hans@hanshq.net>
>> ---
>>  arch/cris/arch-v32/drivers/cryptocop.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c
> []
>> @@ -3155,7 +3155,7 @@ static void print_dma_descriptors(struct cryptocop_int_operation *iop)
>>       printk("print_dma_descriptors start\n");
>>
>>       printk("iop:\n");
>> -     printk("\tsid: 0x%lld\n", iop->sid);
>> +     printk("\tsid: 0x%llx\n", iop->sid);
>>
>>       printk("\tcdesc_out: 0x%p\n", iop->cdesc_out);
>>       printk("\tcdesc_in: 0x%p\n", iop->cdesc_in);
>
> Thanks.
>
> This is a surprisingly common error:
>
> $ /usr/bin/git grep -P '0x\%(?!ull\b|ul\b|u\b|lu\b|llu\b|llux\b|lux\b|lx\b|lluX\b|luX\b|lX\b)[ul]*[ud]'
> arch/arm/mach-omap2/id.c:               pr_warn("%s: unknown idcode=0x%08x (hawkeye=0x%08x,rev=0x%d)\n",
> arch/cris/arch-v32/drivers/cryptocop.c: printk("\tsid: 0x%lld\n", iop->sid);
> drivers/atm/eni.c:                      return sprintf(page,"tx[%d]:    0x%ld-0x%ld "
> drivers/atm/eni.c:                              length += sprintf(page+length,"0x%ld-0x%ld "
> drivers/block/DAC960.c:         DAC960_Error("IO port 0x%d busy for Controller at\n",
> drivers/block/DAC960.c:         DAC960_Error("IO port 0x%d busy for Controller at\n",
> drivers/block/cciss.c:  dev_dbg(&h->pdev->dev, "   Max outstanding commands = 0x%d\n",
> drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c:        mfc_debug(2, "stream buf addr: 0x%08lx, size: 0x%d\n",
> drivers/mfd/htc-i2cpld.c:       snprintf(client->name, I2C_NAME_SIZE, "Chip_0x%d", client->addr);
> drivers/mfd/omap-usb-host.c:                     "USB HOST Rev:0x%d not recognized, assuming %d ports\n",
> drivers/misc/sgi-gru/grumain.c: gru_dbg(grudev, "gid %d, gts %p, gms %p, ctxnum 0x%d, asidmap 0x%lx\n",
> drivers/net/ethernet/smsc/smc911x.c:    DBG(SMC_DEBUG_MISC, dev, "phy_id1=0x%x, phy_id2=0x%x phyaddr=0x%d\n",
> drivers/net/wireless/ath/ath6kl/init.c:                            "found reserved ram size ie 0x%d\n",
> drivers/net/wireless/ath/ath6kl/main.c:         ath6kl_err("failed to write 0x%x during diagnose window to 0x%d\n",
> drivers/net/wireless/iwlegacy/4965-mac.c:                       IL_ERR("failed setting tx power (0x%d).\n", ret);
> drivers/net/wireless/rtlwifi/pci.c:                              "more desc left, wake skb_queue@%d, ring->idx = %d, skb_queue_len = 0x%d\n",
> drivers/net/wireless/rtlwifi/pci.c:                              "No more TX desc@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%d\n",
> drivers/net/wireless/rtlwifi/pci.c:                      "less desc left, stop skb_queue@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%d\n",
> drivers/net/wireless/rtlwifi/rtl8192de/phy.c:            "MCSTxPowerLevelOriginalOffset[%d][%d] = 0x%ulx\n",
> drivers/net/wireless/rtlwifi/rtl8192de/phy.c:                   "ver 1 set RF-A, 5G,    0x28 = 0x%ulx !!\n", u4tmp);
> drivers/net/wireless/rtlwifi/rtl8192de/phy.c:                   "ver 3 set RF-B, 2G, 0x28 = 0x%ulx !!\n", u4tmp);
> drivers/net/wireless/rtlwifi/rtl8192de/phy.c:                   "ver 3 set RF-B, 2G, 0x28 = 0x%ulx !!\n",
> drivers/parisc/dino.c:          printk(KERN_ERR "DINO: Hey! Someone took my MMIO space (0x%ld)!\n",
> drivers/scsi/hpsa.c:    dev_info(dev, "   Max outstanding commands = 0x%d\n",
> drivers/staging/nokia_h4p/nokia_core.c:         dev_err(info->dev, "Cannot get GPIO line 0x%d",
> drivers/staging/rtl8192ee/pci.c:                                 ("more desc left, wake skb_queue@%d,ring->idx = %d, skb_queue_len = 0x%d\n",
> drivers/staging/rtl8192ee/pci.c:                                 ("No more TX desc@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%d\n",
> drivers/staging/rtl8192ee/pci.c:                         ("less desc left, stop skb_queue@%d, ring->idx = %d, idx = %d, skb_queue_len = 0x%d\n",
> drivers/staging/rtl8821ae/pci.c:                                         "skb_queue_len = 0x%d\n",
> drivers/staging/rtl8821ae/pci.c:                                  "idx = %d, skb_queue_len = 0x%d\n",
> drivers/staging/rtl8821ae/pci.c:                          "idx = %d, skb_queue_len = 0x%d\n",
> fs/cifs/cifs_debug.c:                                   "\n\tPathComponentMax: %d Status: 0x%d",
> fs/cifs/misc.c:                 cifs_dbg(FYI, "notify err 0x%d\n",
> fs/cifs/misc.c: cifs_dbg(FYI, "oplock type 0x%d level 0x%d\n",
> fs/cifs/smb2misc.c:             cifs_dbg(FYI, "lease key match, lease break 0x%d\n",
> fs/cifs/smb2misc.c:             cifs_dbg(FYI, "lease key match, lease break 0x%d\n",
> fs/cifs/smb2misc.c:     cifs_dbg(FYI, "oplock level 0x%d\n", rsp->OplockLevel);
> sound/firewire/fireworks/fireworks_proc.c:                          "phys in grp[0x%d]: type 0x%d, count 0x%d\n",
> sound/firewire/fireworks/fireworks_proc.c:                          "phys out grps[0x%d]: type 0x%d, count 0x%d\n",
> sound/pci/riptide/riptide.c:    snd_printdd("sent mixer %d: 0x%d 0x%d\n", num, rval, lval);
> sound/pci/riptide/riptide.c:    snd_printdd("got mixer %d: 0x%d 0x%d\n", num, *rval, *lval);
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Thanks,

Steve

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/1] cris: fix %d confusingly prefixed with 0x in format string
  2014-08-03  1:19       ` Hans Wennborg
  (?)
@ 2014-08-03  6:10         ` Joe Perches
  -1 siblings, 0 replies; 22+ messages in thread
From: Joe Perches @ 2014-08-03  6:10 UTC (permalink / raw)
  To: Hans Wennborg
  Cc: devel, linux-cifs, alsa-devel, linux-cris-kernel, netdev,
	kernel-janitors, linux-kernel, starvik

On Sat, 2014-08-02 at 18:19 -0700, Hans Wennborg wrote:
> Yes, I have a patch for a bunch of these, but I figured it would be 
> easier to get it merged if I split it up. (Complete kernel newbie here.)

You as a kernel newbie did good, thanks.

A small tip would be to do all of them in a single series
cc'ing each individual patch to the appropriate maintainers
and mailing lists.

cheers, Joe

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/1] cris: fix %d confusingly prefixed with 0x in format string
@ 2014-08-03  6:10         ` Joe Perches
  0 siblings, 0 replies; 22+ messages in thread
From: Joe Perches @ 2014-08-03  6:10 UTC (permalink / raw)
  To: Hans Wennborg
  Cc: starvik, linux-cris-kernel, linux-kernel, kernel-janitors,
	netdev, devel, linux-cifs, alsa-devel

On Sat, 2014-08-02 at 18:19 -0700, Hans Wennborg wrote:
> Yes, I have a patch for a bunch of these, but I figured it would be 
> easier to get it merged if I split it up. (Complete kernel newbie here.)

You as a kernel newbie did good, thanks.

A small tip would be to do all of them in a single series
cc'ing each individual patch to the appropriate maintainers
and mailing lists.

cheers, Joe


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/1] cris: fix %d confusingly prefixed with 0x in format string
@ 2014-08-03  6:10         ` Joe Perches
  0 siblings, 0 replies; 22+ messages in thread
From: Joe Perches @ 2014-08-03  6:10 UTC (permalink / raw)
  To: Hans Wennborg
  Cc: devel, linux-cifs, alsa-devel, linux-cris-kernel, netdev,
	kernel-janitors, linux-kernel, starvik

On Sat, 2014-08-02 at 18:19 -0700, Hans Wennborg wrote:
> Yes, I have a patch for a bunch of these, but I figured it would be 
> easier to get it merged if I split it up. (Complete kernel newbie here.)

You as a kernel newbie did good, thanks.

A small tip would be to do all of them in a single series
cc'ing each individual patch to the appropriate maintainers
and mailing lists.

cheers, Joe


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/1] cris: fix %d confusingly prefixed with 0x in format string
  2014-08-03  6:10         ` Joe Perches
  (?)
@ 2014-08-04  0:25           ` Hans Wennborg
  -1 siblings, 0 replies; 22+ messages in thread
From: Hans Wennborg @ 2014-08-04  0:25 UTC (permalink / raw)
  To: Joe Perches
  Cc: starvik-VrBV9hrLPhE, linux-cris-kernel-VrBV9hrLPhE,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, kernel-janitors, netdev,
	devel, linux-cifs-u79uwXL29TY76Z2rM5mHXA,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw

On 08/02/2014 11:10 PM, Joe Perches wrote:
> On Sat, 2014-08-02 at 18:19 -0700, Hans Wennborg wrote:
>> Yes, I have a patch for a bunch of these, but I figured it would be
>> easier to get it merged if I split it up. (Complete kernel newbie here.)
>
> You as a kernel newbie did good, thanks.
>
> A small tip would be to do all of them in a single series
> cc'ing each individual patch to the appropriate maintainers
> and mailing lists.

Thanks for the advice! I have split up and sent out the big patch as a 
series, with hopefully the right folks CC'd.

  - Hans

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/1] cris: fix %d confusingly prefixed with 0x in format string
@ 2014-08-04  0:25           ` Hans Wennborg
  0 siblings, 0 replies; 22+ messages in thread
From: Hans Wennborg @ 2014-08-04  0:25 UTC (permalink / raw)
  To: Joe Perches
  Cc: starvik, linux-cris-kernel, linux-kernel, kernel-janitors,
	netdev, devel, linux-cifs, alsa-devel

On 08/02/2014 11:10 PM, Joe Perches wrote:
> On Sat, 2014-08-02 at 18:19 -0700, Hans Wennborg wrote:
>> Yes, I have a patch for a bunch of these, but I figured it would be
>> easier to get it merged if I split it up. (Complete kernel newbie here.)
>
> You as a kernel newbie did good, thanks.
>
> A small tip would be to do all of them in a single series
> cc'ing each individual patch to the appropriate maintainers
> and mailing lists.

Thanks for the advice! I have split up and sent out the big patch as a 
series, with hopefully the right folks CC'd.

  - Hans

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/1] cris: fix %d confusingly prefixed with 0x in format string
@ 2014-08-04  0:25           ` Hans Wennborg
  0 siblings, 0 replies; 22+ messages in thread
From: Hans Wennborg @ 2014-08-04  0:25 UTC (permalink / raw)
  To: Joe Perches
  Cc: starvik-VrBV9hrLPhE, linux-cris-kernel-VrBV9hrLPhE,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, kernel-janitors, netdev,
	devel, linux-cifs-u79uwXL29TY76Z2rM5mHXA,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw

On 08/02/2014 11:10 PM, Joe Perches wrote:
> On Sat, 2014-08-02 at 18:19 -0700, Hans Wennborg wrote:
>> Yes, I have a patch for a bunch of these, but I figured it would be
>> easier to get it merged if I split it up. (Complete kernel newbie here.)
>
> You as a kernel newbie did good, thanks.
>
> A small tip would be to do all of them in a single series
> cc'ing each individual patch to the appropriate maintainers
> and mailing lists.

Thanks for the advice! I have split up and sent out the big patch as a 
series, with hopefully the right folks CC'd.

  - Hans

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/1] cris: fix %d confusingly prefixed with 0x in format string
  2014-08-04  0:25           ` Hans Wennborg
  (?)
@ 2014-08-04  0:33             ` Joe Perches
  -1 siblings, 0 replies; 22+ messages in thread
From: Joe Perches @ 2014-08-04  0:33 UTC (permalink / raw)
  To: Hans Wennborg
  Cc: devel, linux-cifs, alsa-devel, linux-cris-kernel, netdev,
	kernel-janitors, linux-kernel, starvik

On Sun, 2014-08-03 at 17:25 -0700, Hans Wennborg wrote:
> On 08/02/2014 11:10 PM, Joe Perches wrote:
> > On Sat, 2014-08-02 at 18:19 -0700, Hans Wennborg wrote:
> >> Yes, I have a patch for a bunch of these, but I figured it would be
> >> easier to get it merged if I split it up. (Complete kernel newbie here.)
> >
> > You as a kernel newbie did good, thanks.
> >
> > A small tip would be to do all of them in a single series
> > cc'ing each individual patch to the appropriate maintainers
> > and mailing lists.
> 
> Thanks for the advice! I have split up and sent out the big patch as a 
> series, with hopefully the right folks CC'd.

Another nice thing to do is to use git format-patch --cover-letter
so that you can use a [PATCH 0/n] introductory description too.

Other than that, nice job, thanks.

Perhaps now you can do the "0x%u" variants.

$ /usr/bin/git grep -P '0x\%(?!ullx\b|ullX\b|llux\b|lux\b|ulx\b|ulX\b|lx\b|lluX\b|luX\b|lX\b)[ul]*[u]'
drivers/iommu/arm-smmu.c:                                   "Unexpected context fault (fsr 0x%u)\n",
drivers/net/vmxnet3/vmxnet3_drv.c:                              "txd[%u]: 0x%llu %u %u\n",
drivers/net/wireless/mwifiex/cfg80211.c:                wiphy_dbg(wiphy, "info: ongoing ROC, cookie = 0x%llu\n",
drivers/pinctrl/pinctrl-at91.c:         dev_dbg(dev, "pio%c%d configured as periph%c with conf = 0x%lu\n",
drivers/pinctrl/pinctrl-at91.c:         dev_dbg(dev, "pio%c%d configured as gpio with conf = 0x%lu\n",
drivers/scsi/cxgbi/libcxgbi.c:          "csk 0x%p,%u,0x%lu,%u, seq %u, wup %u, thre %u, %u.\n",
drivers/scsi/qla2xxx/qla_target.c:          "dif check TGT cdb 0x%x lba 0x%llu: [Actual|Expected] Ref Tag[0x%x|0x%x], App Tag [0x%x|0x%x], Guard [0x%x|0x%x]\n",
drivers/usb/musb/ux500_dma.c:           "packet_sz=%d, mode=%d, dma_addr=0x%llu, len=%d is_tx=%d\n",
fs/exofs/dir.c:         "offset=%lu, inode=0x%llu, rec_len=%d, name_len=%d\n",
fs/xfs/xfs_discard.c:    "discard failed for extent [0x%llu,%u], error %d",
sound/soc/atmel/atmel_ssc_dai.c:        pr_debug("atmel_ssc_startup: SSC_SR=0x%u\n",

There are some more with specific format lengths too:

arch/sparc/kernel/smp_32.c:             printk(KERN_NOTICE "No MID found for CPU%d at node 0x%08d", id, cpu_node);
drivers/mfd/rtsx_usb.c: dev_dbg(&intf->dev, "%s called with pm message 0x%04u\n",
drivers/net/wireless/rtlwifi/rtl8192de/fw.c:             "Polling FW ready fail!! REG_MCUFWDL:0x%08ul\n",
drivers/tty/moxa.c:                     printk(KERN_INFO "MOXA isa board found at 0x%.8lu and "

cheers, Joe

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/1] cris: fix %d confusingly prefixed with 0x in format string
@ 2014-08-04  0:33             ` Joe Perches
  0 siblings, 0 replies; 22+ messages in thread
From: Joe Perches @ 2014-08-04  0:33 UTC (permalink / raw)
  To: Hans Wennborg
  Cc: starvik, linux-cris-kernel, linux-kernel, kernel-janitors,
	netdev, devel, linux-cifs, alsa-devel

On Sun, 2014-08-03 at 17:25 -0700, Hans Wennborg wrote:
> On 08/02/2014 11:10 PM, Joe Perches wrote:
> > On Sat, 2014-08-02 at 18:19 -0700, Hans Wennborg wrote:
> >> Yes, I have a patch for a bunch of these, but I figured it would be
> >> easier to get it merged if I split it up. (Complete kernel newbie here.)
> >
> > You as a kernel newbie did good, thanks.
> >
> > A small tip would be to do all of them in a single series
> > cc'ing each individual patch to the appropriate maintainers
> > and mailing lists.
> 
> Thanks for the advice! I have split up and sent out the big patch as a 
> series, with hopefully the right folks CC'd.

Another nice thing to do is to use git format-patch --cover-letter
so that you can use a [PATCH 0/n] introductory description too.

Other than that, nice job, thanks.

Perhaps now you can do the "0x%u" variants.

$ /usr/bin/git grep -P '0x\%(?!ullx\b|ullX\b|llux\b|lux\b|ulx\b|ulX\b|lx\b|lluX\b|luX\b|lX\b)[ul]*[u]'
drivers/iommu/arm-smmu.c:                                   "Unexpected context fault (fsr 0x%u)\n",
drivers/net/vmxnet3/vmxnet3_drv.c:                              "txd[%u]: 0x%llu %u %u\n",
drivers/net/wireless/mwifiex/cfg80211.c:                wiphy_dbg(wiphy, "info: ongoing ROC, cookie = 0x%llu\n",
drivers/pinctrl/pinctrl-at91.c:         dev_dbg(dev, "pio%c%d configured as periph%c with conf = 0x%lu\n",
drivers/pinctrl/pinctrl-at91.c:         dev_dbg(dev, "pio%c%d configured as gpio with conf = 0x%lu\n",
drivers/scsi/cxgbi/libcxgbi.c:          "csk 0x%p,%u,0x%lu,%u, seq %u, wup %u, thre %u, %u.\n",
drivers/scsi/qla2xxx/qla_target.c:          "dif check TGT cdb 0x%x lba 0x%llu: [Actual|Expected] Ref Tag[0x%x|0x%x], App Tag [0x%x|0x%x], Guard [0x%x|0x%x]\n",
drivers/usb/musb/ux500_dma.c:           "packet_sz=%d, mode=%d, dma_addr=0x%llu, len=%d is_tx=%d\n",
fs/exofs/dir.c:         "offset=%lu, inode=0x%llu, rec_len=%d, name_len=%d\n",
fs/xfs/xfs_discard.c:    "discard failed for extent [0x%llu,%u], error %d",
sound/soc/atmel/atmel_ssc_dai.c:        pr_debug("atmel_ssc_startup: SSC_SR=0x%u\n",

There are some more with specific format lengths too:

arch/sparc/kernel/smp_32.c:             printk(KERN_NOTICE "No MID found for CPU%d at node 0x%08d", id, cpu_node);
drivers/mfd/rtsx_usb.c: dev_dbg(&intf->dev, "%s called with pm message 0x%04u\n",
drivers/net/wireless/rtlwifi/rtl8192de/fw.c:             "Polling FW ready fail!! REG_MCUFWDL:0x%08ul\n",
drivers/tty/moxa.c:                     printk(KERN_INFO "MOXA isa board found at 0x%.8lu and "

cheers, Joe


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/1] cris: fix %d confusingly prefixed with 0x in format string
@ 2014-08-04  0:33             ` Joe Perches
  0 siblings, 0 replies; 22+ messages in thread
From: Joe Perches @ 2014-08-04  0:33 UTC (permalink / raw)
  To: Hans Wennborg
  Cc: devel, linux-cifs, alsa-devel, linux-cris-kernel, netdev,
	kernel-janitors, linux-kernel, starvik

On Sun, 2014-08-03 at 17:25 -0700, Hans Wennborg wrote:
> On 08/02/2014 11:10 PM, Joe Perches wrote:
> > On Sat, 2014-08-02 at 18:19 -0700, Hans Wennborg wrote:
> >> Yes, I have a patch for a bunch of these, but I figured it would be
> >> easier to get it merged if I split it up. (Complete kernel newbie here.)
> >
> > You as a kernel newbie did good, thanks.
> >
> > A small tip would be to do all of them in a single series
> > cc'ing each individual patch to the appropriate maintainers
> > and mailing lists.
> 
> Thanks for the advice! I have split up and sent out the big patch as a 
> series, with hopefully the right folks CC'd.

Another nice thing to do is to use git format-patch --cover-letter
so that you can use a [PATCH 0/n] introductory description too.

Other than that, nice job, thanks.

Perhaps now you can do the "0x%u" variants.

$ /usr/bin/git grep -P '0x\%(?!ullx\b|ullX\b|llux\b|lux\b|ulx\b|ulX\b|lx\b|lluX\b|luX\b|lX\b)[ul]*[u]'
drivers/iommu/arm-smmu.c:                                   "Unexpected context fault (fsr 0x%u)\n",
drivers/net/vmxnet3/vmxnet3_drv.c:                              "txd[%u]: 0x%llu %u %u\n",
drivers/net/wireless/mwifiex/cfg80211.c:                wiphy_dbg(wiphy, "info: ongoing ROC, cookie = 0x%llu\n",
drivers/pinctrl/pinctrl-at91.c:         dev_dbg(dev, "pio%c%d configured as periph%c with conf = 0x%lu\n",
drivers/pinctrl/pinctrl-at91.c:         dev_dbg(dev, "pio%c%d configured as gpio with conf = 0x%lu\n",
drivers/scsi/cxgbi/libcxgbi.c:          "csk 0x%p,%u,0x%lu,%u, seq %u, wup %u, thre %u, %u.\n",
drivers/scsi/qla2xxx/qla_target.c:          "dif check TGT cdb 0x%x lba 0x%llu: [Actual|Expected] Ref Tag[0x%x|0x%x], App Tag [0x%x|0x%x], Guard [0x%x|0x%x]\n",
drivers/usb/musb/ux500_dma.c:           "packet_sz=%d, mode=%d, dma_addr=0x%llu, len=%d is_tx=%d\n",
fs/exofs/dir.c:         "offset=%lu, inode=0x%llu, rec_len=%d, name_len=%d\n",
fs/xfs/xfs_discard.c:    "discard failed for extent [0x%llu,%u], error %d",
sound/soc/atmel/atmel_ssc_dai.c:        pr_debug("atmel_ssc_startup: SSC_SR=0x%u\n",

There are some more with specific format lengths too:

arch/sparc/kernel/smp_32.c:             printk(KERN_NOTICE "No MID found for CPU%d at node 0x%08d", id, cpu_node);
drivers/mfd/rtsx_usb.c: dev_dbg(&intf->dev, "%s called with pm message 0x%04u\n",
drivers/net/wireless/rtlwifi/rtl8192de/fw.c:             "Polling FW ready fail!! REG_MCUFWDL:0x%08ul\n",
drivers/tty/moxa.c:                     printk(KERN_INFO "MOXA isa board found at 0x%.8lu and "

cheers, Joe


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH] checkpatch: Add test for printf formats with 0x that emit decimal
  2014-08-04  0:33             ` Joe Perches
  (?)
  (?)
@ 2014-08-04  2:50             ` Joe Perches
  2014-08-04  3:03               ` Hans Wennborg
  -1 siblings, 1 reply; 22+ messages in thread
From: Joe Perches @ 2014-08-04  2:50 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, Hans Wennborg, Andy Whitcroft

0x%<foo> should be used to emit hexadecimal values.

Uses of 0x%[udi] emit decimal values but these should
probably instead use 0x%x variants.

Warn on these uses.

Signed-off-by: Joe Perches <joe@perches.com>
Noticed-by: Hans Wennborg <hans@hanshq.net>
---
 scripts/checkpatch.pl | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index da74e65..0178fe0 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -4985,6 +4985,10 @@ sub process {
 		while ($line =~ /(?:^|")([X\t]*)(?:"|$)/g) {
 			$string = substr($rawline, $-[1], $+[1] - $-[1]);
 			$string =~ s/%%/__/g;
+			if ($string =~ /(0x(?<!%)%[0-9.\*]*[Ll]*[udi])(?![xX])/) {
+				WARN("PRINTF_HEX_WITH_DECIMAL",
+				     "Using printf format $1 emits a decimal not hexadecimal value\n" . $herecurr);
+			}
 			if ($string =~ /(?<!%)%L[udi]/) {
 				WARN("PRINTF_L",
 				     "\%Ld/%Lu are not-standard C, use %lld/%llu\n" . $herecurr);



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [PATCH] checkpatch: Add test for printf formats with 0x that emit decimal
  2014-08-04  2:50             ` [PATCH] checkpatch: Add test for printf formats with 0x that emit decimal Joe Perches
@ 2014-08-04  3:03               ` Hans Wennborg
  2014-08-04  3:46                 ` Joe Perches
  0 siblings, 1 reply; 22+ messages in thread
From: Hans Wennborg @ 2014-08-04  3:03 UTC (permalink / raw)
  To: Joe Perches, Andrew Morton; +Cc: linux-kernel, Andy Whitcroft

On 08/03/2014 07:50 PM, Joe Perches wrote:
> 0x%<foo> should be used to emit hexadecimal values.
>
> Uses of 0x%[udi] emit decimal values but these should
> probably instead use 0x%x variants.
>
> Warn on these uses.

Good idea!

>
> Signed-off-by: Joe Perches <joe@perches.com>
> Noticed-by: Hans Wennborg <hans@hanshq.net>
> ---
>   scripts/checkpatch.pl | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index da74e65..0178fe0 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -4985,6 +4985,10 @@ sub process {
>   		while ($line =~ /(?:^|")([X\t]*)(?:"|$)/g) {
>   			$string = substr($rawline, $-[1], $+[1] - $-[1]);
>   			$string =~ s/%%/__/g;
> +			if ($string =~ /(0x(?<!%)%[0-9.\*]*[Ll]*[udi])(?![xX])/) {

Maybe the regex should have a \b to check for a word boundary before the 
0 to avoid matching things like "800x%d"? (I don't know if that occurs 
in the kernel, but I've seen it elsewhere.)

  - Hans

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH] checkpatch: Add test for printf formats with 0x that emit decimal
  2014-08-04  3:03               ` Hans Wennborg
@ 2014-08-04  3:46                 ` Joe Perches
  2014-08-05  1:17                   ` Hans Wennborg
  0 siblings, 1 reply; 22+ messages in thread
From: Joe Perches @ 2014-08-04  3:46 UTC (permalink / raw)
  To: Hans Wennborg; +Cc: Andrew Morton, linux-kernel, Andy Whitcroft

On Sun, 2014-08-03 at 20:03 -0700, Hans Wennborg wrote:
> On 08/03/2014 07:50 PM, Joe Perches wrote:
> > 0x%<foo> should be used to emit hexadecimal values.
> >
> > Uses of 0x%[udi] emit decimal values but these should
> > probably instead use 0x%x variants.
> >
> > Warn on these uses.
> 
> Good idea!
[]
> > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> > @@ -4985,6 +4985,10 @@ sub process {
> >   		while ($line =~ /(?:^|")([X\t]*)(?:"|$)/g) {
> >   			$string = substr($rawline, $-[1], $+[1] - $-[1]);
> >   			$string =~ s/%%/__/g;
> > +			if ($string =~ /(0x(?<!%)%[0-9.\*]*[Ll]*[udi])(?![xX])/) {
> 
> Maybe the regex should have a \b to check for a word boundary before the 
> 0 to avoid matching things like "800x%d"? (I don't know if that occurs 
> in the kernel, but I've seen it elsewhere.)

Maybe.

Code it to do the appropriate thing and test it too.
See if there any other cases that should be emitted.

cheers, Joe



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH] checkpatch: Add test for printf formats with 0x that emit decimal
  2014-08-04  3:46                 ` Joe Perches
@ 2014-08-05  1:17                   ` Hans Wennborg
  0 siblings, 0 replies; 22+ messages in thread
From: Hans Wennborg @ 2014-08-05  1:17 UTC (permalink / raw)
  To: Joe Perches; +Cc: Andrew Morton, linux-kernel, Andy Whitcroft

On 08/03/2014 08:46 PM, Joe Perches wrote:
> On Sun, 2014-08-03 at 20:03 -0700, Hans Wennborg wrote:
>> On 08/03/2014 07:50 PM, Joe Perches wrote:
>>> 0x%<foo> should be used to emit hexadecimal values.
>>>
>>> Uses of 0x%[udi] emit decimal values but these should
>>> probably instead use 0x%x variants.
>>>
>>> Warn on these uses.
>>
>> Good idea!
> []
>>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> []
>>> @@ -4985,6 +4985,10 @@ sub process {
>>>    		while ($line =~ /(?:^|")([X\t]*)(?:"|$)/g) {
>>>    			$string = substr($rawline, $-[1], $+[1] - $-[1]);
>>>    			$string =~ s/%%/__/g;
>>> +			if ($string =~ /(0x(?<!%)%[0-9.\*]*[Ll]*[udi])(?![xX])/) {
>>
>> Maybe the regex should have a \b to check for a word boundary before the
>> 0 to avoid matching things like "800x%d"? (I don't know if that occurs
>> in the kernel, but I've seen it elsewhere.)
>
> Maybe.
>
> Code it to do the appropriate thing and test it too.
> See if there any other cases that should be emitted.

I grepped with your regex over the code and didn't get any false 
positives, so it seems fine. Feel free to ignore my previous comment.

Thanks,
Hans

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2014-08-05  1:17 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-02 22:20 [PATCH 1/1] cris: fix %d confusingly prefixed with 0x in format string Hans Wennborg
     [not found] ` <1407018043-648-1-git-send-email-hans-7z9IcJk4adCsTnJN9+BGXg@public.gmane.org>
2014-08-03  0:46   ` Joe Perches
2014-08-03  0:46     ` Joe Perches
2014-08-03  0:46     ` Joe Perches
2014-08-03  1:19     ` Hans Wennborg
2014-08-03  1:19       ` Hans Wennborg
2014-08-03  6:10       ` Joe Perches
2014-08-03  6:10         ` Joe Perches
2014-08-03  6:10         ` Joe Perches
2014-08-04  0:25         ` Hans Wennborg
2014-08-04  0:25           ` Hans Wennborg
2014-08-04  0:25           ` Hans Wennborg
2014-08-04  0:33           ` Joe Perches
2014-08-04  0:33             ` Joe Perches
2014-08-04  0:33             ` Joe Perches
2014-08-04  2:50             ` [PATCH] checkpatch: Add test for printf formats with 0x that emit decimal Joe Perches
2014-08-04  3:03               ` Hans Wennborg
2014-08-04  3:46                 ` Joe Perches
2014-08-05  1:17                   ` Hans Wennborg
2014-08-03  2:26     ` [PATCH 1/1] cris: fix %d confusingly prefixed with 0x in format string Steve French
2014-08-03  2:26       ` Steve French
2014-08-03  2:26       ` Steve French

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.