Skip to content

Commit b5d013b

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

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

drivers/staging/rts5208/rtsx_chip.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -339,13 +339,13 @@ struct sense_data_t {
339339
#define CHK_BIT(data, idx) ((data) & (1 << (idx)))
340340

341341
/* SG descriptor */
342-
#define SG_INT 0x04
343-
#define SG_END 0x02
344-
#define SG_VALID 0x01
342+
#define RTSX_SG_INT 0x04
343+
#define RTSX_SG_END 0x02
344+
#define RTSX_SG_VALID 0x01
345345

346-
#define SG_NO_OP 0x00
347-
#define SG_TRANS_DATA (0x02 << 4)
348-
#define SG_LINK_DESC (0x03 << 4)
346+
#define RTSX_SG_NO_OP 0x00
347+
#define RTSX_SG_TRANS_DATA (0x02 << 4)
348+
#define RTSX_SG_LINK_DESC (0x03 << 4)
349349

350350
struct rtsx_chip;
351351

drivers/staging/rts5208/rtsx_transport.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ static inline void rtsx_add_sg_tbl(
308308
do {
309309
if (len > 0x80000) {
310310
temp_len = 0x80000;
311-
temp_opt = option & (~SG_END);
311+
temp_opt = option & (~RTSX_SG_END);
312312
} else {
313313
temp_len = len;
314314
temp_opt = option;
@@ -407,9 +407,9 @@ static int rtsx_transfer_sglist_adma_partial(struct rtsx_chip *chip, u8 card,
407407
*index = *index + 1;
408408
}
409409
if ((i == (sg_cnt - 1)) || !resid)
410-
option = SG_VALID | SG_END | SG_TRANS_DATA;
410+
option = RTSX_SG_VALID | RTSX_SG_END | RTSX_SG_TRANS_DATA;
411411
else
412-
option = SG_VALID | SG_TRANS_DATA;
412+
option = RTSX_SG_VALID | RTSX_SG_TRANS_DATA;
413413

414414
rtsx_add_sg_tbl(chip, (u32)addr, (u32)len, option);
415415

@@ -555,9 +555,9 @@ static int rtsx_transfer_sglist_adma(struct rtsx_chip *chip, u8 card,
555555
(unsigned int)addr, len);
556556

557557
if (j == (sg_cnt - 1))
558-
option = SG_VALID | SG_END | SG_TRANS_DATA;
558+
option = RTSX_SG_VALID | RTSX_SG_END | RTSX_SG_TRANS_DATA;
559559
else
560-
option = SG_VALID | SG_TRANS_DATA;
560+
option = RTSX_SG_VALID | RTSX_SG_TRANS_DATA;
561561

562562
rtsx_add_sg_tbl(chip, (u32)addr, (u32)len, option);
563563

0 commit comments

Comments
 (0)