From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: trivial@kernel.org, linaro-kernel@lists.linaro.org,
linux-kernel@vger.kernel.org,
Hans Ulli Kroll <ulli.kroll@googlemail.com>,
"moderated list:BLACKFIN RTC DRIVER"
<adi-buildroot-devel@lists.sourceforge.net>,
Alessandro Zummo <a.zummo@towertech.it>,
"moderated list:ARM/CORTINA SYSTEMS GEMINI ARM ARCHITECTURE"
<linux-arm-kernel@lists.infradead.org>,
"open list:REAL TIME CLOCK (RTC) SUBSYSTEM"
<rtc-linux@googlegroups.com>
Subject: [rtc-linux] Re: [PATCH V1 Resend 06/10] drivers: rtc: Drop (un)likely before IS_ERR(_OR_NULL)
Date: Wed, 12 Aug 2015 12:41:33 +0200 [thread overview]
Message-ID: <20150812104133.GE3411@piout.net> (raw)
In-Reply-To: <1a92f2e1af5309ece9736f79f312e90486a98825.1439375087.git.viresh.kumar@linaro.org>
Hi Viresh,
Why are you resending?
On 12/08/2015 at 15:59:43 +0530, Viresh Kumar wrote :
> IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag and there
> is no need to do that again from its callers. Drop it.
>
> gemini driver was using likely() for a failure case while the rtc driver
> is getting registered. That looks wrong and it should really be
> unlikely. But because we are killing all the unlikely() flags, lets kill
> that too.
>
> Acked-by: Hans Ulli Kroll <ulli.kroll@googlemail.com> (gemini)
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
> drivers/rtc/interface.c | 2 +-
> drivers/rtc/rtc-bfin.c | 2 +-
> drivers/rtc/rtc-gemini.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
> index 11b639067312..5836751b8203 100644
> --- a/drivers/rtc/interface.c
> +++ b/drivers/rtc/interface.c
> @@ -564,7 +564,7 @@ enum hrtimer_restart rtc_pie_update_irq(struct hrtimer *timer)
> void rtc_update_irq(struct rtc_device *rtc,
> unsigned long num, unsigned long events)
> {
> - if (unlikely(IS_ERR_OR_NULL(rtc)))
> + if (IS_ERR_OR_NULL(rtc))
> return;
>
> pm_stay_awake(rtc->dev.parent);
> diff --git a/drivers/rtc/rtc-bfin.c b/drivers/rtc/rtc-bfin.c
> index 3d44b11721ea..535a5f9338d0 100644
> --- a/drivers/rtc/rtc-bfin.c
> +++ b/drivers/rtc/rtc-bfin.c
> @@ -361,7 +361,7 @@ static int bfin_rtc_probe(struct platform_device *pdev)
> /* Register our RTC with the RTC framework */
> rtc->rtc_dev = devm_rtc_device_register(dev, pdev->name, &bfin_rtc_ops,
> THIS_MODULE);
> - if (unlikely(IS_ERR(rtc->rtc_dev)))
> + if (IS_ERR(rtc->rtc_dev))
> return PTR_ERR(rtc->rtc_dev);
>
> /* Grab the IRQ and init the hardware */
> diff --git a/drivers/rtc/rtc-gemini.c b/drivers/rtc/rtc-gemini.c
> index 35f4486738fc..2fed93e1114a 100644
> --- a/drivers/rtc/rtc-gemini.c
> +++ b/drivers/rtc/rtc-gemini.c
> @@ -148,7 +148,7 @@ static int gemini_rtc_probe(struct platform_device *pdev)
>
> rtc->rtc_dev = rtc_device_register(pdev->name, dev,
> &gemini_rtc_ops, THIS_MODULE);
> - if (likely(IS_ERR(rtc->rtc_dev)))
> + if (IS_ERR(rtc->rtc_dev))
> return PTR_ERR(rtc->rtc_dev);
>
> return 0;
> --
> 2.4.0
>
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
--
--
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.
WARNING: multiple messages have this Message-ID (diff)
From: alexandre.belloni@free-electrons.com (Alexandre Belloni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V1 Resend 06/10] drivers: rtc: Drop (un)likely before IS_ERR(_OR_NULL)
Date: Wed, 12 Aug 2015 12:41:33 +0200 [thread overview]
Message-ID: <20150812104133.GE3411@piout.net> (raw)
In-Reply-To: <1a92f2e1af5309ece9736f79f312e90486a98825.1439375087.git.viresh.kumar@linaro.org>
Hi Viresh,
Why are you resending?
On 12/08/2015 at 15:59:43 +0530, Viresh Kumar wrote :
> IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag and there
> is no need to do that again from its callers. Drop it.
>
> gemini driver was using likely() for a failure case while the rtc driver
> is getting registered. That looks wrong and it should really be
> unlikely. But because we are killing all the unlikely() flags, lets kill
> that too.
>
> Acked-by: Hans Ulli Kroll <ulli.kroll@googlemail.com> (gemini)
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
> drivers/rtc/interface.c | 2 +-
> drivers/rtc/rtc-bfin.c | 2 +-
> drivers/rtc/rtc-gemini.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
> index 11b639067312..5836751b8203 100644
> --- a/drivers/rtc/interface.c
> +++ b/drivers/rtc/interface.c
> @@ -564,7 +564,7 @@ enum hrtimer_restart rtc_pie_update_irq(struct hrtimer *timer)
> void rtc_update_irq(struct rtc_device *rtc,
> unsigned long num, unsigned long events)
> {
> - if (unlikely(IS_ERR_OR_NULL(rtc)))
> + if (IS_ERR_OR_NULL(rtc))
> return;
>
> pm_stay_awake(rtc->dev.parent);
> diff --git a/drivers/rtc/rtc-bfin.c b/drivers/rtc/rtc-bfin.c
> index 3d44b11721ea..535a5f9338d0 100644
> --- a/drivers/rtc/rtc-bfin.c
> +++ b/drivers/rtc/rtc-bfin.c
> @@ -361,7 +361,7 @@ static int bfin_rtc_probe(struct platform_device *pdev)
> /* Register our RTC with the RTC framework */
> rtc->rtc_dev = devm_rtc_device_register(dev, pdev->name, &bfin_rtc_ops,
> THIS_MODULE);
> - if (unlikely(IS_ERR(rtc->rtc_dev)))
> + if (IS_ERR(rtc->rtc_dev))
> return PTR_ERR(rtc->rtc_dev);
>
> /* Grab the IRQ and init the hardware */
> diff --git a/drivers/rtc/rtc-gemini.c b/drivers/rtc/rtc-gemini.c
> index 35f4486738fc..2fed93e1114a 100644
> --- a/drivers/rtc/rtc-gemini.c
> +++ b/drivers/rtc/rtc-gemini.c
> @@ -148,7 +148,7 @@ static int gemini_rtc_probe(struct platform_device *pdev)
>
> rtc->rtc_dev = rtc_device_register(pdev->name, dev,
> &gemini_rtc_ops, THIS_MODULE);
> - if (likely(IS_ERR(rtc->rtc_dev)))
> + if (IS_ERR(rtc->rtc_dev))
> return PTR_ERR(rtc->rtc_dev);
>
> return 0;
> --
> 2.4.0
>
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
WARNING: multiple messages have this Message-ID (diff)
From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: trivial@kernel.org, linaro-kernel@lists.linaro.org,
linux-kernel@vger.kernel.org,
Hans Ulli Kroll <ulli.kroll@googlemail.com>,
"moderated list:BLACKFIN RTC DRIVER"
<adi-buildroot-devel@lists.sourceforge.net>,
Alessandro Zummo <a.zummo@towertech.it>,
"moderated list:ARM/CORTINA SYSTEMS GEMINI ARM ARCHITECTURE"
<linux-arm-kernel@lists.infradead.org>,
"open list:REAL TIME CLOCK (RTC) SUBSYSTEM"
<rtc-linux@googlegroups.com>
Subject: Re: [PATCH V1 Resend 06/10] drivers: rtc: Drop (un)likely before IS_ERR(_OR_NULL)
Date: Wed, 12 Aug 2015 12:41:33 +0200 [thread overview]
Message-ID: <20150812104133.GE3411@piout.net> (raw)
In-Reply-To: <1a92f2e1af5309ece9736f79f312e90486a98825.1439375087.git.viresh.kumar@linaro.org>
Hi Viresh,
Why are you resending?
On 12/08/2015 at 15:59:43 +0530, Viresh Kumar wrote :
> IS_ERR(_OR_NULL) already contain an 'unlikely' compiler flag and there
> is no need to do that again from its callers. Drop it.
>
> gemini driver was using likely() for a failure case while the rtc driver
> is getting registered. That looks wrong and it should really be
> unlikely. But because we are killing all the unlikely() flags, lets kill
> that too.
>
> Acked-by: Hans Ulli Kroll <ulli.kroll@googlemail.com> (gemini)
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
> drivers/rtc/interface.c | 2 +-
> drivers/rtc/rtc-bfin.c | 2 +-
> drivers/rtc/rtc-gemini.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
> index 11b639067312..5836751b8203 100644
> --- a/drivers/rtc/interface.c
> +++ b/drivers/rtc/interface.c
> @@ -564,7 +564,7 @@ enum hrtimer_restart rtc_pie_update_irq(struct hrtimer *timer)
> void rtc_update_irq(struct rtc_device *rtc,
> unsigned long num, unsigned long events)
> {
> - if (unlikely(IS_ERR_OR_NULL(rtc)))
> + if (IS_ERR_OR_NULL(rtc))
> return;
>
> pm_stay_awake(rtc->dev.parent);
> diff --git a/drivers/rtc/rtc-bfin.c b/drivers/rtc/rtc-bfin.c
> index 3d44b11721ea..535a5f9338d0 100644
> --- a/drivers/rtc/rtc-bfin.c
> +++ b/drivers/rtc/rtc-bfin.c
> @@ -361,7 +361,7 @@ static int bfin_rtc_probe(struct platform_device *pdev)
> /* Register our RTC with the RTC framework */
> rtc->rtc_dev = devm_rtc_device_register(dev, pdev->name, &bfin_rtc_ops,
> THIS_MODULE);
> - if (unlikely(IS_ERR(rtc->rtc_dev)))
> + if (IS_ERR(rtc->rtc_dev))
> return PTR_ERR(rtc->rtc_dev);
>
> /* Grab the IRQ and init the hardware */
> diff --git a/drivers/rtc/rtc-gemini.c b/drivers/rtc/rtc-gemini.c
> index 35f4486738fc..2fed93e1114a 100644
> --- a/drivers/rtc/rtc-gemini.c
> +++ b/drivers/rtc/rtc-gemini.c
> @@ -148,7 +148,7 @@ static int gemini_rtc_probe(struct platform_device *pdev)
>
> rtc->rtc_dev = rtc_device_register(pdev->name, dev,
> &gemini_rtc_ops, THIS_MODULE);
> - if (likely(IS_ERR(rtc->rtc_dev)))
> + if (IS_ERR(rtc->rtc_dev))
> return PTR_ERR(rtc->rtc_dev);
>
> return 0;
> --
> 2.4.0
>
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2015-08-12 10:41 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-12 10:29 [PATCH V1 Resend 00/10] trivial: Drop unlikely before IS_ERR(_OR_NULL) Viresh Kumar
2015-08-12 10:29 ` [PATCH V1 Resend 01/10] err.h: add (missing) unlikely() to IS_ERR_OR_NULL() Viresh Kumar
2015-10-07 10:35 ` Viresh Kumar
2015-08-12 10:29 ` [PATCH V1 Resend 02/10] PM / OPP: Drop unlikely before IS_ERR(_OR_NULL) Viresh Kumar
2015-08-12 10:29 ` Viresh Kumar
2015-08-28 14:17 ` Rafael J. Wysocki
2015-08-28 13:52 ` Jiri Kosina
2015-08-28 14:30 ` Rafael J. Wysocki
2015-09-09 2:43 ` Viresh Kumar
2015-08-12 10:29 ` [PATCH V1 Resend 03/10] drivers: devfreq: " Viresh Kumar
2015-08-12 10:29 ` Viresh Kumar
2015-08-12 10:29 ` [PATCH V1 Resend 04/10] drivers: misc: " Viresh Kumar
2015-08-12 10:29 ` [PATCH V1 Resend 05/10] drivers: net: " Viresh Kumar
2015-08-12 10:29 ` [rtc-linux] [PATCH V1 Resend 06/10] drivers: rtc: Drop (un)likely " Viresh Kumar
2015-08-12 10:29 ` Viresh Kumar
2015-08-12 10:29 ` Viresh Kumar
2015-08-12 10:41 ` Alexandre Belloni [this message]
2015-08-12 10:41 ` Alexandre Belloni
2015-08-12 10:41 ` Alexandre Belloni
2015-08-12 10:46 ` [rtc-linux] " Viresh Kumar
2015-08-12 10:46 ` Viresh Kumar
2015-08-12 10:46 ` Viresh Kumar
2015-08-12 11:42 ` [rtc-linux] " Alexandre Belloni
2015-08-12 11:42 ` Alexandre Belloni
2015-08-12 11:42 ` Alexandre Belloni
2015-08-12 11:47 ` [rtc-linux] " Viresh Kumar
2015-08-12 11:47 ` Viresh Kumar
2015-08-12 11:47 ` Viresh Kumar
[not found] ` <cover.1439375087.git.viresh.kumar-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-08-12 10:29 ` [PATCH V1 Resend 07/10] fs: Drop unlikely " Viresh Kumar
2015-08-12 10:29 ` Viresh Kumar
2015-08-12 10:29 ` Viresh Kumar
2015-08-12 18:28 ` Jeff Layton
2015-08-20 16:08 ` Steve French
2015-08-20 16:08 ` Steve French
[not found] ` <CAH2r5mvUC2WO6sVqhe_QCgiCJbRbahDsSj=-Uzk7LB_peTqjLQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-08-20 16:14 ` Viresh Kumar
2015-08-20 16:14 ` Viresh Kumar
2015-08-20 16:14 ` Viresh Kumar
2015-08-12 10:29 ` [PATCH V1 Resend 08/10] blk-cgroup: " Viresh Kumar
2015-08-12 10:29 ` [PATCH V1 Resend 09/10] mm: " Viresh Kumar
2015-08-12 10:29 ` Viresh Kumar
2015-08-12 10:29 ` [PATCH V1 Resend 10/10] net: " Viresh Kumar
2015-08-12 10:41 ` Viresh Kumar
2015-08-12 10:29 ` Viresh Kumar
2015-08-18 9:08 ` [PATCH V1 Resend 00/10] trivial: " Viresh Kumar
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=20150812104133.GE3411@piout.net \
--to=alexandre.belloni@free-electrons.com \
--cc=a.zummo@towertech.it \
--cc=adi-buildroot-devel@lists.sourceforge.net \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rtc-linux@googlegroups.com \
--cc=trivial@kernel.org \
--cc=ulli.kroll@googlemail.com \
--cc=viresh.kumar@linaro.org \
/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.