* [PATCH] Fix compile warning with ATA_DEBUG enabled
[not found] <1516936551-20986-1-git-send-email-zhangshaokun@hisilicon.com>
@ 2018-01-26 3:21 ` dongbo (E)
0 siblings, 0 replies; 3+ messages in thread
From: dongbo (E) @ 2018-01-26 3:21 UTC (permalink / raw)
To: tj; +Cc: linux-ide, linux-kernel, Linuxarm
From: Dong Bo <dongbo4@huawei.com>
This fixs the following comile warnings with ATA_DEBUG enabled,
which detected by Linaro GCC 5.2-2015.11:
In file included from ./include/linux/printk.h:7:0,
from ./include/linux/kernel.h:14,
from ./include/asm-generic/bug.h:16,
from ./arch/arm64/include/asm/bug.h:37,
from ./include/linux/bug.h:5,
from ./include/linux/mmdebug.h:5,
from ./include/linux/gfp.h:5,
from ./include/linux/slab.h:15,
from drivers/ata/libata-scsi.c:36:
drivers/ata/libata-scsi.c: In function 'ata_scsi_dump_cdb':
./include/linux/kern_levels.h:5:18: warning: format '%d' expects
argument of type 'int', but argument 6 has type 'u64 {aka long
long unsigned int}' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
./include/linux/kern_levels.h:11:18: note: in expansion of macro
'KERN_SOH'
#define KERN_ERR KERN_SOH "3" /* error conditions */
^
./include/linux/libata.h:65:38: note: in expansion of macro 'KERN_ERR'
#define DPRINTK(fmt, args...) printk(KERN_ERR "%s: " fmt,
__func__, ## args)
^
drivers/ata/libata-scsi.c:4284:2: note: in expansion of macro 'DPRINTK'
DPRINTK("CDB (%u:%d,%d,%d) %9ph\n",
^
Signed-off-by: Dong Bo <dongbo4@huawei.com>
---
drivers/ata/libata-scsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 66be961..214ecb6 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -4282,7 +4282,7 @@ static inline void ata_scsi_dump_cdb(struct ata_port *ap,
#ifdef ATA_DEBUG
struct scsi_device *scsidev = cmd->device;
- DPRINTK("CDB (%u:%d,%d,%d) %9ph\n",
+ DPRINTK("CDB (%u:%u,%u,%lld) %9ph\n",
ap->print_id,
scsidev->channel, scsidev->id, scsidev->lun,
cmd->cmnd);
--
1.9.1
.
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] Fix compile warning with ATA_DEBUG enabled
@ 2018-01-26 3:21 ` dongbo (E)
0 siblings, 0 replies; 3+ messages in thread
From: dongbo (E) @ 2018-01-26 3:21 UTC (permalink / raw)
To: tj; +Cc: linux-ide, linux-kernel, Linuxarm
From: Dong Bo <dongbo4@huawei.com>
This fixs the following comile warnings with ATA_DEBUG enabled,
which detected by Linaro GCC 5.2-2015.11:
In file included from ./include/linux/printk.h:7:0,
from ./include/linux/kernel.h:14,
from ./include/asm-generic/bug.h:16,
from ./arch/arm64/include/asm/bug.h:37,
from ./include/linux/bug.h:5,
from ./include/linux/mmdebug.h:5,
from ./include/linux/gfp.h:5,
from ./include/linux/slab.h:15,
from drivers/ata/libata-scsi.c:36:
drivers/ata/libata-scsi.c: In function 'ata_scsi_dump_cdb':
./include/linux/kern_levels.h:5:18: warning: format '%d' expects
argument of type 'int', but argument 6 has type 'u64 {aka long
long unsigned int}' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
./include/linux/kern_levels.h:11:18: note: in expansion of macro
'KERN_SOH'
#define KERN_ERR KERN_SOH "3" /* error conditions */
^
./include/linux/libata.h:65:38: note: in expansion of macro 'KERN_ERR'
#define DPRINTK(fmt, args...) printk(KERN_ERR "%s: " fmt,
__func__, ## args)
^
drivers/ata/libata-scsi.c:4284:2: note: in expansion of macro 'DPRINTK'
DPRINTK("CDB (%u:%d,%d,%d) %9ph\n",
^
Signed-off-by: Dong Bo <dongbo4@huawei.com>
---
drivers/ata/libata-scsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 66be961..214ecb6 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -4282,7 +4282,7 @@ static inline void ata_scsi_dump_cdb(struct ata_port *ap,
#ifdef ATA_DEBUG
struct scsi_device *scsidev = cmd->device;
- DPRINTK("CDB (%u:%d,%d,%d) %9ph\n",
+ DPRINTK("CDB (%u:%u,%u,%lld) %9ph\n",
ap->print_id,
scsidev->channel, scsidev->id, scsidev->lun,
cmd->cmnd);
--
1.9.1
.
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix compile warning with ATA_DEBUG enabled
2018-01-26 3:21 ` dongbo (E)
(?)
@ 2018-02-12 17:00 ` Tejun Heo
-1 siblings, 0 replies; 3+ messages in thread
From: Tejun Heo @ 2018-02-12 17:00 UTC (permalink / raw)
To: dongbo (E); +Cc: linux-ide, linux-kernel, Linuxarm
On Fri, Jan 26, 2018 at 11:21:49AM +0800, dongbo (E) wrote:
> From: Dong Bo <dongbo4@huawei.com>
>
> This fixs the following comile warnings with ATA_DEBUG enabled,
> which detected by Linaro GCC 5.2-2015.11:
>
> In file included from ./include/linux/printk.h:7:0,
> from ./include/linux/kernel.h:14,
> from ./include/asm-generic/bug.h:16,
> from ./arch/arm64/include/asm/bug.h:37,
> from ./include/linux/bug.h:5,
> from ./include/linux/mmdebug.h:5,
> from ./include/linux/gfp.h:5,
> from ./include/linux/slab.h:15,
> from drivers/ata/libata-scsi.c:36:
> drivers/ata/libata-scsi.c: In function 'ata_scsi_dump_cdb':
> ./include/linux/kern_levels.h:5:18: warning: format '%d' expects
> argument of type 'int', but argument 6 has type 'u64 {aka long
> long unsigned int}' [-Wformat=]
> #define KERN_SOH "\001" /* ASCII Start Of Header */
> ^
> ./include/linux/kern_levels.h:11:18: note: in expansion of macro
> 'KERN_SOH'
> #define KERN_ERR KERN_SOH "3" /* error conditions */
> ^
> ./include/linux/libata.h:65:38: note: in expansion of macro 'KERN_ERR'
> #define DPRINTK(fmt, args...) printk(KERN_ERR "%s: " fmt,
> __func__, ## args)
> ^
> drivers/ata/libata-scsi.c:4284:2: note: in expansion of macro 'DPRINTK'
> DPRINTK("CDB (%u:%d,%d,%d) %9ph\n",
> ^
>
> Signed-off-by: Dong Bo <dongbo4@huawei.com>
Path didn't apply, probalby because of the tailing part. Hand-applied
to libata/for-4.16-fixes and trimmed the description a bit.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-02-12 17:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1516936551-20986-1-git-send-email-zhangshaokun@hisilicon.com>
2018-01-26 3:21 ` [PATCH] Fix compile warning with ATA_DEBUG enabled dongbo (E)
2018-01-26 3:21 ` dongbo (E)
2018-02-12 17:00 ` Tejun Heo
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.