linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rk808: fix RK818_IRQ_DISCHG_ILIM initializer
@ 2016-09-06 13:13 Arnd Bergmann
  2016-09-13 10:48 ` Lee Jones
  2016-09-14 11:23 ` Lee Jones
  0 siblings, 2 replies; 5+ messages in thread
From: Arnd Bergmann @ 2016-09-06 13:13 UTC (permalink / raw)
  To: Lee Jones; +Cc: Andy Yan, Arnd Bergmann, Wadim Egorov, linux-kernel

When building with -Woverride-init, we get a warning about an incorrect
initializer:

drivers/mfd/rk808.c:244:8: error: initialized field overwritten [-Werror=override-init]
  [RK818_IRQ_DISCHG_ILIM] = {

This is clearly a mistake, as both RK818_IRQ_DISCHG_ILIM and RK818_IRQ_USB_OV
are defined as '7', but they refer to different register bits. Changing
RK818_IRQ_DISCHG_ILIM to 15 is consistent with how all other 14 interrupts are
handled here, so I'm assuming this is what it should have been.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 2eedcbfc0612 ("mfd: rk808: Add RK818 support")
---
 include/linux/mfd/rk808.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/mfd/rk808.h b/include/linux/mfd/rk808.h
index fc5db6fcb57d..6d435a3c06bc 100644
--- a/include/linux/mfd/rk808.h
+++ b/include/linux/mfd/rk808.h
@@ -244,7 +244,7 @@ enum rk818_reg {
 #define RK818_IRQ_CHG_TS1	12
 #define RK818_IRQ_TS2		13
 #define RK818_IRQ_CHG_CVTLIM	14
-#define RK818_IRQ_DISCHG_ILIM	7
+#define RK818_IRQ_DISCHG_ILIM	15
 
 #define RK818_IRQ_VOUT_LO_MSK		BIT(0)
 #define RK818_IRQ_VB_LO_MSK		BIT(1)
-- 
2.9.0

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

* Re: [PATCH] rk808: fix RK818_IRQ_DISCHG_ILIM initializer
  2016-09-06 13:13 [PATCH] rk808: fix RK818_IRQ_DISCHG_ILIM initializer Arnd Bergmann
@ 2016-09-13 10:48 ` Lee Jones
  2016-09-14  0:49   ` Andy Yan
  2016-09-14 11:23 ` Lee Jones
  1 sibling, 1 reply; 5+ messages in thread
From: Lee Jones @ 2016-09-13 10:48 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Andy Yan, Wadim Egorov, linux-kernel

On Tue, 06 Sep 2016, Arnd Bergmann wrote:

> When building with -Woverride-init, we get a warning about an incorrect
> initializer:
> 
> drivers/mfd/rk808.c:244:8: error: initialized field overwritten [-Werror=override-init]
>   [RK818_IRQ_DISCHG_ILIM] = {
> 
> This is clearly a mistake, as both RK818_IRQ_DISCHG_ILIM and RK818_IRQ_USB_OV
> are defined as '7', but they refer to different register bits. Changing
> RK818_IRQ_DISCHG_ILIM to 15 is consistent with how all other 14 interrupts are
> handled here, so I'm assuming this is what it should have been.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 2eedcbfc0612 ("mfd: rk808: Add RK818 support")
> ---
>  include/linux/mfd/rk808.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

I would like someone who is in possession of a datasheet to confirm
this.

> diff --git a/include/linux/mfd/rk808.h b/include/linux/mfd/rk808.h
> index fc5db6fcb57d..6d435a3c06bc 100644
> --- a/include/linux/mfd/rk808.h
> +++ b/include/linux/mfd/rk808.h
> @@ -244,7 +244,7 @@ enum rk818_reg {
>  #define RK818_IRQ_CHG_TS1	12
>  #define RK818_IRQ_TS2		13
>  #define RK818_IRQ_CHG_CVTLIM	14
> -#define RK818_IRQ_DISCHG_ILIM	7
> +#define RK818_IRQ_DISCHG_ILIM	15
>  
>  #define RK818_IRQ_VOUT_LO_MSK		BIT(0)
>  #define RK818_IRQ_VB_LO_MSK		BIT(1)

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH] rk808: fix RK818_IRQ_DISCHG_ILIM initializer
  2016-09-13 10:48 ` Lee Jones
@ 2016-09-14  0:49   ` Andy Yan
  2016-09-14 11:22     ` Lee Jones
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Yan @ 2016-09-14  0:49 UTC (permalink / raw)
  To: Lee Jones, Arnd Bergmann; +Cc: Wadim Egorov, linux-kernel

Hi:


On 2016年09月13日 18:48, Lee Jones wrote:
> On Tue, 06 Sep 2016, Arnd Bergmann wrote:
>
>> When building with -Woverride-init, we get a warning about an incorrect
>> initializer:
>>
>> drivers/mfd/rk808.c:244:8: error: initialized field overwritten [-Werror=override-init]
>>    [RK818_IRQ_DISCHG_ILIM] = {
>>
>> This is clearly a mistake, as both RK818_IRQ_DISCHG_ILIM and RK818_IRQ_USB_OV
>> are defined as '7', but they refer to different register bits. Changing
>> RK818_IRQ_DISCHG_ILIM to 15 is consistent with how all other 14 interrupts are
>> handled here, so I'm assuming this is what it should have been.
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> Fixes: 2eedcbfc0612 ("mfd: rk808: Add RK818 support")
>> ---
>>   include/linux/mfd/rk808.h | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
> I would like someone who is in possession of a datasheet to confirm
> this.

     According to the datasheet, the RK818_IRQ_USB_OV is in bit 7 of 
INT_STS_REG1(0x4c) and RK818_IRQ_DISCHG_ILIM is in bit 7 of 
INT_STS_REG2(0x4e), so  Arnd's change is right.


     Thanks.
>> diff --git a/include/linux/mfd/rk808.h b/include/linux/mfd/rk808.h
>> index fc5db6fcb57d..6d435a3c06bc 100644
>> --- a/include/linux/mfd/rk808.h
>> +++ b/include/linux/mfd/rk808.h
>> @@ -244,7 +244,7 @@ enum rk818_reg {
>>   #define RK818_IRQ_CHG_TS1	12
>>   #define RK818_IRQ_TS2		13
>>   #define RK818_IRQ_CHG_CVTLIM	14
>> -#define RK818_IRQ_DISCHG_ILIM	7
>> +#define RK818_IRQ_DISCHG_ILIM	15
>>   
>>   #define RK818_IRQ_VOUT_LO_MSK		BIT(0)
>>   #define RK818_IRQ_VB_LO_MSK		BIT(1)

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

* Re: [PATCH] rk808: fix RK818_IRQ_DISCHG_ILIM initializer
  2016-09-14  0:49   ` Andy Yan
@ 2016-09-14 11:22     ` Lee Jones
  0 siblings, 0 replies; 5+ messages in thread
From: Lee Jones @ 2016-09-14 11:22 UTC (permalink / raw)
  To: Andy Yan; +Cc: Arnd Bergmann, Wadim Egorov, linux-kernel

On Wed, 14 Sep 2016, Andy Yan wrote:
> On 2016年09月13日 18:48, Lee Jones wrote:
> > On Tue, 06 Sep 2016, Arnd Bergmann wrote:
> > 
> > > When building with -Woverride-init, we get a warning about an incorrect
> > > initializer:
> > > 
> > > drivers/mfd/rk808.c:244:8: error: initialized field overwritten [-Werror=override-init]
> > >    [RK818_IRQ_DISCHG_ILIM] = {
> > > 
> > > This is clearly a mistake, as both RK818_IRQ_DISCHG_ILIM and RK818_IRQ_USB_OV
> > > are defined as '7', but they refer to different register bits. Changing
> > > RK818_IRQ_DISCHG_ILIM to 15 is consistent with how all other 14 interrupts are
> > > handled here, so I'm assuming this is what it should have been.
> > > 
> > > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > > Fixes: 2eedcbfc0612 ("mfd: rk808: Add RK818 support")
> > > ---
> > >   include/linux/mfd/rk808.h | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > I would like someone who is in possession of a datasheet to confirm
> > this.
> 
>     According to the datasheet, the RK818_IRQ_USB_OV is in bit 7 of
> INT_STS_REG1(0x4c) and RK818_IRQ_DISCHG_ILIM is in bit 7 of
> INT_STS_REG2(0x4e), so  Arnd's change is right.

I'll take that as an Ack.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH] rk808: fix RK818_IRQ_DISCHG_ILIM initializer
  2016-09-06 13:13 [PATCH] rk808: fix RK818_IRQ_DISCHG_ILIM initializer Arnd Bergmann
  2016-09-13 10:48 ` Lee Jones
@ 2016-09-14 11:23 ` Lee Jones
  1 sibling, 0 replies; 5+ messages in thread
From: Lee Jones @ 2016-09-14 11:23 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Andy Yan, Wadim Egorov, linux-kernel

On Tue, 06 Sep 2016, Arnd Bergmann wrote:

> When building with -Woverride-init, we get a warning about an incorrect
> initializer:
> 
> drivers/mfd/rk808.c:244:8: error: initialized field overwritten [-Werror=override-init]
>   [RK818_IRQ_DISCHG_ILIM] = {
> 
> This is clearly a mistake, as both RK818_IRQ_DISCHG_ILIM and RK818_IRQ_USB_OV
> are defined as '7', but they refer to different register bits. Changing
> RK818_IRQ_DISCHG_ILIM to 15 is consistent with how all other 14 interrupts are
> handled here, so I'm assuming this is what it should have been.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 2eedcbfc0612 ("mfd: rk808: Add RK818 support")
> ---
>  include/linux/mfd/rk808.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

> diff --git a/include/linux/mfd/rk808.h b/include/linux/mfd/rk808.h
> index fc5db6fcb57d..6d435a3c06bc 100644
> --- a/include/linux/mfd/rk808.h
> +++ b/include/linux/mfd/rk808.h
> @@ -244,7 +244,7 @@ enum rk818_reg {
>  #define RK818_IRQ_CHG_TS1	12
>  #define RK818_IRQ_TS2		13
>  #define RK818_IRQ_CHG_CVTLIM	14
> -#define RK818_IRQ_DISCHG_ILIM	7
> +#define RK818_IRQ_DISCHG_ILIM	15
>  
>  #define RK818_IRQ_VOUT_LO_MSK		BIT(0)
>  #define RK818_IRQ_VB_LO_MSK		BIT(1)

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

end of thread, other threads:[~2016-09-14 11:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-06 13:13 [PATCH] rk808: fix RK818_IRQ_DISCHG_ILIM initializer Arnd Bergmann
2016-09-13 10:48 ` Lee Jones
2016-09-14  0:49   ` Andy Yan
2016-09-14 11:22     ` Lee Jones
2016-09-14 11:23 ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).