Skip to content

Commit 4e1c8c1

Browse files
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: KSPP#115 Signed-off-by: Gustavo A. R. Silva <[email protected]>
1 parent ba3fea5 commit 4e1c8c1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/scsi/aic94xx/aic94xx_sds.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,10 +718,12 @@ static void *asd_find_ll_by_id(void * const start, const u8 id0, const u8 id1)
718718
do {
719719
switch (id1) {
720720
default:
721-
if (el->id1 == id1)
721+
if (el->id1 == id1) {
722+
fallthrough;
722723
case 0xFF:
723724
if (el->id0 == id0)
724725
return el;
726+
}
725727
}
726728
el = start + le16_to_cpu(el->next);
727729
} while (el != start);

0 commit comments

Comments
 (0)