All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: rb532: move GPIOD definition into C-files
@ 2022-03-29  1:45 Jackie Liu
  2022-03-29 12:54 ` Andy Shevchenko
  0 siblings, 1 reply; 14+ messages in thread
From: Jackie Liu @ 2022-03-29  1:45 UTC (permalink / raw)
  To: linus.walleij, ralf, tsbogend; +Cc: linux-mips, jic23, andy.shevchenko

From: Jackie Liu <liuyun01@kylinos.cn>

My kernel robot report build error from drivers/iio/adc/da9150-gpadc.c,

We define GPIOD in rb.h, in fact he should only be used in gpio.c, but
it affects the driver da9150-gpadc.c which goes against the original
intention of the design, just move it to his scope.

At the same time, GPIONMIEN and IMASK6 are not used anywhere, just delete
them.

Suggested-by: Jonathan Cameron <jic23@kernel.org>
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reported-by: k2ci <kernel-bot@kylinos.cn>
Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
---
 arch/mips/include/asm/mach-rc32434/rb.h | 9 ---------
 arch/mips/rb532/gpio.c                  | 8 ++++++++
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/arch/mips/include/asm/mach-rc32434/rb.h b/arch/mips/include/asm/mach-rc32434/rb.h
index 34d179ca020b..dd9d4b026e62 100644
--- a/arch/mips/include/asm/mach-rc32434/rb.h
+++ b/arch/mips/include/asm/mach-rc32434/rb.h
@@ -29,15 +29,6 @@
 #define DEV3TC		0x01003C
 #define BTCS		0x010040
 #define BTCOMPARE	0x010044
-#define GPIOBASE	0x050000
-/* Offsets relative to GPIOBASE */
-#define GPIOFUNC	0x00
-#define GPIOCFG		0x04
-#define GPIOD		0x08
-#define GPIOILEVEL	0x0C
-#define GPIOISTAT	0x10
-#define GPIONMIEN	0x14
-#define IMASK6		0x38
 #define LO_WPX		(1 << 0)
 #define LO_ALE		(1 << 1)
 #define LO_CLE		(1 << 2)
diff --git a/arch/mips/rb532/gpio.c b/arch/mips/rb532/gpio.c
index 94f02ada4082..43e188d53a49 100644
--- a/arch/mips/rb532/gpio.c
+++ b/arch/mips/rb532/gpio.c
@@ -37,6 +37,14 @@
 #include <asm/mach-rc32434/rb.h>
 #include <asm/mach-rc32434/gpio.h>
 
+#define GPIOBASE	0x050000
+/* Offsets relative to GPIOBASE */
+#define GPIOFUNC	0x00
+#define GPIOCFG		0x04
+#define GPIOD		0x08
+#define GPIOILEVEL	0x0C
+#define GPIOISTAT	0x10
+
 struct rb532_gpio_chip {
 	struct gpio_chip chip;
 	void __iomem	 *regbase;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH] MIPS: rb532: move GPIOD definition into C-files
  2022-03-29  1:45 [PATCH] MIPS: rb532: move GPIOD definition into C-files Jackie Liu
@ 2022-03-29 12:54 ` Andy Shevchenko
  2022-03-30  1:46   ` Jackie Liu
                     ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Andy Shevchenko @ 2022-03-29 12:54 UTC (permalink / raw)
  To: Jackie Liu
  Cc: Linus Walleij, Ralf Baechle, Thomas Bogendoerfer,
	open list:BROADCOM NVRAM DRIVER, Jonathan Cameron

On Tue, Mar 29, 2022 at 4:46 AM Jackie Liu <liu.yun@linux.dev> wrote:
>
> From: Jackie Liu <liuyun01@kylinos.cn>
>
> My kernel robot report build error from drivers/iio/adc/da9150-gpadc.c,
>
> We define GPIOD in rb.h, in fact he should only be used in gpio.c, but

he --> it

> it affects the driver da9150-gpadc.c which goes against the original
> intention of the design, just move it to his scope.

> At the same time, GPIONMIEN and IMASK6 are not used anywhere, just delete
> them.

While not being used it's good to leave (save) them since it might be
the only means of the HW documentation. I know that Git history will
keep that, but it is more explicit just to have them in the code.

...

>  #define DEV3TC         0x01003C
>  #define BTCS           0x010040
>  #define BTCOMPARE      0x010044
> -#define GPIOBASE       0x050000

...

> +#define GPIOBASE       0x050000

I think this one belongs to the header.

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] MIPS: rb532: move GPIOD definition into C-files
  2022-03-29 12:54 ` Andy Shevchenko
@ 2022-03-30  1:46   ` Jackie Liu
  2022-03-30  6:42     ` Thomas Bogendoerfer
  2022-03-30  2:01   ` [PATCH v2] " Jackie Liu
  2022-03-30  2:07   ` [PATCH v3] " Jackie Liu
  2 siblings, 1 reply; 14+ messages in thread
From: Jackie Liu @ 2022-03-30  1:46 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Linus Walleij, Ralf Baechle, Thomas Bogendoerfer,
	open list:BROADCOM NVRAM DRIVER, Jonathan Cameron



在 2022/3/29 下午8:54, Andy Shevchenko 写道:
> On Tue, Mar 29, 2022 at 4:46 AM Jackie Liu <liu.yun@linux.dev> wrote:
>>
>> From: Jackie Liu <liuyun01@kylinos.cn>
>>
>> My kernel robot report build error from drivers/iio/adc/da9150-gpadc.c,
>>
>> We define GPIOD in rb.h, in fact he should only be used in gpio.c, but
> 
> he --> it
> 
>> it affects the driver da9150-gpadc.c which goes against the original
>> intention of the design, just move it to his scope.
> 
>> At the same time, GPIONMIEN and IMASK6 are not used anywhere, just delete
>> them.
> 
> While not being used it's good to leave (save) them since it might be
> the only means of the HW documentation. I know that Git history will
> keep that, but it is more explicit just to have them in the code.

Sure.

> 
> ...
> 
>>   #define DEV3TC         0x01003C
>>   #define BTCS           0x010040
>>   #define BTCOMPARE      0x010044
>> -#define GPIOBASE       0x050000
> 
> ...
> 
>> +#define GPIOBASE       0x050000
> 
> I think this one belongs to the header.

I think it would be better to put it in gpio.c, after all it belongs to
the GPIO module and is not used elsewhere. It doesn't feel good if we
put it in the header file.


--
BR, Jackie Liu

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH v2] MIPS: rb532: move GPIOD definition into C-files
  2022-03-29 12:54 ` Andy Shevchenko
  2022-03-30  1:46   ` Jackie Liu
@ 2022-03-30  2:01   ` Jackie Liu
  2022-03-30  2:07   ` [PATCH v3] " Jackie Liu
  2 siblings, 0 replies; 14+ messages in thread
From: Jackie Liu @ 2022-03-30  2:01 UTC (permalink / raw)
  To: linus.walleij, ralf, tsbogend; +Cc: linux-mips, jic23, andy.shevchenko

From: Jackie Liu <liuyun01@kylinos.cn>

My kernel robot report build error from drivers/iio/adc/da9150-gpadc.c,

We define GPIOD in rb.h, in fact he should only be used in gpio.c, but
it affects the driver da9150-gpadc.c which goes against the original
intention of the design, just move it to his scope.

Suggested-by: Jonathan Cameron <jic23@kernel.org>
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reported-by: k2ci <kernel-bot@kylinos.cn>
Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
---
 v1->v2:
    Keep GPIONMIEN and IMASK6 as hardware document.

 arch/mips/include/asm/mach-rc32434/rb.h |  9 ---------
 arch/mips/rb532/gpio.c                  | 10 ++++++++++
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/arch/mips/include/asm/mach-rc32434/rb.h b/arch/mips/include/asm/mach-rc32434/rb.h
index 34d179ca020b..dd9d4b026e62 100644
--- a/arch/mips/include/asm/mach-rc32434/rb.h
+++ b/arch/mips/include/asm/mach-rc32434/rb.h
@@ -29,15 +29,6 @@
 #define DEV3TC		0x01003C
 #define BTCS		0x010040
 #define BTCOMPARE	0x010044
