From: Greg Kroah-Hartman Date: Fri, 20 Jun 2025 15:58:47 +0000 (+0200) Subject: 5.4-stable patches X-Git-Tag: v5.4.295~107 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4de6abd990e293b4be1872823b3968c7b8ea04a3;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: input-sparcspkr-avoid-unannotated-fall-through.patch --- diff --git a/queue-5.4/input-sparcspkr-avoid-unannotated-fall-through.patch b/queue-5.4/input-sparcspkr-avoid-unannotated-fall-through.patch new file mode 100644 index 0000000000..ebbd2a108a --- /dev/null +++ b/queue-5.4/input-sparcspkr-avoid-unannotated-fall-through.patch @@ -0,0 +1,72 @@ +From 8b1d858cbd4e1800e9336404ba7892b5a721230d Mon Sep 17 00:00:00 2001 +From: WangYuli +Date: Fri, 18 Apr 2025 18:37:18 -0700 +Subject: Input: sparcspkr - avoid unannotated fall-through + +From: WangYuli + +commit 8b1d858cbd4e1800e9336404ba7892b5a721230d upstream. + +Fix follow warnings with clang-21i (and reformat for clarity): + drivers/input/misc/sparcspkr.c:78:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] + 78 | case SND_TONE: break; + | ^ + drivers/input/misc/sparcspkr.c:78:3: note: insert 'break;' to avoid fall-through + 78 | case SND_TONE: break; + | ^ + | break; + drivers/input/misc/sparcspkr.c:113:3: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] + 113 | case SND_TONE: break; + | ^ + drivers/input/misc/sparcspkr.c:113:3: note: insert 'break;' to avoid fall-through + 113 | case SND_TONE: break; + | ^ + | break; + 2 warnings generated. + +Signed-off-by: WangYuli +Link: https://lore.kernel.org/r/6730E40353C76908+20250415052439.155051-1-wangyuli@uniontech.com +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman +--- + drivers/input/misc/sparcspkr.c | 22 ++++++++++++++++------ + 1 file changed, 16 insertions(+), 6 deletions(-) + +--- a/drivers/input/misc/sparcspkr.c ++++ b/drivers/input/misc/sparcspkr.c +@@ -74,9 +74,14 @@ static int bbc_spkr_event(struct input_d + return -1; + + switch (code) { +- case SND_BELL: if (value) value = 1000; +- case SND_TONE: break; +- default: return -1; ++ case SND_BELL: ++ if (value) ++ value = 1000; ++ break; ++ case SND_TONE: ++ break; ++ default: ++ return -1; + } + + if (value > 20 && value < 32767) +@@ -112,9 +117,14 @@ static int grover_spkr_event(struct inpu + return -1; + + switch (code) { +- case SND_BELL: if (value) value = 1000; +- case SND_TONE: break; +- default: return -1; ++ case SND_BELL: ++ if (value) ++ value = 1000; ++ break; ++ case SND_TONE: ++ break; ++ default: ++ return -1; + } + + if (value > 20 && value < 32767) diff --git a/queue-5.4/series b/queue-5.4/series index c73f3376ee..217359f0d7 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -194,3 +194,4 @@ scsi-s390-zfcp-ensure-synchronous-unit_add.patch selinux-fix-selinux_xfrm_alloc_user-to-set-correct-ctx_len.patch atm-revert-atm_account_tx-if-copy_from_iter_full-fails.patch hid-usbhid-eliminate-recurrent-out-of-bounds-bug-in-usbhid_parse.patch +input-sparcspkr-avoid-unannotated-fall-through.patch