From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752842AbdGEVxE (ORCPT ); Wed, 5 Jul 2017 17:53:04 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:36660 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751703AbdGEVxB (ORCPT ); Wed, 5 Jul 2017 17:53:01 -0400 Subject: Re: [PATCH] rtc: brcmstb-waketimer: fix settime function To: Alexandre Belloni , Arnd Bergmann Cc: Alessandro Zummo , Brian Norris , Gregory Fong , bcm-kernel-feedback-list@broadcom.com, Markus Mayer , linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20170628200839.3114345-1-arnd@arndb.de> <20170705211327.guccztud22hcmfjy@piout.net> From: Florian Fainelli Message-ID: Date: Wed, 5 Jul 2017 14:52:46 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20170705211327.guccztud22hcmfjy@piout.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/05/2017 02:13 PM, Alexandre Belloni wrote: > Hi, > > On 28/06/2017 at 22:07:34 +0200, Arnd Bergmann wrote: >> gcc warns about an unused variable in the new driver: >> >> drivers/rtc/rtc-brcmstb-waketimer.c: In function 'brcmstb_waketmr_settime': >> drivers/rtc/rtc-brcmstb-waketimer.c:142:6: error: unused variable 'ret' [-Werror=unused-variable] >> >> The same function also doesn't handle overflow correctly, this makes >> it return -EINVAL when passed a time that doesn't fit within the >> range of the register. >> >> Fixes: 9f4ad359c801 ("rtc: brcmstb-waketimer: Add Broadcom STB wake-timer") >> Signed-off-by: Arnd Bergmann >> --- >> drivers/rtc/rtc-brcmstb-waketimer.c | 19 ++++++++++++------- >> 1 file changed, 12 insertions(+), 7 deletions(-) >> > > I've squashed it in the original commit, I hope this is fine for you. Works for me, thanks Alexandre! -- Florian From mboxrd@z Thu Jan 1 00:00:00 1970 From: f.fainelli@gmail.com (Florian Fainelli) Date: Wed, 5 Jul 2017 14:52:46 -0700 Subject: [PATCH] rtc: brcmstb-waketimer: fix settime function In-Reply-To: <20170705211327.guccztud22hcmfjy@piout.net> References: <20170628200839.3114345-1-arnd@arndb.de> <20170705211327.guccztud22hcmfjy@piout.net> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 07/05/2017 02:13 PM, Alexandre Belloni wrote: > Hi, > > On 28/06/2017 at 22:07:34 +0200, Arnd Bergmann wrote: >> gcc warns about an unused variable in the new driver: >> >> drivers/rtc/rtc-brcmstb-waketimer.c: In function 'brcmstb_waketmr_settime': >> drivers/rtc/rtc-brcmstb-waketimer.c:142:6: error: unused variable 'ret' [-Werror=unused-variable] >> >> The same function also doesn't handle overflow correctly, this makes >> it return -EINVAL when passed a time that doesn't fit within the >> range of the register. >> >> Fixes: 9f4ad359c801 ("rtc: brcmstb-waketimer: Add Broadcom STB wake-timer") >> Signed-off-by: Arnd Bergmann >> --- >> drivers/rtc/rtc-brcmstb-waketimer.c | 19 ++++++++++++------- >> 1 file changed, 12 insertions(+), 7 deletions(-) >> > > I've squashed it in the original commit, I hope this is fine for you. Works for me, thanks Alexandre! -- Florian