-#define GPIOBASE	0x050000
-/* Offsets relative to GPIOBASE */
-#define GPIOFUNC	0x00
-#define GPIOCFG		0x04
-#define GPIOD		0x08
-#define GPIOILEVEL	0x0C
-#define GPIOISTAT	0x10
-#define GPIONMIEN	0x14
-#define IMASK6		0x38
 #define LO_WPX		(1 << 0)
 #define LO_ALE		(1 << 1)
 #define LO_CLE		(1 << 2)
diff --git a/arch/mips/rb532/gpio.c b/arch/mips/rb532/gpio.c
index 94f02ada4082..29c21b9d42da 100644
--- a/arch/mips/rb532/gpio.c
+++ b/arch/mips/rb532/gpio.c
@@ -37,6 +37,16 @@
 #include <asm/mach-rc32434/rb.h>
 #include <asm/mach-rc32434/gpio.h>
 
+#define GPIOBASE	0x050000
+/* Offsets relative to GPIOBASE */
+#define GPIOFUNC	0x00
+#define GPIOCFG		0x04
+#define GPIOD		0x08
+#define GPIOILEVEL	0x0C
+#define GPIOISTAT	0x10
+#define GPIONMIEN	0x14
+#define IMASK6		0x38
+
 struct rb532_gpio_chip {
 	struct gpio_chip chip;
 	void __iomem	 *regbase;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v3] MIPS: rb532: move GPIOD definition into C-files
  2022-03-29 12:54 ` Andy Shevchenko
  2022-03-30  1:46   ` Jackie Liu
  2022-03-30  2:01   ` [PATCH v2] " Jackie Liu
@ 2022-03-30  2:07   ` Jackie Liu
  2022-03-30  8:52     ` Sergei Shtylyov
  2 siblings, 1 reply; 14+ messages in thread
From: Jackie Liu @ 2022-03-30  2:07 UTC (permalink / raw)
  To: linus.walleij, ralf, tsbogend; +Cc: linux-mips, jic23, andy.shevchenko

From: Jackie Liu <liuyun01@kylinos.cn>

My kernel robot report build error from drivers/iio/adc/da9150-gpadc.c,

We define GPIOD in rb.h, in fact it should only be used in gpio.c, but
it affects the driver da9150-gpadc.c which goes against the original
intention of the design, just move it to his scope.

Suggested-by: Jonathan Cameron <jic23@kernel.org>
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reported-by: k2ci <kernel-bot@kylinos.cn>
Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
---
 v1->v2:
    Keep GPIONMIEN and IMASK6 as hardware document.
 v2->v3:
    he to it.

 arch/mips/include/asm/mach-rc32434/rb.h |  9 ---------
 arch/mips/rb532/gpio.c                  | 10 ++++++++++
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/arch/mips/include/asm/mach-rc32434/rb.h b/arch/mips/include/asm/mach-rc32434/rb.h
index 34d179ca020b..dd9d4b026e62 100644
--- a/arch/mips/include/asm/mach-rc32434/rb.h
+++ b/arch/mips/include/asm/mach-rc32434/rb.h
@@ -29,15 +29,6 @@
 #define DEV3TC		0x01003C
 #define BTCS		0x010040
 #define BTCOMPARE	0x010044
-#define GPIOBASE	0x050000
-/* Offsets relative to GPIOBASE */
-#define GPIOFUNC	0x00
-#define GPIOCFG		0x04
-#define GPIOD		0x08
-#define GPIOILEVEL	0x0C
-#define GPIOISTAT	0x10
-#define GPIONMIEN	0x14
-#define IMASK6		0x38
 #define LO_WPX		(1 << 0)
 #define LO_ALE		(1 << 1)
 #define LO_CLE		(1 << 2)
diff --git a/arch/mips/rb532/gpio.c b/arch/mips/rb532/gpio.c
index 94f02ada4082..29c21b9d42da 100644
--- a/arch/mips/rb532/gpio.c
+++ b/arch/mips/rb532/gpio.c
@@ -37,6 +37,16 @@
 #include <asm/mach-rc32434/rb.h>
 #include <asm/mach-rc32434/gpio.h>
 
+#define GPIOBASE	0x050000
+/* Offsets relative to GPIOBASE */
+#define GPIOFUNC	0x00
+#define GPIOCFG		0x04
+#define GPIOD		0x08
+#define GPIOILEVEL	0x0C
+#define GPIOISTAT	0x10
+#define GPIONMIEN	0x14
+#define IMASK6		0x38
+
 struct rb532_gpio_chip {
 	struct gpio_chip chip;
 	void __iomem	 *regbase;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH] MIPS: rb532: move GPIOD definition into C-files
  2022-03-30  1:46   ` Jackie Liu
