[V1,Resend,06/10] drivers: rtc: Drop (un)likely before IS_ERR(_OR_NULL)

Message ID 1a92f2e1af5309ece9736f79f312e90486a98825.1439375087.git.viresh.kumar@linaro.org
State New
Headers show

Commit Message

Viresh Kumar Aug. 12, 2015, 10:29 a.m.
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(-)

Comments

Viresh Kumar Aug. 12, 2015, 10:46 a.m. | #1
On 12-08-15, 12:41, Alexandre Belloni wrote:
> Hi Viresh,
> 
> Why are you resending?

I never got a reply from Andrew Morton on V1, so resent it again. And
today Andrew asked me to take this via trivial tree.

So the resent.

I need to find a sane way to get few more people to the cover-letter.
The problem is that I am generating the cc-list with get_maintainers,
and if I combine that list for all the patches, it becomes huge. And
really can't send the cover-letter to those people then. Few lists may
block it as well, due to high number of cc'd people.

I am telling this because, the cover-letter did contain the reason for
resend.
Viresh Kumar Aug. 12, 2015, 11:47 a.m. | #2
On 12-08-15, 13:42, Alexandre Belloni wrote:
> The fact is that I sent you a mail yesterday stating that I applied that
> particular patch.

Urg ..

I looked at the 'V1 Resend' series to see which all are applied, and
missed your reply on the first version.

Sorry about that.

Patch hide | download patch | download mbox

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;