misc: rtsx: rename SG_END macro
authorArnd Bergmann <arnd@arndb.de>
Thu, 1 Mar 2018 10:31:28 +0000 (11:31 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 1 Mar 2018 15:33:05 +0000 (08:33 -0700)
A change to the generic scatterlist code caused a conflict with
the rtsx card reader driver:

In file included from drivers/misc/cardreader/rtsx_pcr.c:32:
include/linux/rtsx_pci.h:40: error: "SG_END" redefined [-Werror]

This changes one instance of the driver to prefix SG_END and
related constants.

Fixes: 723fbf563a6a ("lib/scatterlist: Add SG_CHAIN and SG_END macros for LSB encodings")
Cc: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/misc/cardreader/rtsx_pcr.c
include/linux/rtsx_pci.h

index fd09b0960097fa395c121dc17eae8e0648375dfc..e8f1d4bb806a855c2d0835ca1d4a17862a27dbab 100644 (file)
@@ -444,12 +444,12 @@ static void rtsx_pci_add_sg_tbl(struct rtsx_pcr *pcr,
 {
        u64 *ptr = (u64 *)(pcr->host_sg_tbl_ptr) + pcr->sgi;
        u64 val;
-       u8 option = SG_VALID | SG_TRANS_DATA;
+       u8 option = RTSX_SG_VALID | RTSX_SG_TRANS_DATA;
 
        pcr_dbg(pcr, "DMA addr: 0x%x, Len: 0x%x\n", (unsigned int)addr, len);
 
        if (end)
-               option |= SG_END;
+               option |= RTSX_SG_END;
        val = ((u64)addr << 32) | ((u64)len << 12) | option;
 
        put_unaligned_le64(val, ptr);
index 478acf6efac657cd1a086a6cb589488e4b847b44..e964bbd03fc23a39eda925a8fcd0d3f54e0605d8 100644 (file)
 #define   CHECK_REG_CMD                        2
 
 #define RTSX_HDBAR                     0x08
-#define   SG_INT                       0x04
-#define   SG_END                       0x02
-#define   SG_VALID                     0x01
-#define   SG_NO_OP                     0x00
-#define   SG_TRANS_DATA                        (0x02 << 4)
-#define   SG_LINK_DESC                 (0x03 << 4)
+#define   RTSX_SG_INT                  0x04
+#define   RTSX_SG_END                  0x02
+#define   RTSX_SG_VALID                        0x01
+#define   RTSX_SG_NO_OP                        0x00
+#define   RTSX_SG_TRANS_DATA           (0x02 << 4)
+#define   RTSX_SG_LINK_DESC            (0x03 << 4)
 #define RTSX_HDBCTLR                   0x0C
 #define   SDMA_MODE                    0x00
 #define   ADMA_MODE                    (0x02 << 26)