@ 2022-03-30  6:42     ` Thomas Bogendoerfer
  2022-03-30  9:23       ` Andy Shevchenko
  0 siblings, 1 reply; 14+ messages in thread
From: Thomas Bogendoerfer @ 2022-03-30  6:42 UTC (permalink / raw)
  To: Jackie Liu
  Cc: Andy Shevchenko, Linus Walleij, Ralf Baechle,
	open list:BROADCOM NVRAM DRIVER, Jonathan Cameron

On Wed, Mar 30, 2022 at 09:46:07AM +0800, Jackie Liu wrote:
> 
> 
> 在 2022/3/29 下午8:54, Andy Shevchenko 写道:
> > On Tue, Mar 29, 2022 at 4:46 AM Jackie Liu <liu.yun@linux.dev> wrote:
> > > 
> > > From: Jackie Liu <liuyun01@kylinos.cn>
> > > 
> > > My kernel robot report build error from drivers/iio/adc/da9150-gpadc.c,
> > > 
> > > We define GPIOD in rb.h, in fact he should only be used in gpio.c, but
> > 
> > he --> it
> > 
> > > it affects the driver da9150-gpadc.c which goes against the original
> > > intention of the design, just move it to his scope.
> > 
> > > At the same time, GPIONMIEN and IMASK6 are not used anywhere, just delete
> > > them.
> > 
> > While not being used it's good to leave (save) them since it might be
> > the only means of the HW documentation. I know that Git history will
> > keep that, but it is more explicit just to have them in the code.
> 
> Sure.
> 
> > 
> > ...
> > 
> > >   #define DEV3TC         0x01003C
> > >   #define BTCS           0x010040
> > >   #define BTCOMPARE      0x010044
> > > -#define GPIOBASE       0x050000
> > 
> > ...
> > 
> > > +#define GPIOBASE       0x050000
> > 
> > I think this one belongs to the header.
> 
> I think it would be better to put it in gpio.c, after all it belongs to
> the GPIO module and is not used elsewhere. It doesn't feel good if we
> put it in the header file.

I have a patchset, where the both files will go away. No need to
clean up now.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v3] MIPS: rb532: move GPIOD definition into C-files
  2022-03-30  2:07   ` [PATCH v3] " Jackie Liu
@ 2022-03-30  8:52     ` Sergei Shtylyov
  0 siblings, 0 replies; 14+ messages in thread
From: Sergei Shtylyov @ 2022-03-30  8:52 UTC (permalink / raw)
  To: Jackie Liu, linus.walleij, ralf, tsbogend
  Cc: linux-mips, jic23, andy.shevchenko

On 3/30/22 5:07 AM, Jackie Liu wrote:

