From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933073AbcINAtP (ORCPT ); Tue, 13 Sep 2016 20:49:15 -0400 Received: from regular1.263xmail.com ([211.150.99.130]:59769 "EHLO regular1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932558AbcINAtO (ORCPT ); Tue, 13 Sep 2016 20:49:14 -0400 X-263anti-spam: KSV:0;BIG:0;ABS:1;DNS:0;ATT:0;SPF:S; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 1 X-SKE-CHECKED: 1 X-ADDR-CHECKED4: 1 X-RL-SENDER: andy.yan@rock-chips.com X-FST-TO: linux-kernel@vger.kernel.org X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: andy.yan@rock-chips.com X-UNIQUE-TAG: <884313d0850e5b0dccb8b613eaf3e8d5> X-ATTACHMENT-NUM: 0 X-DNS-TYPE: 0 Subject: Re: [PATCH] rk808: fix RK818_IRQ_DISCHG_ILIM initializer To: Lee Jones , Arnd Bergmann References: <20160906131351.1845848-1-arnd@arndb.de> <20160913104826.GB26864@dell> Cc: Wadim Egorov , linux-kernel@vger.kernel.org From: Andy Yan Message-ID: <17d9ef19-7760-c38f-8a72-b3427369c2cc@rock-chips.com> Date: Wed, 14 Sep 2016 08:49:04 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160913104826.GB26864@dell> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >> 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)