Arnd Bergmann 038d710fca scsi: qla2xxx: avoid printf format warning
Depending on the target architecture and configuration, both phys_addr_t
and dma_addr_t may be smaller than 'long long', so we get a warning when
printing either of them using the %llx format string:

drivers/scsi/qla2xxx/qla_iocb.c: In function 'qla24xx_walk_and_build_prot_sglist':
drivers/scsi/qla2xxx/qla_iocb.c:1140:46: error: format '%llx' expects argument of type 'long long unsigned int', but argument 6 has type 'dma_addr_t' {aka 'unsigned int'} [-Werror=format=]
         "%s: page boundary crossing (phys=%llx len=%x)\n",
                                           ~~~^
                                           %x
         __func__, sle_phys, sg->length);
                   ~~~~~~~~
drivers/scsi/qla2xxx/qla_iocb.c:1180:29: error: format '%llx' expects argument of type 'long long unsigned int', but argument 7 has type 'dma_addr_t' {aka 'unsigned int'} [-Werror=format=]
        "%s: sg[%x] (phys=%llx sglen=%x) ldma_sg_len: %x dif_bundl_len: %x ldma_needed: %x\n",
                          ~~~^

There are special %pad and %pap format strings in Linux that we could use
here, but since the driver already does 64-bit arithmetic on the values,
using a plain 'u64' seems more consistent here.

Note: A possible related issue may be that the driver possibly checks the
wrong kind of overflow: when an IOMMU is in use, buffers that cross a
32-bit boundary in physical addresses would still be mapped into dma
addresses within the low 4GB space, so I suspect that we actually want to
check sg_dma_address() instead of sg_phys() here.

Fixes: 50b812755e97 ("scsi: qla2xxx: Fix DMA error when the DIF sg buffer crosses 4GB boundary")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2019-03-06 19:26:45 -05:00
..
2018-12-18 23:19:21 -05:00
2018-12-18 23:19:21 -05:00
2018-12-18 23:19:21 -05:00
2018-06-19 22:02:25 -04:00
2018-12-18 23:19:21 -05:00
2019-01-08 21:58:35 -05:00
2019-01-08 21:58:35 -05:00
2019-01-08 21:58:35 -05:00
2018-12-18 23:19:21 -05:00
2018-12-28 14:48:06 -08:00
2018-12-18 23:13:12 -05:00
2018-12-18 23:19:21 -05:00
2018-11-06 21:31:28 -05:00
2019-02-05 21:28:52 -05:00
2018-12-18 23:19:21 -05:00
2019-02-05 21:28:52 -05:00
2018-12-18 23:13:12 -05:00
2018-12-28 14:48:06 -08:00
2018-12-18 23:13:12 -05:00
2019-02-27 09:19:24 -05:00
2018-11-07 13:42:32 -07:00
2018-11-07 13:42:32 -07:00
2018-11-07 13:42:32 -07:00
2018-12-28 14:48:06 -08:00
2018-06-04 07:58:06 -07:00
2019-02-27 09:19:24 -05:00
2018-06-19 22:02:25 -04:00
2019-02-12 22:33:00 -05:00
2018-06-12 16:19:22 -07:00
2018-12-18 23:19:21 -05:00
2019-02-05 21:29:49 -05:00
2018-12-18 23:19:21 -05:00
2018-12-28 14:48:06 -08:00
2018-12-28 14:48:06 -08:00