> From: Jackie Liu <liuyun01@kylinos.cn>
> 
> My kernel robot report build error from drivers/iio/adc/da9150-gpadc.c,

   Reports.

> We define GPIOD in rb.h, in fact it should only be used in gpio.c, but
> it affects the driver da9150-gpadc.c which goes against the original
> intention of the design, just move it to his scope.

   s/his/its/.

> Suggested-by: Jonathan Cameron <jic23@kernel.org>
> Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> Reported-by: k2ci <kernel-bot@kylinos.cn>
> Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
> ---
>  v1->v2:
>     Keep GPIONMIEN and IMASK6 as hardware document.
>  v2->v3:
>     he to it.

   What? :-)

[...]

MBR, Sergey

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] MIPS: rb532: move GPIOD definition into C-files
  2022-03-30  6:42     ` Thomas Bogendoerfer
@ 2022-03-30  9:23       ` Andy Shevchenko
  2022-03-30  9:32         ` Thomas Bogendoerfer
  0 siblings, 1 reply; 14+ messages in thread
From: Andy Shevchenko @ 2022-03-30  9:23 UTC (permalink / raw)
  To: Thomas Bogendoerfer
  Cc: Jackie Liu, Linus Walleij, Ralf Baechle,
	open list:BROADCOM NVRAM DRIVER, Jonathan Cameron

On Wed, Mar 30, 2022 at 9:45 AM Thomas Bogendoerfer
<tsbogend@alpha.franken.de> wrote:
> On Wed, Mar 30, 2022 at 09:46:07AM +0800, Jackie Liu wrote:
> > 在 2022/3/29 下午8:54, Andy Shevchenko 写道:

...

> > I think it would be better to put it in gpio.c, after all it belongs to
> > the GPIO module and is not used elsewhere. It doesn't feel good if we
> > put it in the header file.
>
> I have a patchset, where the both files will go away. No need to
> clean up now.

Do you plan them to be backported? If not, I would recommend applying
this patch in order to have it backported and then do whatever you
want we those files.

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] MIPS: rb532: move GPIOD definition into C-files
  2022-03-30  9:23       ` Andy Shevchenko
@ 2022-03-30  9:32         ` Thomas Bogendoerfer
  2022-03-30  9:41           ` Andy Shevchenko
  0 siblings, 1 reply; 14+ messages in thread
From: Thomas Bogendoerfer @ 2022-03-30  9:32 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Jackie Liu, Linus Walleij, Ralf Baechle,
	open list:BROADCOM NVRAM DRIVER, Jonathan Cameron

On Wed, Mar 30, 2022 at 12:23:59PM +0300, Andy Shevchenko wrote:
> On Wed, Mar 30, 2022 at 9:45 AM Thomas Bogendoerfer
> <tsbogend@alpha.franken.de> wrote:
> > On Wed, Mar 30, 2022 at 09:46:07AM +0800, Jackie Liu wrote:
> > > 在 2022/3/29 下午8:54, Andy Shevchenko 写道:
> 
> ...
> 
> > > I think it would be better to put it in gpio.c, after all it belongs to
> > > the GPIO module and is not used elsewhere. It doesn't feel good if we
> > > put it in the header file.
> >
> > I have a patchset, where the both files will go away. No need to
> > clean up now.
> 
> Do you plan them to be backported? If not, I would recommend applying

no plan for backporting

> this patch in order to have it backported and then do whatever you
> want we those files.

why ? This doesn't fix anything, doesn't it ?

