Re: [PATCH -next] scsi: Remove ignoring unreachable code warning

From: Martin K. Petersen
Date: Fri Mar 18 2022 - 23:57:53 EST


On Tue, 1 Mar 2022 16:04:48 +0800, Yang Li wrote:

> The smatch tool reported the following warning:
> drivers/scsi/scsi_error.c:1988 scsi_decide_disposition() warn: ignoring
> unreachable code.
>
> Remove the "default:return FAILED;" instead of "return FAILED;" reported
> by smatch, because compilers can provide more useful diagnostics about
> switch/case statements that do not have a default statement, especially
> if the "switch" applies to a value with enumeration type.
>
> [...]

Applied to 5.18/scsi-queue, thanks!

[1/1] scsi: Remove ignoring unreachable code warning
https://git.kernel.org/mkp/scsi/c/e1b353e7a31d

--
Martin K. Petersen Oracle Linux Engineering