Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1482365

Re: [PATCH] rk808: fix RK818_IRQ_DISCHG_ILIM initializer

From Lee Jones <lee.jones@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH] rk808: fix RK818_IRQ_DISCHG_ILIM initializer
Date 2016-09-13 12:50 +0200
Message-ID <sgTrQ-E8-39@gated-at.bofh.it> (permalink)
References <seos9-2uF-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH] rk808: fix RK818_IRQ_DISCHG_ILIM initializer Lee Jones <lee.jones@linaro.org> - 2016-09-13 12:50 +0200
  Re: [PATCH] rk808: fix RK818_IRQ_DISCHG_ILIM initializer Andy Yan <andy.yan@rock-chips.com> - 2016-09-14 02:50 +0200
    Re: [PATCH] rk808: fix RK818_IRQ_DISCHG_ILIM initializer Lee Jones <lee.jones@linaro.org> - 2016-09-14 13:30 +0200

csiph-web