Re: [alsa-devel] [PATCH 1/1] cris: fix %d confusingly prefixed with 0x in format string
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);
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
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
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
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
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=59b04c5df75bd715002b...
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
participants (3)
-
Hans Wennborg
-
Joe Perches
-
Steve French