diff mbox

rtc: rtc-rx8025: remove obsolete local_irq_disable() and local_irq_enable() for rtc_update_irq()

Message ID FC629F1A536C6F42B960B5E32E20BD35922297@exc2.buero.ginzinger.com
State Superseded
Headers show

Commit Message

Roosen Henri July 21, 2015, 7:11 a.m. UTC
From b68f4bd992a6bf538edb860662be3178394f8bf5 Mon Sep 17 00:00:00 2001
From: Henri Roosen <henri.roosen@ginzinger.com>
Date: Thu, 16 Jul 2015 10:16:41 +0200
Subject: [PATCH] rtc: rtc-rx8025: remove obsolete local_irq_disable() and
 local_irq_enable() for rtc_update_irq()

Since commit e6229bec25be4ba00f31dd26e25721cc96c22262 rtc_update_irq()
is callable with irqs enabled.

Signed-off-by: Henri Roosen <henri.roosen@ginzinger.com>
---
 drivers/rtc/rtc-rx8025.c | 4 ----
 1 file changed, 4 deletions(-)

--
2.1.4

Comments

Alexandre Belloni July 22, 2015, 10:05 p.m. UTC | #1
Hi,

Seems good to me, I had a similar cleanup that I didn't send yet. do you
have an rx8025? I have more cleanups and I can't test them.

On 21/07/2015 at 07:11:02 +0000, Roosen Henri wrote :
> From b68f4bd992a6bf538edb860662be3178394f8bf5 Mon Sep 17 00:00:00 2001
> From: Henri Roosen <henri.roosen@ginzinger.com>
> Date: Thu, 16 Jul 2015 10:16:41 +0200
> Subject: [PATCH] rtc: rtc-rx8025: remove obsolete local_irq_disable() and
>  local_irq_enable() for rtc_update_irq()
> 
> Since commit e6229bec25be4ba00f31dd26e25721cc96c22262 rtc_update_irq()
> is callable with irqs enabled.
> 

This triggers a checkpatch warning:
 ERROR: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 0123456789ab ("commit description")'
 #14: Since commit e6229bec25be4ba00f31dd26e25721cc96c22262 rtc_update_irq()

> Signed-off-by: Henri Roosen <henri.roosen@ginzinger.com>
> ---
>  drivers/rtc/rtc-rx8025.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/rtc/rtc-rx8025.c b/drivers/rtc/rtc-rx8025.c
> index e6298e0..9be9c37 100644
> --- a/drivers/rtc/rtc-rx8025.c
> +++ b/drivers/rtc/rtc-rx8025.c
> @@ -161,9 +161,7 @@ static void rx8025_work(struct work_struct *work)
>         if (status & RX8025_BIT_CTRL2_CTFG) {
>                 /* periodic */
>                 status &= ~RX8025_BIT_CTRL2_CTFG;
> -               local_irq_disable();
>                 rtc_update_irq(rx8025->rtc, 1, RTC_PF | RTC_IRQF);
> -               local_irq_enable();
>         }
> 
>         if (status & RX8025_BIT_CTRL2_DAFG) {
> @@ -172,9 +170,7 @@ static void rx8025_work(struct work_struct *work)
>                 if (rx8025_write_reg(client, RX8025_REG_CTRL1,
>                                      rx8025->ctrl1 & ~RX8025_BIT_CTRL1_DALE))
>                         goto out;
> -               local_irq_disable();
>                 rtc_update_irq(rx8025->rtc, 1, RTC_AF | RTC_IRQF);
> -               local_irq_enable();
>         }
> 
>         /* acknowledge IRQ */

Unfortunately, your patch doesn't apply because the identation has ben
mangled, probably by your mailer (tabs became spaces). Can you resend?
Roosen Henri July 24, 2015, 8:14 a.m. UTC | #2
> -----Ursprüngliche Nachricht-----
> Von: Alexandre Belloni [mailto:alexandre.belloni@free-electrons.com]
> Gesendet: Donnerstag, 23. Juli 2015 00:05
> An: Roosen Henri
> Cc: rtc-linux@googlegroups.com; a.zummo@towertech.it
> Betreff: Re: [PATCH] rtc: rtc-rx8025: remove obsolete local_irq_disable() and
> local_irq_enable() for rtc_update_irq()
>
> Hi,

Hi Alexandre,

>
> Seems good to me, I had a similar cleanup that I didn't send yet. do you have
> an rx8025? I have more cleanups and I can't test them.
>

Unfortunately I don't have a rx8025. But I have a system with a rx8803. The manufacturer is providing a driver which is derived from the rx8025 driver.

