All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rtc: isl12057: remove unused variables
@ 2016-07-11 21:42 ` Arnd Bergmann
  0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2016-07-11 21:42 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: Arnd Bergmann, Alessandro Zummo, Javier Martinez Canillas,
	Sudeep Holla, Uwe Kleine-König, Krzysztof Kozlowski,
	rtc-linux, linux-kernel

A cleanup patch introduced a harmless warning about now unused local variables:

drivers/rtc/rtc-isl12057.c: In function 'isl12057_rtc_read_alarm':
drivers/rtc/rtc-isl12057.c:249:26: error: unused variable 'alarm_secs' [-Werror=unused-variable]
  unsigned long rtc_secs, alarm_secs;
                          ^~~~~~~~~~
drivers/rtc/rtc-isl12057.c:249:16: error: unused variable 'rtc_secs' [-Werror=unused-variable]
  unsigned long rtc_secs, alarm_secs;
                ^~~~~~~~
drivers/rtc/rtc-isl12057.c:248:18: error: unused variable 'rtc_tm' [-Werror=unused-variable]
  struct rtc_time rtc_tm, *alarm_tm = &alarm->time;
                  ^~~~~~

This removes the variables to shut up those warnings.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 4e30a585a343 ("rtc: isl12057: let the rtc core interpret the partial alarm")
---
 drivers/rtc/rtc-isl12057.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/rtc/rtc-isl12057.c b/drivers/rtc/rtc-isl12057.c
index e0245fc6205e..0e7f0f52bfe4 100644
--- a/drivers/rtc/rtc-isl12057.c
+++ b/drivers/rtc/rtc-isl12057.c
@@ -245,8 +245,7 @@ static int isl12057_rtc_update_alarm(struct device *dev, int enable)
 static int isl12057_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
 {
 	struct isl12057_rtc_data *data = dev_get_drvdata(dev);
-	struct rtc_time rtc_tm, *alarm_tm = &alarm->time;
-	unsigned long rtc_secs, alarm_secs;
+	struct rtc_time *alarm_tm = &alarm->time;
 	u8 regs[ISL12057_A1_SEC_LEN];
 	unsigned int ir;
 	int ret;
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [rtc-linux] [PATCH] rtc: isl12057: remove unused variables
@ 2016-07-11 21:42 ` Arnd Bergmann
  0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2016-07-11 21:42 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: Arnd Bergmann, Alessandro Zummo, Javier Martinez Canillas,
	Sudeep Holla, Uwe Kleine-König, Krzysztof Kozlowski,
	rtc-linux, linux-kernel

A cleanup patch introduced a harmless warning about now unused local variables:

drivers/rtc/rtc-isl12057.c: In function 'isl12057_rtc_read_alarm':
drivers/rtc/rtc-isl12057.c:249:26: error: unused variable 'alarm_secs' [-Werror=unused-variable]
  unsigned long rtc_secs, alarm_secs;
                          ^~~~~~~~~~
drivers/rtc/rtc-isl12057.c:249:16: error: unused variable 'rtc_secs' [-Werror=unused-variable]
  unsigned long rtc_secs, alarm_secs;
                ^~~~~~~~
drivers/rtc/rtc-isl12057.c:248:18: error: unused variable 'rtc_tm' [-Werror=unused-variable]
  struct rtc_time rtc_tm, *alarm_tm = &alarm->time;
                  ^~~~~~

This removes the variables to shut up those warnings.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 4e30a585a343 ("rtc: isl12057: let the rtc core interpret the partial alarm")
---
 drivers/rtc/rtc-isl12057.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/rtc/rtc-isl12057.c b/drivers/rtc/rtc-isl12057.c
index e0245fc6205e..0e7f0f52bfe4 100644
--- a/drivers/rtc/rtc-isl12057.c
+++ b/drivers/rtc/rtc-isl12057.c
@@ -245,8 +245,7 @@ static int isl12057_rtc_update_alarm(struct device *dev, int enable)
 static int isl12057_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
 {
 	struct isl12057_rtc_data *data = dev_get_drvdata(dev);
-	struct rtc_time rtc_tm, *alarm_tm = &alarm->time;
-	unsigned long rtc_secs, alarm_secs;
+	struct rtc_time *alarm_tm = &alarm->time;
 	u8 regs[ISL12057_A1_SEC_LEN];
 	unsigned int ir;
 	int ret;
-- 
2.9.0

-- 
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.

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] rtc: isl12057: remove unused variables
  2016-07-11 21:42 ` [rtc-linux] " Arnd Bergmann
@ 2016-07-12  7:14   ` Alexandre Belloni
  -1 siblings, 0 replies; 4+ messages in thread
From: Alexandre Belloni @ 2016-07-12  7:14 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Alessandro Zummo, Javier Martinez Canillas, Sudeep Holla,
	Uwe Kleine-König, Krzysztof Kozlowski, rtc-linux,
	linux-kernel

