linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] intel_th: msu: Remove set but not used variable 'last'
@ 2019-05-27 15:41 YueHaibing
  0 siblings, 0 replies; only message in thread
From: YueHaibing @ 2019-05-27 15:41 UTC (permalink / raw)
  To: alexander.shishkin, gregkh; +Cc: linux-kernel, YueHaibing

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/hwtracing/intel_th/msu.c: In function msc_win_switch:
drivers/hwtracing/intel_th/msu.c:1389:21: warning: variable last set but not used [-Wunused-but-set-variable]

It is never used since introduction in commit
aad14ad3cf3a ("intel_th: msu: Add current window tracking")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/hwtracing/intel_th/msu.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/hwtracing/intel_th/msu.c b/drivers/hwtracing/intel_th/msu.c
index 81bb54fa3ce8..33072ca5fc4d 100644
--- a/drivers/hwtracing/intel_th/msu.c
+++ b/drivers/hwtracing/intel_th/msu.c
@@ -1386,10 +1386,9 @@ static int intel_th_msc_init(struct msc *msc)
 
 static void msc_win_switch(struct msc *msc)
 {
-	struct msc_window *last, *first;
+	struct msc_window *first;
 
 	first = list_first_entry(&msc->win_list, struct msc_window, entry);
-	last = list_last_entry(&msc->win_list, struct msc_window, entry);
 
 	if (msc_is_last_win(msc->cur_win))
 		msc->cur_win = first;
-- 
2.17.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-05-27 15:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-27 15:41 [PATCH -next] intel_th: msu: Remove set but not used variable 'last' YueHaibing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).