But if it makes people happy, I'll apply it.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] MIPS: rb532: move GPIOD definition into C-files
  2022-03-30  9:32         ` Thomas Bogendoerfer
@ 2022-03-30  9:41           ` Andy Shevchenko
  2022-03-30  9:56             ` Jackie Liu
  0 siblings, 1 reply; 14+ messages in thread
From: Andy Shevchenko @ 2022-03-30  9:41 UTC (permalink / raw)
  To: Thomas Bogendoerfer
  Cc: Jackie Liu, Linus Walleij, Ralf Baechle,
	open list:BROADCOM NVRAM DRIVER, Jonathan Cameron

On Wed, Mar 30, 2022 at 12:32 PM Thomas Bogendoerfer
<tsbogend@alpha.franken.de> wrote:
> On Wed, Mar 30, 2022 at 12:23:59PM +0300, Andy Shevchenko wrote:
> > On Wed, Mar 30, 2022 at 9:45 AM Thomas Bogendoerfer
> > <tsbogend@alpha.franken.de> wrote:
> > > On Wed, Mar 30, 2022 at 09:46:07AM +0800, Jackie Liu wrote:

...

> > > I have a patchset, where the both files will go away. No need to
> > > clean up now.
> >
> > Do you plan them to be backported? If not, I would recommend applying
>
> no plan for backporting
>
> > this patch in order to have it backported and then do whatever you
> > want we those files.
>
> why ? This doesn't fix anything, doesn't it ?

It fixes compilation breakage in some cases. I think the author of
this patch can (should) elaborate.
Also, it might need a Fixes tag.

> But if it makes people happy, I'll apply it.

Yes, please.

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] MIPS: rb532: move GPIOD definition into C-files
  2022-03-30  9:41           ` Andy Shevchenko
@ 2022-03-30  9:56             ` Jackie Liu
  2022-03-30 10:01               ` Andy Shevchenko
  2022-03-30 10:02               ` Thomas Bogendoerfer
  0 siblings, 2 replies; 14+ messages in thread
From: Jackie Liu @ 2022-03-30  9:56 UTC (permalink / raw)
  To: Andy Shevchenko, Thomas Bogendoerfer
  Cc: Linus Walleij, Ralf Baechle, open list:BROADCOM NVRAM DRIVER,
	Jonathan Cameron


在 2022/3/30 下午5:41, Andy Shevchenko 写道:
> On Wed, Mar 30, 2022 at 12:32 PM Thomas Bogendoerfer
> <tsbogend@alpha.franken.de> wrote:
>> On Wed, Mar 30, 2022 at 12:23:59PM +0300, Andy Shevchenko wrote:
>>> On Wed, Mar 30, 2022 at 9:45 AM Thomas Bogendoerfer
>>> <tsbogend@alpha.franken.de> wrote:
>>>> On Wed, Mar 30, 2022 at 09:46:07AM +0800, Jackie Liu wrote:
> 
> ...
> 
>>>> I have a patchset, where the both files will go away. No need to
>>>> clean up now.
>>>
>>> Do you plan them to be backported? If not, I would recommend applying
>>
>> no plan for backporting
>>
>>> this patch in order to have it backported and then do whatever you
>>> want we those files.
>>
>> why ? This doesn't fix anything, doesn't it ?

Like the patch I submitted in the first version, there are some gcc
errors.

[...]
drivers/iio/adc/da9150-gpadc.c:254:13: error: ‘DA9150_GPADC_CHAN_0x08’ 
undeclared here (not in a function); did you mean ‘DA9150_GPADC_CHAN_TBAT’?
    254 |  .channel = DA9150_GPADC_CHAN_##_id,   \
        |             ^~~~~~~~~~~~~~~~~~
  drivers/iio/adc/da9150-gpadc.c:273:2: note: in expansion of macro 
‘DA9150_GPADC_CHANNEL’
    273 |  DA9150_GPADC_CHANNEL(_id, _hw_id, _type,   \
        |  ^~~~~~~~~~~~~~~~~~~~
  drivers/iio/adc/da9150-gpadc.c:281:2: note: in expansion of macro 
‘DA9150_GPADC_CHANNEL_PROCESSED’
    281 |  DA9150_GPADC_CHANNEL_PROCESSED(GPIOD, GPIOD_6V, IIO_VOLTAGE, 
NULL),
        |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

make[4]: *** [../scripts/Makefile.build:288: 
drivers/iio/adc/da9150-gpadc.o] Error 1
make[3]: *** [../scripts/Makefile.build:550: drivers/iio/adc] Error 2
make[3]: *** Waiting for unfinished jobs....

> 
> It fixes compilation breakage in some cases. I think the author of
> this patch can (should) elaborate.
> Also, it might need a Fixes tag.


Um, it's really hard to say which commit is fixed, just because this
header file defines a GPIOD, and someone else uses this later.

> 
>> But if it makes people happy, I'll apply it.
> 
> Yes, please.
> 

--
Jackie Liu

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] MIPS: rb532: move GPIOD definition into C-files
  2022-03-30  9:56             ` Jackie Liu
