Commit 4e1c8c17 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva

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/115Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
parent ba3fea54
...@@ -718,10 +718,12 @@ static void *asd_find_ll_by_id(void * const start, const u8 id0, const u8 id1) ...@@ -718,10 +718,12 @@ static void *asd_find_ll_by_id(void * const start, const u8 id0, const u8 id1)
do { do {
switch (id1) { switch (id1) {
default: default:
if (el->id1 == id1) if (el->id1 == id1) {
fallthrough;
case 0xFF: case 0xFF:
if (el->id0 == id0) if (el->id0 == id0)
return el; return el;
}
} }
el = start + le16_to_cpu(el->next); el = start + le16_to_cpu(el->next);
} while (el != start); } while (el != start);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment