diff options
author | Bart Van Assche <bart.vanassche@wdc.com> | 2017-08-25 13:46:29 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-08-25 17:08:07 -0400 |
commit | 3bf2ff6749f0f87d719bf8f67eccecfde742f2b3 (patch) | |
tree | 67a68f53063195fb1d66cd1ea59ae49467355b65 /drivers/scsi/scsi_ioctl.c | |
parent | c2e872a27c610a5e2a71444f86470f765ed9dfce (diff) |
scsi: Suppress gcc 7 fall-through warnings reported with W=1
The conclusion of a recent discussion about the new warnings
reported by gcc 7 is that the new warnings reported when building
with W=1 should be suppressed. However, gcc 7 still warns about
fall-through in switch statements when building with W=1. Suppress
these warnings by annotating the SCSI core properly.
See also Linus Torvalds, Lots of new warnings with gcc-7.1.1, 11
July 2017 (https://www.mail-archive.com/linux-media@vger.kernel.org/msg115428.html).
References: commit bd664f6b3e37 ("disable new gcc-7.1.1 warnings for now")
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_ioctl.c')
-rw-r--r-- | drivers/scsi/scsi_ioctl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_ioctl.c b/drivers/scsi/scsi_ioctl.c index b6bf3f29a12a..0a875491f5a7 100644 --- a/drivers/scsi/scsi_ioctl.c +++ b/drivers/scsi/scsi_ioctl.c @@ -116,13 +116,15 @@ static int ioctl_internal_command(struct scsi_device *sdev, char *cmd, case NOT_READY: /* This happens if there is no disc in drive */ if (sdev->removable) break; + /* FALLTHROUGH */ case UNIT_ATTENTION: if (sdev->removable) { sdev->changed = 1; result = 0; /* This is no longer considered an error */ break; } - default: /* Fall through for non-removable media */ + /* FALLTHROUGH -- for non-removable media */ + default: sdev_printk(KERN_INFO, sdev, "ioctl_internal_command return code = %x\n", result); |