@ 2022-03-30 10:01               ` Andy Shevchenko
  2022-03-30 10:04                 ` Jackie Liu
  2022-03-30 10:02               ` Thomas Bogendoerfer
  1 sibling, 1 reply; 14+ messages in thread
From: Andy Shevchenko @ 2022-03-30 10:01 UTC (permalink / raw)
  To: Jackie Liu
  Cc: Thomas Bogendoerfer, Linus Walleij, Ralf Baechle,
	open list:BROADCOM NVRAM DRIVER, Jonathan Cameron

On Wed, Mar 30, 2022 at 12:56 PM Jackie Liu <liu.yun@linux.dev> wrote:
> 在 2022/3/30 下午5:41, Andy Shevchenko 写道:
> > On Wed, Mar 30, 2022 at 12:32 PM Thomas Bogendoerfer
> > <tsbogend@alpha.franken.de> wrote:

...

> > It fixes compilation breakage in some cases. I think the author of
> > this patch can (should) elaborate.
> > Also, it might need a Fixes tag.
>
> Um, it's really hard to say which commit is fixed, just because this
> header file defines a GPIOD, and someone else uses this later.

I think we may use the original commit where the header in mips
appeared with a justification that the definitions are not needed to
be there and it may induce build errors, which in fact happens.

-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] MIPS: rb532: move GPIOD definition into C-files
  2022-03-30  9:56             ` Jackie Liu
  2022-03-30 10:01               ` Andy Shevchenko
@ 2022-03-30 10:02               ` Thomas Bogendoerfer
  1 sibling, 0 replies; 14+ messages in thread
From: Thomas Bogendoerfer @ 2022-03-30 10:02 UTC (permalink / raw)
  To: Jackie Liu
  Cc: Andy Shevchenko, Linus Walleij, Ralf Baechle,
	open list:BROADCOM NVRAM DRIVER, Jonathan Cameron

