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


Groups > linux.kernel > #1501838

[tip:timers/urgent] alarmtimer: Remove unused but set variable

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From tip-bot for Tobias Klauser <tipbot@zytor.com>
Newsgroups linux.kernel
Subject [tip:timers/urgent] alarmtimer: Remove unused but set variable
Date Mon, 17 Oct 2016 12:10:01 +0200
Message-ID <std1L-26b-1@gated-at.bofh.it> (permalink)
References <stcIp-1IH-13@gated-at.bofh.it>
X-Original-To linux-tip-commits@vger.kernel.org
Reply-To tglx@linutronix.de, mingo@kernel.org, linux-kernel@vger.kernel.org, john.stultz@linaro.org, hpa@zytor.com, tklauser@distanz.ch
Git-Commit-ID 54e23845e965898f65f76aba79fa9db76d830fa9
X-Mailer tip-git-log-daemon
Robot-ID <tip-bot.git.kernel.org>
Robot-Unsubscribe Contact <mailto:hpa@kernel.org> to get blacklisted from these emails
MIME-Version 1.0
Content-Transfer-Encoding 8bit
Content-Type text/plain; charset=UTF-8
Content-Disposition inline
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 44
Organization linux.* mail to news gateway
X-Original-Cc mingo@kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, hpa@zytor.com, tklauser@distanz.ch, john.stultz@linaro.org
X-Original-Date Mon, 17 Oct 2016 03:04:11 -0700
X-Original-Message-ID <tip-54e23845e965898f65f76aba79fa9db76d830fa9@git.kernel.org>
X-Original-References <20161017094702.10873-1-tklauser@distanz.ch>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1501838

Show key headers only | View raw


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;
 }

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


Thread

[PATCH] alarmtimer: Remove unused but set variable Tobias Klauser <tklauser@distanz.ch> - 2016-10-17 11:50 +0200
  [tip:timers/urgent] alarmtimer: Remove unused but set variable tip-bot for Tobias Klauser <tipbot@zytor.com> - 2016-10-17 12:10 +0200

csiph-web