Hi Arnd,

On 11/07/2016 at 23:42:57 +0200, Arnd Bergmann wrote :
> A cleanup patch introduced a harmless warning about now unused local variables:
> 
> drivers/rtc/rtc-isl12057.c: In function 'isl12057_rtc_read_alarm':
> drivers/rtc/rtc-isl12057.c:249:26: error: unused variable 'alarm_secs' [-Werror=unused-variable]
>   unsigned long rtc_secs, alarm_secs;
>                           ^~~~~~~~~~
> drivers/rtc/rtc-isl12057.c:249:16: error: unused variable 'rtc_secs' [-Werror=unused-variable]
>   unsigned long rtc_secs, alarm_secs;
>                 ^~~~~~~~
> drivers/rtc/rtc-isl12057.c:248:18: error: unused variable 'rtc_tm' [-Werror=unused-variable]
>   struct rtc_time rtc_tm, *alarm_tm = &alarm->time;
>                   ^~~~~~
> 
> This removes the variables to shut up those warnings.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 4e30a585a343 ("rtc: isl12057: let the rtc core interpret the partial alarm")

I actually fixed it up in the patch yesterday.

> ---
>  drivers/rtc/rtc-isl12057.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/rtc/rtc-isl12057.c b/drivers/rtc/rtc-isl12057.c
> index e0245fc6205e..0e7f0f52bfe4 100644
> --- a/drivers/rtc/rtc-isl12057.c
> +++ b/drivers/rtc/rtc-isl12057.c
> @@ -245,8 +245,7 @@ static int isl12057_rtc_update_alarm(struct device *dev, int enable)
>  static int isl12057_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
>  {
>  	struct isl12057_rtc_data *data = dev_get_drvdata(dev);
> -	struct rtc_time rtc_tm, *alarm_tm = &alarm->time;
> -	unsigned long rtc_secs, alarm_secs;
> +	struct rtc_time *alarm_tm = &alarm->time;
>  	u8 regs[ISL12057_A1_SEC_LEN];
>  	unsigned int ir;
>  	int ret;
> -- 
> 2.9.0
> 

-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [rtc-linux] Re: [PATCH] rtc: isl12057: remove unused variables
@ 2016-07-12  7:14   ` Alexandre Belloni
  0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Belloni @ 2016-07-12  7:14 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Alessandro Zummo, Javier Martinez Canillas, Sudeep Holla,
	Uwe Kleine-König, Krzysztof Kozlowski, rtc-linux,
	linux-kernel

Hi Arnd,

On 11/07/2016 at 23:42:57 +0200, Arnd Bergmann wrote :
> A cleanup patch introduced a harmless warning about now unused local variables:
> 
> drivers/rtc/rtc-isl12057.c: In function 'isl12057_rtc_read_alarm':
> drivers/rtc/rtc-isl12057.c:249:26: error: unused variable 'alarm_secs' [-Werror=unused-variable]
>   unsigned long rtc_secs, alarm_secs;
>                           ^~~~~~~~~~
> drivers/rtc/rtc-isl12057.c:249:16: error: unused variable 'rtc_secs' [-Werror=unused-variable]
>   unsigned long rtc_secs, alarm_secs;
>                 ^~~~~~~~
> drivers/rtc/rtc-isl12057.c:248:18: error: unused variable 'rtc_tm' [-Werror=unused-variable]
>   struct rtc_time rtc_tm, *alarm_tm = &alarm->time;
>                   ^~~~~~
> 
> This removes the variables to shut up those warnings.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 4e30a585a343 ("rtc: isl12057: let the rtc core interpret the partial alarm")

I actually fixed it up in the patch yesterday.

> ---
>  drivers/rtc/rtc-isl12057.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/rtc/rtc-isl12057.c b/drivers/rtc/rtc-isl12057.c
> index e0245fc6205e..0e7f0f52bfe4 100644
> --- a/drivers/rtc/rtc-isl12057.c
> +++ b/drivers/rtc/rtc-isl12057.c
> @@ -245,8 +245,7 @@ static int isl12057_rtc_update_alarm(struct device *dev, int enable)
>  static int isl12057_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
>  {
>  	struct isl12057_rtc_data *data = dev_get_drvdata(dev);
> -	struct rtc_time rtc_tm, *alarm_tm = &alarm->time;
> -	unsigned long rtc_secs, alarm_secs;
> +	struct rtc_time *alarm_tm = &alarm->time;
>  	u8 regs[ISL12057_A1_SEC_LEN];
>  	unsigned int ir;
>  	int ret;
> -- 
> 2.9.0
> 

-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel 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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-07-12  7:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-11 21:42 [PATCH] rtc: isl12057: remove unused variables Arnd Bergmann
2016-07-11 21:42 ` [rtc-linux] " Arnd Bergmann
2016-07-12  7:14 ` Alexandre Belloni
2016-07-12  7:14   ` [rtc-linux] " Alexandre Belloni

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.