From: Thierry Reding <thierry.reding@gmail.com>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>,
Alexandre Belloni <alexandre.belloni@free-electrons.com>,
linux-kernel@vger.kernel.org, rtc-linux@googlegroups.com
Subject: [rtc-linux] Re: [PATCH] rtc: rtc-vr41xx: remove unused function
Date: Tue, 1 Mar 2016 15:55:58 +0100 [thread overview]
Message-ID: <20160301145558.GC26201@ulmo> (raw)
In-Reply-To: <1456836981-30999-1-git-send-email-sudipm.mukherjee@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3155 bytes --]
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 <sudip.mukherjee@codethink.co.uk>
> ---
>
> 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.
Thierry
--- >8 ---
>From 91c39e61b10551f8fbdb55cadbc29a104071bea2 Mon Sep 17 00:00:00 2001
From: Thierry Reding <treding@nvidia.com>
Date: Tue, 1 Mar 2016 15:50:25 +0100
Subject: [PATCH] rtc: vr41xx: Hook up ->alarm_irq_enable()
The vr41xx_rtc_alarm_irq_enable() function was extracted in commit
16380c153a69 ("RTC: Convert rtc drivers to use the alarm_irq_enable
method") from a more generic IOCTL handler. However the function was
never hooked up to the struct rtc_class_ops to which a new callback
had earlier been added for this purpose in commit 099e657625e8 ("rtc:
add alarm/update irq interfaces").
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
drivers/rtc/rtc-vr41xx.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/rtc/rtc-vr41xx.c b/drivers/rtc/rtc-vr41xx.c
index f64c282275b3..898fdd03668d 100644
--- a/drivers/rtc/rtc-vr41xx.c
+++ b/drivers/rtc/rtc-vr41xx.c
@@ -278,6 +278,7 @@ static const struct rtc_class_ops vr41xx_rtc_ops = {
.set_time = vr41xx_rtc_set_time,
.read_alarm = vr41xx_rtc_read_alarm,
.set_alarm = vr41xx_rtc_set_alarm,
+ .alarm_irq_enable = vr41xx_rtc_alarm_irq_enable,
};
static int rtc_probe(struct platform_device *pdev)
--
2.7.1
--
--
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Thierry Reding <thierry.reding@gmail.com>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>,
Alexandre Belloni <alexandre.belloni@free-electrons.com>,
linux-kernel@vger.kernel.org, rtc-linux@googlegroups.com
Subject: Re: [PATCH] rtc: rtc-vr41xx: remove unused function
Date: Tue, 1 Mar 2016 15:55:58 +0100 [thread overview]
Message-ID: <20160301145558.GC26201@ulmo> (raw)
In-Reply-To: <1456836981-30999-1-git-send-email-sudipm.mukherjee@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2624 bytes --]
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 <sudip.mukherjee@codethink.co.uk>
> ---
>
> 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.
Thierry
--- >8 ---
From 91c39e61b10551f8fbdb55cadbc29a104071bea2 Mon Sep 17 00:00:00 2001
From: Thierry Reding <treding@nvidia.com>
Date: Tue, 1 Mar 2016 15:50:25 +0100
Subject: [PATCH] rtc: vr41xx: Hook up ->alarm_irq_enable()
The vr41xx_rtc_alarm_irq_enable() function was extracted in commit
16380c153a69 ("RTC: Convert rtc drivers to use the alarm_irq_enable
method") from a more generic IOCTL handler. However the function was
never hooked up to the struct rtc_class_ops to which a new callback
had earlier been added for this purpose in commit 099e657625e8 ("rtc:
add alarm/update irq interfaces").
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
drivers/rtc/rtc-vr41xx.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/rtc/rtc-vr41xx.c b/drivers/rtc/rtc-vr41xx.c
index f64c282275b3..898fdd03668d 100644
--- a/drivers/rtc/rtc-vr41xx.c
+++ b/drivers/rtc/rtc-vr41xx.c
@@ -278,6 +278,7 @@ static const struct rtc_class_ops vr41xx_rtc_ops = {
.set_time = vr41xx_rtc_set_time,
.read_alarm = vr41xx_rtc_read_alarm,
.set_alarm = vr41xx_rtc_set_alarm,
+ .alarm_irq_enable = vr41xx_rtc_alarm_irq_enable,
};
static int rtc_probe(struct platform_device *pdev)
--
2.7.1
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-03-01 14:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-01 12:56 [rtc-linux] [PATCH] rtc: rtc-vr41xx: remove unused function Sudip Mukherjee
2016-03-01 12:56 ` Sudip Mukherjee
2016-03-01 14:55 ` Thierry Reding [this message]
2016-03-01 14:55 ` Thierry Reding
2016-03-01 15:20 ` [rtc-linux] " Alexandre Belloni
2016-03-01 15:20 ` Alexandre Belloni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160301145558.GC26201@ulmo \
--to=thierry.reding@gmail.com \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@free-electrons.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rtc-linux@googlegroups.com \
--cc=sudipm.mukherjee@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.