提交 b5d013bc 编写于 作者: A Arnd Bergmann 提交者: Jens Axboe

staging: rts5208: 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/staging/rts5208/rtsx.h:180,
                 from drivers/staging/rts5208/rtsx.c:28:
drivers/staging/rts5208/rtsx_chip.h:343: error: "SG_END" redefined [-Werror]

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

Fixes: 723fbf56 ("lib/scatterlist: Add SG_CHAIN and SG_END macros for LSB encodings")
Cc: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: NArnd Bergmann <arnd@arndb.de>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 f16ee7c7
...@@ -339,13 +339,13 @@ struct sense_data_t { ...@@ -339,13 +339,13 @@ struct sense_data_t {
#define CHK_BIT(data, idx) ((data) & (1 << (idx))) #define CHK_BIT(data, idx) ((data) & (1 << (idx)))
/* SG descriptor */ /* SG descriptor */
#define SG_INT 0x04 #define RTSX_SG_INT 0x04
#define SG_END 0x02 #define RTSX_SG_END 0x02
#define SG_VALID 0x01 #define RTSX_SG_VALID 0x01
#define SG_NO_OP 0x00 #define RTSX_SG_NO_OP 0x00
#define SG_TRANS_DATA (0x02 << 4) #define RTSX_SG_TRANS_DATA (0x02 << 4)
#define SG_LINK_DESC (0x03 << 4) #define RTSX_SG_LINK_DESC (0x03 << 4)
struct rtsx_chip; struct rtsx_chip;
......
...@@ -308,7 +308,7 @@ static inline void rtsx_add_sg_tbl( ...@@ -308,7 +308,7 @@ static inline void rtsx_add_sg_tbl(
do { do {
if (len > 0x80000) { if (len > 0x80000) {
temp_len = 0x80000; temp_len = 0x80000;
temp_opt = option & (~SG_END); temp_opt = option & (~RTSX_SG_END);
} else { } else {
temp_len = len; temp_len = len;
temp_opt = option; temp_opt = option;
...@@ -407,9 +407,9 @@ static int rtsx_transfer_sglist_adma_partial(struct rtsx_chip *chip, u8 card, ...@@ -407,9 +407,9 @@ static int rtsx_transfer_sglist_adma_partial(struct rtsx_chip *chip, u8 card,
*index = *index + 1; *index = *index + 1;
} }
if ((i == (sg_cnt - 1)) || !resid) if ((i == (sg_cnt - 1)) || !resid)
option = SG_VALID | SG_END | SG_TRANS_DATA; option = RTSX_SG_VALID | RTSX_SG_END | RTSX_SG_TRANS_DATA;
else else
option = SG_VALID | SG_TRANS_DATA; option = RTSX_SG_VALID | RTSX_SG_TRANS_DATA;
rtsx_add_sg_tbl(chip, (u32)addr, (u32)len, option); rtsx_add_sg_tbl(chip, (u32)addr, (u32)len, option);
...@@ -555,9 +555,9 @@ static int rtsx_transfer_sglist_adma(struct rtsx_chip *chip, u8 card, ...@@ -555,9 +555,9 @@ static int rtsx_transfer_sglist_adma(struct rtsx_chip *chip, u8 card,
(unsigned int)addr, len); (unsigned int)addr, len);
if (j == (sg_cnt - 1)) if (j == (sg_cnt - 1))
option = SG_VALID | SG_END | SG_TRANS_DATA; option = RTSX_SG_VALID | RTSX_SG_END | RTSX_SG_TRANS_DATA;
else else
option = SG_VALID | SG_TRANS_DATA; option = RTSX_SG_VALID | RTSX_SG_TRANS_DATA;
rtsx_add_sg_tbl(chip, (u32)addr, (u32)len, option); rtsx_add_sg_tbl(chip, (u32)addr, (u32)len, option);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册