Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1300274

[PATCH 7/8] rtc-ab-b5ze-s3: Delete an unnecessary variable in _abb5zes3_rtc_interrupt()

From SF Markus Elfring <elfring@users.sourceforge.net>
Newsgroups linux.kernel
Subject [PATCH 7/8] rtc-ab-b5ze-s3: Delete an unnecessary variable in _abb5zes3_rtc_interrupt()
Date 2016-01-03 10:00 +0100
Message-ID <qMMG6-35D-9@gated-at.bofh.it> (permalink)
References <qEuGl-43C-5@gated-at.bofh.it> <qMMwq-32m-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Markus Elfring <elfring@users.sourceforge.net>
Date: Sun, 3 Jan 2016 09:00:30 +0100

Pass the address of the data structure element "time" directly in calls
of the function "rtc_update_irq" instead of an extra initialisation
for one local variable at the beginning.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/rtc/rtc-ab-b5ze-s3.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/rtc/rtc-ab-b5ze-s3.c b/drivers/rtc/rtc-ab-b5ze-s3.c
index e3a015a..88f1d0b 100644
--- a/drivers/rtc/rtc-ab-b5ze-s3.c
+++ b/drivers/rtc/rtc-ab-b5ze-s3.c
@@ -816,7 +816,6 @@ static irqreturn_t _abb5zes3_rtc_interrupt(int irq, void *data)
 	struct i2c_client *client = data;
 	struct device *dev = &client->dev;
 	struct abb5zes3_rtc_data *rtc_data = dev_get_drvdata(dev);
-	struct rtc_device *rtc = rtc_data->rtc;
 	u8 regs[ABB5ZES3_CTRL_SEC_LEN];
 	int ret, handled = IRQ_NONE;
 
@@ -844,8 +843,7 @@ static irqreturn_t _abb5zes3_rtc_interrupt(int irq, void *data)
 	/* Check alarm flag */
 	if (regs[ABB5ZES3_REG_CTRL2] & ABB5ZES3_REG_CTRL2_AF) {
 		dev_dbg(dev, "RTC alarm!\n");
-
-		rtc_update_irq(rtc, 1, RTC_IRQF | RTC_AF);
+		rtc_update_irq(rtc_data->rtc, 1, RTC_IRQF | RTC_AF);
 
 		/* Acknowledge and disable the alarm */
 		_abb5zes3_rtc_clear_alarm(dev);
@@ -857,8 +855,7 @@ static irqreturn_t _abb5zes3_rtc_interrupt(int irq, void *data)
 	/* Check watchdog Timer A flag */
 	if (regs[ABB5ZES3_REG_CTRL2] & ABB5ZES3_REG_CTRL2_WTAF) {
 		dev_dbg(dev, "RTC timer!\n");
-
-		rtc_update_irq(rtc, 1, RTC_IRQF | RTC_AF);
+		rtc_update_irq(rtc_data->rtc, 1, RTC_IRQF | RTC_AF);
 
 		/*
 		 * Acknowledge and disable the alarm. Note: WTAF
-- 
2.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/8] rtc-ab-b5ze-s3: Fine-tuning for some function  implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-03 09:50 +0100
  [PATCH 3/8] rtc-ab-b5ze-s3: Delete an unnecessary variable  initialisation in _abb5zes3_rtc_set_timer() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-03 10:00 +0100
  [PATCH 5/8] rtc-ab-b5ze-s3: Replace a variable initialisation by an  assignment in _abb5zes3_rtc_read_alarm() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-03 10:00 +0100
  [PATCH 2/8] rtc-ab-b5ze-s3: Delete an unnecessary variable in  abb5zes3_rtc_set_alarm() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-03 10:00 +0100
  [PATCH 7/8] rtc-ab-b5ze-s3: Delete an unnecessary variable in  _abb5zes3_rtc_interrupt() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-03 10:00 +0100
    Re: [PATCH 7/8] rtc-ab-b5ze-s3: Delete an unnecessary variable in  _abb5zes3_rtc_interrupt() Julia Lawall <julia.lawall@lip6.fr> - 2016-01-03 13:50 +0100
      Re: [PATCH 7/8] rtc-ab-b5ze-s3: Delete an unnecessary variable in  _abb5zes3_rtc_interrupt() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-03 18:10 +0100
    Re: [PATCH 7/8] rtc-ab-b5ze-s3: Delete an unnecessary variable in  _abb5zes3_rtc_interrupt() Julia Lawall <julia.lawall@lip6.fr> - 2016-01-03 13:50 +0100
      Re: [PATCH 7/8] rtc-ab-b5ze-s3: Delete an unnecessary variable in  _abb5zes3_rtc_interrupt() Julia Lawall <julia.lawall@lip6.fr> - 2016-01-03 18:00 +0100
      Re: [PATCH 7/8] rtc-ab-b5ze-s3: Delete an unnecessary variable in  _abb5zes3_rtc_interrupt() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-03 18:00 +0100
  [PATCH 4/8] rtc-ab-b5ze-s3: Replace a variable initialisation by an  assignment in _abb5zes3_rtc_set_alarm() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-03 10:00 +0100
  [PATCH 1/8] rtc-ab-b5ze-s3: Better exception handling in  abb5zes3_probe() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-03 10:00 +0100
  [PATCH 6/8] rtc-ab-b5ze-s3: Delete an unnecessary variable in  _abb5zes3_rtc_read_timer() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-03 10:00 +0100
  [PATCH 8/8] rtc-ab-b5ze-s3: Delete an unnecessary variable in  _abb5zes3_rtc_set_timer() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-03 10:00 +0100
    Re: [PATCH 8/8] rtc-ab-b5ze-s3: Delete an unnecessary variable in  _abb5zes3_rtc_set_timer() Julia Lawall <julia.lawall@lip6.fr> - 2016-01-03 13:50 +0100
      Re: [PATCH 8/8] rtc-ab-b5ze-s3: Delete an unnecessary variable in  _abb5zes3_rtc_set_timer() Julia Lawall <julia.lawall@lip6.fr> - 2016-01-03 18:30 +0100
      Re: [PATCH 8/8] rtc-ab-b5ze-s3: Delete an unnecessary variable in  _abb5zes3_rtc_set_timer() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-03 18:30 +0100

csiph-web