On Wed, Mar 30, 2022 at 05:56:03PM +0800, Jackie Liu wrote:
> 
> 在 2022/3/30 下午5:41, Andy Shevchenko 写道:
> > On Wed, Mar 30, 2022 at 12:32 PM Thomas Bogendoerfer
> > <tsbogend@alpha.franken.de> wrote:
> > > On Wed, Mar 30, 2022 at 12:23:59PM +0300, Andy Shevchenko wrote:
> > > > On Wed, Mar 30, 2022 at 9:45 AM Thomas Bogendoerfer
> > > > <tsbogend@alpha.franken.de> wrote:
> > > > > On Wed, Mar 30, 2022 at 09:46:07AM +0800, Jackie Liu wrote:
> > 
> > ...
> > 
> > > > > I have a patchset, where the both files will go away. No need to
> > > > > clean up now.
> > > > 
> > > > Do you plan them to be backported? If not, I would recommend applying
> > > 
> > > no plan for backporting
> > > 
> > > > this patch in order to have it backported and then do whatever you
> > > > want we those files.
> > > 
> > > why ? This doesn't fix anything, doesn't it ?
> 
> Like the patch I submitted in the first version, there are some gcc
> errors.
> 
> [...]
> drivers/iio/adc/da9150-gpadc.c:254:13: error: ‘DA9150_GPADC_CHAN_0x08’
> undeclared here (not in a function); did you mean ‘DA9150_GPADC_CHAN_TBAT’?
>    254 |  .channel = DA9150_GPADC_CHAN_##_id,   \
>        |             ^~~~~~~~~~~~~~~~~~
>  drivers/iio/adc/da9150-gpadc.c:273:2: note: in expansion of macro
> ‘DA9150_GPADC_CHANNEL’
>    273 |  DA9150_GPADC_CHANNEL(_id, _hw_id, _type,   \
>        |  ^~~~~~~~~~~~~~~~~~~~
>  drivers/iio/adc/da9150-gpadc.c:281:2: note: in expansion of macro
> ‘DA9150_GPADC_CHANNEL_PROCESSED’
>    281 |  DA9150_GPADC_CHANNEL_PROCESSED(GPIOD, GPIOD_6V, IIO_VOLTAGE,
> NULL),
>        |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> make[4]: *** [../scripts/Makefile.build:288: drivers/iio/adc/da9150-gpadc.o]
> Error 1
> make[3]: *** [../scripts/Makefile.build:550: drivers/iio/adc] Error 2
> make[3]: *** Waiting for unfinished jobs....
> 
> > 
> > It fixes compilation breakage in some cases. I think the author of
> > this patch can (should) elaborate.
> > Also, it might need a Fixes tag.
> 
> 
> Um, it's really hard to say which commit is fixed, just because this
> header file defines a GPIOD, and someone else uses this later.

ok, now I got it.

> > > But if it makes people happy, I'll apply it.
> > 
> > Yes, please.

will do,

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] MIPS: rb532: move GPIOD definition into C-files
  2022-03-30 10:01               ` Andy Shevchenko
@ 2022-03-30 10:04                 ` Jackie Liu
  0 siblings, 0 replies; 14+ messages in thread
From: Jackie Liu @ 2022-03-30 10:04 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Thomas Bogendoerfer, Linus Walleij, Ralf Baechle,
	open list:BROADCOM NVRAM DRIVER, Jonathan Cameron



在 2022/3/30 下午6:01, Andy Shevchenko 写道:
> On Wed, Mar 30, 2022 at 12:56 PM Jackie Liu <liu.yun@linux.dev> wrote:
>> 在 2022/3/30 下午5:41, Andy Shevchenko 写道:
>>> On Wed, Mar 30, 2022 at 12:32 PM Thomas Bogendoerfer
>>> <tsbogend@alpha.franken.de> wrote:
> 
> ...
> 
>>> It fixes compilation breakage in some cases. I think the author of
>>> this patch can (should) elaborate.
>>> Also, it might need a Fixes tag.
>>
>> Um, it's really hard to say which commit is fixed, just because this
>> header file defines a GPIOD, and someone else uses this later.
> 
> I think we may use the original commit where the header in mips
> appeared with a justification that the definitions are not needed to
> be there and it may induce build errors, which in fact happens.
> 

Sure, Thanks, I will send new patch v3 later.

--
BR, Jackie Liu

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-03-30 11:01 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-29  1:45 [PATCH] MIPS: rb532: move GPIOD definition into C-files Jackie Liu
2022-03-29 12:54 ` Andy Shevchenko
2022-03-30  1:46   ` Jackie Liu
2022-03-30  6:42     ` Thomas Bogendoerfer
2022-03-30  9:23       ` Andy Shevchenko
2022-03-30  9:32         ` Thomas Bogendoerfer
2022-03-30  9:41           ` Andy Shevchenko
2022-03-30  9:56             ` Jackie Liu
2022-03-30 10:01               ` Andy Shevchenko
2022-03-30 10:04                 ` Jackie Liu
2022-03-30 10:02               ` Thomas Bogendoerfer
2022-03-30  2:01   ` [PATCH v2] " Jackie Liu
2022-03-30  2:07   ` [PATCH v3] " Jackie Liu
2022-03-30  8:52     ` Sergei Shtylyov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.