Skip to contentSkip to conversation

Patch "scsi: mvsas: fix command_active typo" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Jan 9, 2017

Subsystems (2)
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

scsi: mvsas: fix command_active typo

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
scsi-mvsas-fix-command_active-typo.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From af15769ffab13d777e55fdef09d0762bf0c249c4 Mon Sep 17 00:00:00 2001

From: Arnd Bergmann <[email protected]>
Date: Wed, 16 Nov 2016 16:08:34 +0100
Subject: scsi: mvsas: fix command_active typo

From: Arnd Bergmann <[email protected]>

commit af15769ffab13d777e55fdef09d0762bf0c249c4 upstream.

gcc-7 notices that the condition in mvs_94xx_command_active looks suspicious:

drivers/scsi/mvsas/mv_94xx.c: In function 'mvs_94xx_command_active':
drivers/scsi/mvsas/mv_94xx.c:671:15: error: '<<' in boolean context, did you mean '<' ? [-Werror=int-in-bool-context]

This was introduced when the mv_printk() statement got added, and leads to the condition being ignored. This is probably harmless.

Changing '&&' to '&' makes the code look reasonable, as we check the command bit before setting and printing it.

Fixes a4632aae8b66 ("[SCSI] mvsas: Add new macros and functions")
---
 drivers/scsi/mvsas/mv_94xx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/mvsas/mv_94xx.c +1 -1
@@ -621,7 +621,7 @@ static void mvs_94xx_command_active(stru
 {
 	u32 tmp;
 	tmp = mvs_cr32(mvi, MVS_COMMAND_ACTIVE+(slot_idx >> 3));
-	if (tmp && 1 << (slot_idx % 32)) {
+	if (tmp & 1 << (slot_idx % 32)) {
 		mv_printk("command active %08X,  slot [%x].\n", tmp, slot_idx);
 		mvs_cw32(mvi, MVS_COMMAND_ACTIVE + (slot_idx >> 3),
 			1 << (slot_idx % 32));

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/stable-fixup-hotplug-fix-unused-function-warning.patch queue-4.4/scsi-mvsas-fix-command_active-typo.patch