> On 21/07/2015 at 07:11:02 +0000, Roosen Henri wrote :
> > From b68f4bd992a6bf538edb860662be3178394f8bf5 Mon Sep 17 00:00:00
> 2001
> > From: Henri Roosen <henri.roosen@ginzinger.com>
> > Date: Thu, 16 Jul 2015 10:16:41 +0200
> > Subject: [PATCH] rtc: rtc-rx8025: remove obsolete local_irq_disable()
> > and
> >  local_irq_enable() for rtc_update_irq()
> >
> > Since commit e6229bec25be4ba00f31dd26e25721cc96c22262
> rtc_update_irq()
> > is callable with irqs enabled.
> >
>
> This triggers a checkpatch warning:
>  ERROR: Please use git commit description style 'commit <12+ chars of sha1>
> ("<title line>")' - ie: 'commit 0123456789ab ("commit description")'
>  #14: Since commit e6229bec25be4ba00f31dd26e25721cc96c22262
> rtc_update_irq()
>

Sorry, I missed this for the previous patches. I'll fix it and send a new version (v3) of the patch.

> > Signed-off-by: Henri Roosen <henri.roosen@ginzinger.com>
> > ---
> >  drivers/rtc/rtc-rx8025.c | 4 ----
> >  1 file changed, 4 deletions(-)
> >
> > diff --git a/drivers/rtc/rtc-rx8025.c b/drivers/rtc/rtc-rx8025.c index
> > e6298e0..9be9c37 100644
> > --- a/drivers/rtc/rtc-rx8025.c
> > +++ b/drivers/rtc/rtc-rx8025.c
> > @@ -161,9 +161,7 @@ static void rx8025_work(struct work_struct *work)
> >         if (status & RX8025_BIT_CTRL2_CTFG) {
> >                 /* periodic */
> >                 status &= ~RX8025_BIT_CTRL2_CTFG;
> > -               local_irq_disable();
> >                 rtc_update_irq(rx8025->rtc, 1, RTC_PF | RTC_IRQF);
> > -               local_irq_enable();
> >         }
> >
> >         if (status & RX8025_BIT_CTRL2_DAFG) { @@ -172,9 +170,7 @@
> > static void rx8025_work(struct work_struct *work)
> >                 if (rx8025_write_reg(client, RX8025_REG_CTRL1,
> >                                      rx8025->ctrl1 & ~RX8025_BIT_CTRL1_DALE))
> >                         goto out;
> > -               local_irq_disable();
> >                 rtc_update_irq(rx8025->rtc, 1, RTC_AF | RTC_IRQF);
> > -               local_irq_enable();
> >         }
> >
> >         /* acknowledge IRQ */
>
> Unfortunately, your patch doesn't apply because the identation has ben
> mangled, probably by your mailer (tabs became spaces). Can you resend?

I've switched now to using git send-email on my private email address. This should not mangle the patch anymore. Please find patch v3 in a little while.

Thanks,
Henri

>
> --
> Alexandre Belloni, Free Electrons
> Embedded Linux, Kernel and Android engineering http://free-electrons.com
Alexandre Belloni July 24, 2015, 8:33 a.m. UTC | #3
Hi,

On 24/07/2015 at 08:14:58 +0000, Roosen Henri wrote :
> >
> > Seems good to me, I had a similar cleanup that I didn't send yet. do you have
> > an rx8025? I have more cleanups and I can't test them.
> >
> 
> Unfortunately I don't have a rx8025. But I have a system with a rx8803. The manufacturer is providing a driver which is derived from the rx8025 driver.
> 

Ok, my cleanup is then adding support for the rx8803. The provided
driver is actually really bad. I'll submit this weekend.
diff mbox

Patch

diff --git a/drivers/rtc/rtc-rx8025.c b/drivers/rtc/rtc-rx8025.c
index e6298e0..9be9c37 100644
--- a/drivers/rtc/rtc-rx8025.c
+++ b/drivers/rtc/rtc-rx8025.c
@@ -161,9 +161,7 @@  static void rx8025_work(struct work_struct *work)
        if (status & RX8025_BIT_CTRL2_CTFG) {
                /* periodic */
                status &= ~RX8025_BIT_CTRL2_CTFG;
-               local_irq_disable();
                rtc_update_irq(rx8025->rtc, 1, RTC_PF | RTC_IRQF);
-               local_irq_enable();
        }

        if (status & RX8025_BIT_CTRL2_DAFG) {
@@ -172,9 +170,7 @@  static void rx8025_work(struct work_struct *work)
                if (rx8025_write_reg(client, RX8025_REG_CTRL1,
                                     rx8025->ctrl1 & ~RX8025_BIT_CTRL1_DALE))
                        goto out;
-               local_irq_disable();
                rtc_update_irq(rx8025->rtc, 1, RTC_AF | RTC_IRQF);
-               local_irq_enable();
        }

        /* acknowledge IRQ */