* [PATCH 1/2] misc: rtsx: rename SG_END macro
@ 2018-03-01 10:31 Arnd Bergmann
2018-03-01 10:31 ` [PATCH 2/2] staging: rts5208: " Arnd Bergmann
2018-03-01 15:33 ` [PATCH 1/2] misc: rtsx: " Jens Axboe
0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2018-03-01 10:31 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Arnd Bergmann, Anshuman Khandual, Jens Axboe, Lee Jones,
Rui Feng, Steven Feng, linux-kernel
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>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/misc/cardreader/rtsx_pcr.c | 4 ++--
include/linux/rtsx_pci.h | 12 ++++++------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/misc/cardreader/rtsx_pcr.c b/drivers/misc/cardreader/rtsx_pcr.c
index fd09b0960097..e8f1d4bb806a 100644
--- a/drivers/misc/cardreader/rtsx_pcr.c
+++ b/drivers/misc/cardreader/rtsx_pcr.c
@@ -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);
diff --git a/include/linux/rtsx_pci.h b/include/linux/rtsx_pci.h
index 478acf6efac6..e964bbd03fc2 100644
--- a/include/linux/rtsx_pci.h
+++ b/include/linux/rtsx_pci.h
@@ -36,12 +36,12 @@
#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)
--
2.9.0
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 2/2] staging: rts5208: rename SG_END macro 2018-03-01 10:31 [PATCH 1/2] misc: rtsx: rename SG_END macro Arnd Bergmann @ 2018-03-01 10:31 ` Arnd Bergmann 2018-03-01 12:23 ` Andy Shevchenko 2018-03-01 15:33 ` [PATCH 1/2] misc: rtsx: " Jens Axboe 1 sibling, 1 reply; 4+ messages in thread From: Arnd Bergmann @ 2018-03-01 10:31 UTC (permalink / raw) To: Greg Kroah-Hartman Cc: Jens Axboe, devel, linux-kernel, Arnd Bergmann, Anshuman Khandual 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: 723fbf563a6a ("lib/scatterlist: Add SG_CHAIN and SG_END macros for LSB encodings") Cc: Anshuman Khandual <khandual@linux.vnet.ibm.com> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- drivers/staging/rts5208/rtsx_chip.h | 12 ++++++------ drivers/staging/rts5208/rtsx_transport.c | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging/rts5208/rtsx_chip.h b/drivers/staging/rts5208/rtsx_chip.h index 4f6e3c1c4621..8a8cd5d3cf7e 100644 --- a/drivers/staging/rts5208/rtsx_chip.h +++ b/drivers/staging/rts5208/rtsx_chip.h @@ -339,13 +339,13 @@ struct sense_data_t { #define CHK_BIT(data, idx) ((data) & (1 << (idx))) /* SG descriptor */ -#define SG_INT 0x04 -#define SG_END 0x02 -#define SG_VALID 0x01 +#define RTSX_SG_INT 0x04 +#define RTSX_SG_END 0x02 +#define RTSX_SG_VALID 0x01 -#define SG_NO_OP 0x00 -#define SG_TRANS_DATA (0x02 << 4) -#define SG_LINK_DESC (0x03 << 4) +#define RTSX_SG_NO_OP 0x00 +#define RTSX_SG_TRANS_DATA (0x02 << 4) +#define RTSX_SG_LINK_DESC (0x03 << 4) struct rtsx_chip; diff --git a/drivers/staging/rts5208/rtsx_transport.c b/drivers/staging/rts5208/rtsx_transport.c index 8b57e17ee6d3..716cce2bd7f0 100644 --- a/drivers/staging/rts5208/rtsx_transport.c +++ b/drivers/staging/rts5208/rtsx_transport.c @@ -308,7 +308,7 @@ static inline void rtsx_add_sg_tbl( do { if (len > 0x80000) { temp_len = 0x80000; - temp_opt = option & (~SG_END); + temp_opt = option & (~RTSX_SG_END); } else { temp_len = len; temp_opt = option; @@ -407,9 +407,9 @@ static int rtsx_transfer_sglist_adma_partial(struct rtsx_chip *chip, u8 card, *index = *index + 1; } 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 - option = SG_VALID | SG_TRANS_DATA; + option = RTSX_SG_VALID | RTSX_SG_TRANS_DATA; 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, (unsigned int)addr, len); 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 - option = SG_VALID | SG_TRANS_DATA; + option = RTSX_SG_VALID | RTSX_SG_TRANS_DATA; rtsx_add_sg_tbl(chip, (u32)addr, (u32)len, option); -- 2.9.0 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] staging: rts5208: rename SG_END macro 2018-03-01 10:31 ` [PATCH 2/2] staging: rts5208: " Arnd Bergmann @ 2018-03-01 12:23 ` Andy Shevchenko 0 siblings, 0 replies; 4+ messages in thread From: Andy Shevchenko @ 2018-03-01 12:23 UTC (permalink / raw) To: Arnd Bergmann Cc: Greg Kroah-Hartman, Anshuman Khandual, Jens Axboe, devel, Linux Kernel Mailing List On Thu, Mar 1, 2018 at 12:31 PM, Arnd Bergmann <arnd@arndb.de> wrote: > 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. > Thanks, Arnd. This is right thing to do by my opinion. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> > Fixes: 723fbf563a6a ("lib/scatterlist: Add SG_CHAIN and SG_END macros for LSB encodings") > Cc: Anshuman Khandual <khandual@linux.vnet.ibm.com> > Cc: Jens Axboe <axboe@kernel.dk> > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- > drivers/staging/rts5208/rtsx_chip.h | 12 ++++++------ > drivers/staging/rts5208/rtsx_transport.c | 10 +++++----- > 2 files changed, 11 insertions(+), 11 deletions(-) > > diff --git a/drivers/staging/rts5208/rtsx_chip.h b/drivers/staging/rts5208/rtsx_chip.h > index 4f6e3c1c4621..8a8cd5d3cf7e 100644 > --- a/drivers/staging/rts5208/rtsx_chip.h > +++ b/drivers/staging/rts5208/rtsx_chip.h > @@ -339,13 +339,13 @@ struct sense_data_t { > #define CHK_BIT(data, idx) ((data) & (1 << (idx))) > > /* SG descriptor */ > -#define SG_INT 0x04 > -#define SG_END 0x02 > -#define SG_VALID 0x01 > +#define RTSX_SG_INT 0x04 > +#define RTSX_SG_END 0x02 > +#define RTSX_SG_VALID 0x01 > > -#define SG_NO_OP 0x00 > -#define SG_TRANS_DATA (0x02 << 4) > -#define SG_LINK_DESC (0x03 << 4) > +#define RTSX_SG_NO_OP 0x00 > +#define RTSX_SG_TRANS_DATA (0x02 << 4) > +#define RTSX_SG_LINK_DESC (0x03 << 4) > > struct rtsx_chip; > > diff --git a/drivers/staging/rts5208/rtsx_transport.c b/drivers/staging/rts5208/rtsx_transport.c > index 8b57e17ee6d3..716cce2bd7f0 100644 > --- a/drivers/staging/rts5208/rtsx_transport.c > +++ b/drivers/staging/rts5208/rtsx_transport.c > @@ -308,7 +308,7 @@ static inline void rtsx_add_sg_tbl( > do { > if (len > 0x80000) { > temp_len = 0x80000; > - temp_opt = option & (~SG_END); > + temp_opt = option & (~RTSX_SG_END); > } else { > temp_len = len; > temp_opt = option; > @@ -407,9 +407,9 @@ static int rtsx_transfer_sglist_adma_partial(struct rtsx_chip *chip, u8 card, > *index = *index + 1; > } > 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 > - option = SG_VALID | SG_TRANS_DATA; > + option = RTSX_SG_VALID | RTSX_SG_TRANS_DATA; > > 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, > (unsigned int)addr, len); > > 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 > - option = SG_VALID | SG_TRANS_DATA; > + option = RTSX_SG_VALID | RTSX_SG_TRANS_DATA; > > rtsx_add_sg_tbl(chip, (u32)addr, (u32)len, option); > > -- > 2.9.0 > -- With Best Regards, Andy Shevchenko ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] misc: rtsx: rename SG_END macro 2018-03-01 10:31 [PATCH 1/2] misc: rtsx: rename SG_END macro Arnd Bergmann 2018-03-01 10:31 ` [PATCH 2/2] staging: rts5208: " Arnd Bergmann @ 2018-03-01 15:33 ` Jens Axboe 1 sibling, 0 replies; 4+ messages in thread From: Jens Axboe @ 2018-03-01 15:33 UTC (permalink / raw) To: Arnd Bergmann, Greg Kroah-Hartman Cc: Anshuman Khandual, Lee Jones, Rui Feng, Steven Feng, linux-kernel On 3/1/18 3:31 AM, Arnd Bergmann wrote: > 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. Thanks Arnd, applied 1-2. -- Jens Axboe ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-03-01 15:33 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-03-01 10:31 [PATCH 1/2] misc: rtsx: rename SG_END macro Arnd Bergmann 2018-03-01 10:31 ` [PATCH 2/2] staging: rts5208: " Arnd Bergmann 2018-03-01 12:23 ` Andy Shevchenko 2018-03-01 15:33 ` [PATCH 1/2] misc: rtsx: " Jens Axboe
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
Powered by JetHome