aacraid: add missing curly braces
authorArnd Bergmann <arnd@arndb.de>
Mon, 14 Mar 2016 14:29:43 +0000 (15:29 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 22 Mar 2016 00:25:31 +0000 (20:25 -0400)
gcc-6 warns about obviously wrong indentation for newly added code in
aac_slave_configure():

drivers/scsi/aacraid/linit.c: In function 'aac_slave_configure':
drivers/scsi/aacraid/linit.c:458:3: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation]
   sdev->tagged_supported = 1;
   ^~~~
drivers/scsi/aacraid/linit.c:455:4: note: ...this 'else' clause, but it is not

gcc is correct, and evidently this was meant to be within the curly
braces that should have been there to start with. This patch adds them,
which avoids the warning and makes it clear what was intended here.

Nothing changes in behavior because in the 'if' block, the
sdev->tagged_supported flag is known to be set already.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 6bf3b630d0a7 ("aacraid: SCSI blk tag support")
Reviewed-by: Raghava Aditya Renukunta <raghavaaditya.renukunta@pmcs.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/aacraid/linit.c

index 21a67ed047e8741889ee2a254989f55d095ddbd8..ff6caab8cc8b7c7105d465963b4f84579d1c771e 100644 (file)
@@ -452,10 +452,11 @@ static int aac_slave_configure(struct scsi_device *sdev)
                else if (depth < 2)
                        depth = 2;
                scsi_change_queue_depth(sdev, depth);
-       } else
+       } else {
                scsi_change_queue_depth(sdev, 1);
 
                sdev->tagged_supported = 1;
+       }
 
        return 0;
 }