All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] alarmtimer: Remove unused but set variable
@ 2016-10-17  9:47 Tobias Klauser
  2016-10-17 10:04 ` [tip:timers/urgent] " tip-bot for Tobias Klauser
  0 siblings, 1 reply; 2+ messages in thread
From: Tobias Klauser @ 2016-10-17  9:47 UTC (permalink / raw)
  To: John Stultz, Thomas Gleixner; +Cc: linux-kernel

Remove the set but unused variable base in alarm_clock_get to fix the
following warning when building with 'W=1':

  kernel/time/alarmtimer.c: In function ‘alarm_timer_create’:
  kernel/time/alarmtimer.c:545:21: warning: variable ‘base’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
---
 kernel/time/alarmtimer.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c
index c3aad685bbc0..12dd190634ab 100644
--- a/kernel/time/alarmtimer.c
+++ b/kernel/time/alarmtimer.c
@@ -542,7 +542,6 @@ static int alarm_clock_get(clockid_t which_clock, struct timespec *tp)
 static int alarm_timer_create(struct k_itimer *new_timer)
 {
 	enum  alarmtimer_type type;
-	struct alarm_base *base;
 
 	if (!alarmtimer_get_rtcdev())
 		return -ENOTSUPP;
@@ -551,7 +550,6 @@ static int alarm_timer_create(struct k_itimer *new_timer)
 		return -EPERM;
 
 	type = clock2alarm(new_timer->it_clock);
-	base = &alarm_bases[type];
 	alarm_init(&new_timer->it.alarm.alarmtimer, type, alarm_handle_timer);
 	return 0;
 }
-- 
2.9.0

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

* [tip:timers/urgent] alarmtimer: Remove unused but set variable
  2016-10-17  9:47 [PATCH] alarmtimer: Remove unused but set variable Tobias Klauser
@ 2016-10-17 10:04 ` tip-bot for Tobias Klauser
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Tobias Klauser @ 2016-10-17 10:04 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: mingo, linux-kernel, tglx, hpa, tklauser, john.stultz

Commit-ID:  54e23845e965898f65f76aba79fa9db76d830fa9
Gitweb:     http://git.kernel.org/tip/54e23845e965898f65f76aba79fa9db76d830fa9
Author:     Tobias Klauser <tklauser@distanz.ch>
AuthorDate: Mon, 17 Oct 2016 11:47:02 +0200
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 17 Oct 2016 11:59:37 +0200

alarmtimer: Remove unused but set variable

Remove the set but unused variable base in alarm_clock_get to fix the
following warning when building with 'W=1':

  kernel/time/alarmtimer.c: In function ‘alarm_timer_create’:
  kernel/time/alarmtimer.c:545:21: warning: variable ‘base’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Cc: John Stultz <john.stultz@linaro.org>
Link: http://lkml.kernel.org/r/20161017094702.10873-1-tklauser@distanz.ch
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
 kernel/time/alarmtimer.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c
index c3aad68..12dd190 100644
--- a/kernel/time/alarmtimer.c
+++ b/kernel/time/alarmtimer.c
@@ -542,7 +542,6 @@ static int alarm_clock_get(clockid_t which_clock, struct timespec *tp)
 static int alarm_timer_create(struct k_itimer *new_timer)
 {
 	enum  alarmtimer_type type;
-	struct alarm_base *base;
 
 	if (!alarmtimer_get_rtcdev())
 		return -ENOTSUPP;
@@ -551,7 +550,6 @@ static int alarm_timer_create(struct k_itimer *new_timer)
 		return -EPERM;
 
 	type = clock2alarm(new_timer->it_clock);
-	base = &alarm_bases[type];
 	alarm_init(&new_timer->it.alarm.alarmtimer, type, alarm_handle_timer);
 	return 0;
 }

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

end of thread, other threads:[~2016-10-17 10:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-17  9:47 [PATCH] alarmtimer: Remove unused but set variable Tobias Klauser
2016-10-17 10:04 ` [tip:timers/urgent] " tip-bot for Tobias Klauser

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.