Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 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>

authored by

Arnd Bergmann and committed by
Jens Axboe
f16ee7c7 a063057d

+8 -8
+2 -2
drivers/misc/cardreader/rtsx_pcr.c
··· 444 444 { 445 445 u64 *ptr = (u64 *)(pcr->host_sg_tbl_ptr) + pcr->sgi; 446 446 u64 val; 447 - u8 option = SG_VALID | SG_TRANS_DATA; 447 + u8 option = RTSX_SG_VALID | RTSX_SG_TRANS_DATA; 448 448 449 449 pcr_dbg(pcr, "DMA addr: 0x%x, Len: 0x%x\n", (unsigned int)addr, len); 450 450 451 451 if (end) 452 - option |= SG_END; 452 + option |= RTSX_SG_END; 453 453 val = ((u64)addr << 32) | ((u64)len << 12) | option; 454 454 455 455 put_unaligned_le64(val, ptr);
+6 -6
include/linux/rtsx_pci.h
··· 36 36 #define CHECK_REG_CMD 2 37 37 38 38 #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) 45 45 #define RTSX_HDBCTLR 0x0C 46 46 #define SDMA_MODE 0x00 47 47 #define ADMA_MODE (0x02 << 26)