]> git.hungrycats.org Git - linux/commitdiff
scsi-tgt: fix type conversion warning
authorArnd Bergmann <arnd@arndb.de>
Fri, 5 May 2017 19:46:51 +0000 (21:46 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 11 Nov 2017 13:33:48 +0000 (13:33 +0000)
In 3.16-stable, we get this warning:

drivers/scsi/scsi_tgt_if.c:289:36: warning: passing argument 1 of 'virt_to_phys' makes pointer from integer without a cast [-Wint-conversion]

The driver was removed in 3.17, so the bug was never fixed, but the code
works correctly and is only lacking a cast to build cleanly on all architectures.

Fixes: 97f78759ea1c ("[SCSI] scsi tgt: scsi target user and kernel communication interface")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/scsi/scsi_tgt_if.c

index 6209110f295d22598b87053c875a01a709cc1bcd..7199753591b2ed991379163cf6ea45e635145236 100644 (file)
@@ -286,7 +286,7 @@ static int uspace_ring_map(struct vm_area_struct *vma, unsigned long addr,
        int i, err;
 
        for (i = 0; i < TGT_RING_PAGES; i++) {
-               struct page *page = virt_to_page(ring->tr_pages[i]);
+               struct page *page = virt_to_page((void *)ring->tr_pages[i]);
                err = vm_insert_page(vma, addr, page);
                if (err)
                        return err;