]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
scsi: nsp32: Correct expected types in debug print formatting
authorLee Jones <lee.jones@linaro.org>
Wed, 17 Mar 2021 09:11:25 +0000 (09:11 +0000)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 19 Mar 2021 02:52:30 +0000 (22:52 -0400)
Fixes the following W=1 kernel build warning(s):

 drivers/scsi/nsp32.c: In function ‘nsp32_setup_sg_table’:
 drivers/scsi/nsp32.c:879:6: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘unsigned int’ [-Wformat=]
 drivers/scsi/nsp32.c:280:69: note: in definition of macro ‘nsp32_msg’
 drivers/scsi/nsp32.c:879:52: note: format string is defined here
 drivers/scsi/nsp32.c: In function ‘nsp32_detect’:
 drivers/scsi/nsp32.c:2719:6: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘int’ [-Wformat=]
 drivers/scsi/nsp32.c:280:69: note: in definition of macro ‘nsp32_msg’
 drivers/scsi/nsp32.c:2719:22: note: format string is defined here
 drivers/scsi/nsp32.c:2719:6: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘int’ [-Wformat=]
 drivers/scsi/nsp32.c:280:69: note: in definition of macro ‘nsp32_msg’
 drivers/scsi/nsp32.c:2719:28: note: format string is defined here
 drivers/scsi/nsp32.c: In function ‘nsp32_suspend’:
 drivers/scsi/nsp32.c:3267:23: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type ‘pm_message_t’ {aka ‘struct pm_message’} [-Wformat=]
 drivers/scsi/nsp32.c:280:69: note: in definition of macro ‘nsp32_msg’
 drivers/scsi/nsp32.c:3267:56: note: format string is defined here

Link: https://lore.kernel.org/r/20210317091125.2910058-9-lee.jones@linaro.org
Cc: GOTO Masanori <gotom@debian.or.jp>
Cc: YOKOTA Hiroshi <yokota@netlab.is.tsukuba.ac.jp>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: gotom@debian.org
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/nsp32.c

index 54abda4d07c648827a6f00c90b7b35ecaf4c59e8..134bbd2d8b6673d31d4ebb09c3c23aadee065b86 100644 (file)
@@ -876,7 +876,7 @@ static int nsp32_setup_sg_table(struct scsi_cmnd *SCpnt)
 
                        if (le32_to_cpu(sgt[i].len) > 0x10000) {
                                nsp32_msg(KERN_ERR,
-                                       "can't transfer over 64KB at a time, size=0x%lx", le32_to_cpu(sgt[i].len));
+                                       "can't transfer over 64KB at a time, size=0x%x", le32_to_cpu(sgt[i].len));
                                return FALSE;
                        }
                        nsp32_dbg(NSP32_DEBUG_SGLIST,
@@ -2716,7 +2716,7 @@ static int nsp32_detect(struct pci_dev *pdev)
        res = request_region(host->io_port, host->n_io_port, "nsp32");
        if (res == NULL) {
                nsp32_msg(KERN_ERR, 
-                         "I/O region 0x%lx+0x%lx is already used",
+                         "I/O region 0x%x+0x%x is already used",
                          data->BaseAddress, data->NumAddress);
                goto free_irq;
         }
@@ -3264,7 +3264,8 @@ static int nsp32_suspend(struct pci_dev *pdev, pm_message_t state)
 {
        struct Scsi_Host *host = pci_get_drvdata(pdev);
 
-       nsp32_msg(KERN_INFO, "pci-suspend: pdev=0x%p, state=%ld, slot=%s, host=0x%p", pdev, state, pci_name(pdev), host);
+       nsp32_msg(KERN_INFO, "pci-suspend: pdev=0x%p, state.event=%x, slot=%s, host=0x%p",
+                 pdev, state.event, pci_name(pdev), host);
 
        pci_save_state     (pdev);
        pci_disable_device (pdev);