Skip to contentSkip to conversation

patch "intel_th: msu: Remove set but not used variable 'last'" added to char-misc-next

PATCH [email protected] 1 participant 1 message Jul 4, 2019

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

intel_th: msu: Remove set but not used variable 'last'

to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-next branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will also be merged in the next major kernel release during the merge window.

If you have any questions about this process, please let me know.

From 9800db282dff675dd700d5985d90b605c34b5ccd Mon Sep 17 00:00:00 2001
From: YueHaibing <[email protected]>
Date: Fri, 21 Jun 2019 19:19:28 +0300
Subject: intel_th: msu: Remove set but not used variable 'last'

Commit aad14ad3cf3a ("intel_th: msu: Add current window tracking") added the following gcc warning:

Quoted 3 lines

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]

Fix it by removing the variable.

---
 drivers/hwtracing/intel_th/msu.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/hwtracing/intel_th/msu.c +1 -2
index 8c568b5c8920..6bfce03c6489 100644
@@ -1400,10 +1400,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;
Signature · 1 line
2.22.0