diff options
author | Gustavo A. R. Silva <gustavoars@kernel.org> | 2021-06-30 19:03:40 -0500 |
---|---|---|
committer | Gustavo A. R. Silva <gustavoars@kernel.org> | 2021-07-06 16:26:17 -0500 |
commit | 4e1c8c17ff129ab14a38c461dd9bb8f7ff8a36a0 (patch) | |
tree | 24309804a5173677e84bd5c567fe03618727255a /drivers/scsi | |
parent | ba3fea547236bfd325f4713dfb0569e150010894 (diff) |
scsi: aic94xx: Fix fall-through warning for Clang
In preparation to enable -Wimplicit-fallthrough for Clang, fix a
warning by explicitly adding a fallthrough; statement.
Notice that this seems to be a Duff device for performance[1]. So,
although the code looks a bit _funny_, I didn't want to refactor
or modify it beyond merely adding a fallthrough marking, which
might be the least disruptive way to fix this issue.
[1] https://www.drdobbs.com/a-reusable-duff-device/184406208
Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/aic94xx/aic94xx_sds.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/aic94xx/aic94xx_sds.c b/drivers/scsi/aic94xx/aic94xx_sds.c index 297a66770260..46815e65f7a4 100644 --- a/drivers/scsi/aic94xx/aic94xx_sds.c +++ b/drivers/scsi/aic94xx/aic94xx_sds.c @@ -718,10 +718,12 @@ static void *asd_find_ll_by_id(void * const start, const u8 id0, const u8 id1) do { switch (id1) { default: - if (el->id1 == id1) + if (el->id1 == id1) { + fallthrough; case 0xFF: if (el->id0 == id0) return el; + } } el = start + le16_to_cpu(el->next); } while (el != start); |