Skip to content

Commit f16ee7c

Browse files
arndbaxboe
authored andcommitted
misc: rtsx: rename SG_END macro
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: 723fbf5 ("lib/scatterlist: Add SG_CHAIN and SG_END macros for LSB encodings") Cc: Anshuman Khandual <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent a063057 commit f16ee7c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

drivers/misc/cardreader/rtsx_pcr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,12 +444,12 @@ static void rtsx_pci_add_sg_tbl(struct rtsx_pcr *pcr,
444444
{
445445
u64 *ptr = (u64 *)(pcr->host_sg_tbl_ptr) + pcr->sgi;
446446
u64 val;
447-
u8 option = SG_VALID | SG_TRANS_DATA;
447+
u8 option = RTSX_SG_VALID | RTSX_SG_TRANS_DATA;
448448

449449
pcr_dbg(pcr, "DMA addr: 0x%x, Len: 0x%x\n", (unsigned int)addr, len);
450450

451451
if (end)
452-
option |= SG_END;
452+
option |= RTSX_SG_END;
453453
val = ((u64)addr << 32) | ((u64)len << 12) | option;
454454

455455
put_unaligned_le64(val, ptr);

include/linux/rtsx_pci.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@
3636
#define CHECK_REG_CMD 2
3737

3838
#define RTSX_HDBAR 0x08
39-
#define SG_INT 0x04
40-
#define SG_END 0x02
41-
#define SG_VALID 0x01
42-
#define SG_NO_OP 0x00
43-
#define SG_TRANS_DATA (0x02 << 4)
44-
#define SG_LINK_DESC (0x03 << 4)
39+
#define RTSX_SG_INT 0x04
40+
#define RTSX_SG_END 0x02
41+
#define RTSX_SG_VALID 0x01
42+
#define RTSX_SG_NO_OP 0x00
43+
#define RTSX_SG_TRANS_DATA (0x02 << 4)
44+
#define RTSX_SG_LINK_DESC (0x03 << 4)
4545
#define RTSX_HDBCTLR 0x0C
4646
#define SDMA_MODE 0x00
4747
#define ADMA_MODE (0x02 << 26)

0 commit comments

Comments
 (0)