From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754505AbcCAPUh (ORCPT ); Tue, 1 Mar 2016 10:20:37 -0500 Received: from down.free-electrons.com ([37.187.137.238]:39288 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754051AbcCAPUg (ORCPT ); Tue, 1 Mar 2016 10:20:36 -0500 Date: Tue, 1 Mar 2016 16:20:34 +0100 From: Alexandre Belloni To: Thierry Reding Cc: Sudip Mukherjee , Alessandro Zummo , linux-kernel@vger.kernel.org, rtc-linux@googlegroups.com Subject: Re: [PATCH] rtc: rtc-vr41xx: remove unused function Message-ID: <20160301152034.GA23985@piout.net> References: <1456836981-30999-1-git-send-email-sudipm.mukherjee@gmail.com> <20160301145558.GC26201@ulmo> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20160301145558.GC26201@ulmo> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/03/2016 at 15:55:58 +0100, Thierry Reding wrote : > On Tue, Mar 01, 2016 at 06:26:21PM +0530, Sudip Mukherjee wrote: > > We were getting build warning about: > > drivers/rtc/rtc-vr41xx.c:228:12: warning: ‘vr41xx_rtc_alarm_irq_enable’ > > defined but not used > > > > The function vr41xx_rtc_alarm_irq_enable() was not used anywhere. > > > > Signed-off-by: Sudip Mukherjee > > --- > > > > build log is at: > > https://travis-ci.org/sudipm-mukherjee/parport/jobs/112780206 > > > > drivers/rtc/rtc-vr41xx.c | 18 ------------------ > > 1 file changed, 18 deletions(-) > > > > diff --git a/drivers/rtc/rtc-vr41xx.c b/drivers/rtc/rtc-vr41xx.c > > index f64c282..68cb63e 100644 > > --- a/drivers/rtc/rtc-vr41xx.c > > +++ b/drivers/rtc/rtc-vr41xx.c > > @@ -225,24 +225,6 @@ static int vr41xx_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long > > return 0; > > } > > > > -static int vr41xx_rtc_alarm_irq_enable(struct device *dev, unsigned int enabled) > > -{ > > - spin_lock_irq(&rtc_lock); > > - if (enabled) { > > - if (!alarm_enabled) { > > - enable_irq(aie_irq); > > - alarm_enabled = 1; > > - } > > - } else { > > - if (alarm_enabled) { > > - disable_irq(aie_irq); > > - alarm_enabled = 0; > > - } > > - } > > - spin_unlock_irq(&rtc_lock); > > - return 0; > > -} > > - > > I don't think it's supposed to be unused, rather back at the time it > simply wasn't hooked up to the rtc_class_ops. > > Here's what I used. > I've already applied the patch from Geert which does the same. -- Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com