The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: patches@lists.linux.dev, stable@vger.kernel.org
Cc: Rosen Penev <rosenp@gmail.com>, Takashi Iwai <tiwai@suse.de>,
	Sasha Levin <sashal@kernel.org>,
	perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH AUTOSEL 7.0-5.10] ALSA: sparc/dbri: add missing fallthrough
Date: Mon, 11 May 2026 18:19:00 -0400	[thread overview]
Message-ID: <20260511221931.2370053-1-sashal@kernel.org> (raw)

From: Rosen Penev <rosenp@gmail.com>

[ Upstream commit 2bcbb163162789d3488562073dbb99d9bd71a762 ]

Fixes compiler error with probably newer compilers:

sound/sparc/dbri.c:595:2: error: unannotated fall-through between switch labels [-Werror,-Wimplicit-fallthrough]
  595 |         case 1:
      |         ^
sound/sparc/dbri.c:595:2: note: insert 'break;' to avoid fall-through
  595 |         case 1:
      |         ^
      |         break;

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://patch.msgid.link/20260506031854.780411-1-rosenp@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---

LLM Generated explanations, may be completely bogus:

## Phase 1: Commit Message Forensics

Step 1.1 Record: Subsystem `ALSA: sparc/dbri`; action verb `add`; intent
is to add a missing `fallthrough` annotation in `reverse_bytes()`.

Step 1.2 Record: Tags present: `Signed-off-by: Rosen Penev
<rosenp@gmail.com>`, `Link:
https://patch.msgid.link/20260506031854.780411-1-rosenp@gmail.com`,
`Signed-off-by: Takashi Iwai <tiwai@suse.de>`. No `Fixes:`, `Reported-
by:`, `Tested-by:`, `Reviewed-by:`, `Acked-by:`, or `Cc: stable`.

Step 1.3 Record: The commit body reports a concrete compiler error:
`-Werror,-Wimplicit-fallthrough` in `sound/sparc/dbri.c` at the
fallthrough from `case 2` to `case 1`. Symptom is a build failure for
this driver/config with a compiler that diagnoses this unannotated
fallthrough as an error. No kernel version is named. Root cause is an
intentional fallthrough lacking the kernel `fallthrough;` marker.

Step 1.4 Record: This is not a hidden runtime bug fix; it is an explicit
build fix. Build fixes are stable-acceptable when they repair
compilation of existing code.

## Phase 2: Diff Analysis

Step 2.1 Record: One file changed: `sound/sparc/dbri.c`, `+1/-0`. One
function modified: `reverse_bytes()`. Scope is a single-file, one-line
surgical build fix.

Step 2.2 Record: Before, `case 2` performed the final bit swap and
implicitly fell into `case 1`/`case 0`, which then `break`s. After, the
same fallthrough is explicitly annotated with `fallthrough;`. Runtime
control flow is unchanged.

Step 2.3 Record: Bug category is build fix / compiler diagnostic fix.
Specific mechanism: the kernel already annotates earlier intentional
fallthroughs in the same switch, but the `case 2` to `case 1`
fallthrough lacked the annotation, triggering `-Wimplicit-fallthrough`
as an error.

Step 2.4 Record: Fix quality is high: it is one line, uses the existing
kernel `fallthrough` pseudo-keyword, matches nearby code style in
current branches, and does not change APIs or runtime behavior.
Regression risk is very low.

## Phase 3: Git History Investigation

Step 3.1 Record: `git blame` on `2bcbb16316278^` attributes this code to
`c3c9a75ede23f`, but the repository is shallow/grafted there, so that is
not a reliable true introduction point. I verified the same missing
annotation exists in local stable-related branches `pending-5.4`,
`pending-5.10`, `pending-5.15`, `pending-6.1`, `pending-6.6`,
`pending-6.12`, `pending-6.19`, and `pending-7.0`.

Step 3.2 Record: No `Fixes:` tag is present, so there is no introducing
commit to follow from the message.

Step 3.3 Record: Recent `sound/sparc/dbri.c` history on `linux-
next/master` shows this commit, then `ALSA: sparc/dbri: Use guard() for
spin locks`, then the shallow boundary. The guard refactor is not a
semantic prerequisite for adding this annotation, although older stable
branches may have slightly different context.

Step 3.4 Record: Author Rosen Penev has this recent `sound/sparc` commit
in the checked history. The commit was applied by Takashi Iwai, and
`MAINTAINERS` lists Takashi Iwai and Jaroslav Kysela as SOUND
maintainers.

Step 3.5 Record: No dependent `reverse_bytes` commits were found by
subject search. The change can be applied standalone as an annotation.
For `pending-5.4`, context differs because earlier fallthroughs are
comments rather than `fallthrough;`, so that tree may need a trivial
backport adjustment.

## Phase 4: Mailing List And External Research

Step 4.1 Record: `b4 dig -c 2bcbb16316278` found the original submission
at the provided lore/patch URL. `b4 dig -a` found only v1; no later
revision. The saved mbox contains Takashi Iwai’s reply: “Applied now.
Thanks.” No NAKs or concerns were present in the fetched thread.

Step 4.2 Record: `b4 dig -w` shows recipients: Rosen Penev, `linux-
sound@vger.kernel.org`, Jaroslav Kysela, Takashi Iwai, and `linux-
kernel@vger.kernel.org`.

Step 4.3 Record: No separate bug report or `Reported-by` tag. The
reported failure is the compiler diagnostic included in the patch email
and commit message.

Step 4.4 Record: `b4 dig -a` shows this is a single-patch series, not
part of a multi-patch dependency chain.

Step 4.5 Record: WebFetch to lore/stable search was blocked by Anubis.
Local stable branch log searches did not find this exact fix or a
related `unannotated fall-through` fix already present in the checked
stable branches.

## Phase 5: Code Semantic Analysis

Step 5.1 Record: Modified function: `reverse_bytes()`.

Step 5.2 Record: Callers found in `sound/sparc/dbri.c`: `xmit_fixed()`
calls `reverse_bytes()` for MSB fixed-pipe transmit data;
`dbri_process_one_interrupt()` calls it for fixed-data receive
interrupts.

Step 5.3 Record: `reverse_bytes()` only performs bit manipulation and
may print an error for unsupported lengths; it does not allocate memory,
take locks, or call into external subsystems.

Step 5.4 Record: Runtime paths are reachable through DBRI/CS4215
initialization/control and interrupt handling on supported SPARC SBus
DBRI hardware. For this patch, runtime reachability is not the main
issue because the fix targets compilation and preserves runtime flow.

Step 5.5 Record: Nearby switch cases already had intentional fallthrough
annotations; this patch fills the only missing annotation in that chain.

## Phase 6: Stable Tree Analysis

Step 6.1 Record: The missing annotation exists in checked stable-related
branches from `pending-5.4` through `pending-7.0`. Therefore the
affected source is present in active stable-era trees available locally.

Step 6.2 Record: Expected backport difficulty is clean or trivial for
most branches. `pending-5.4` has older comment-style fallthrough context
before `case 2`, so it may require a small context adjustment, but the
same one-line semantic change applies.

Step 6.3 Record: No related fix with this subject or `unannotated fall-
through` in `sound/sparc/dbri.c` was found in the checked stable-related
branches.

## Phase 7: Subsystem And Maintainer Context

Step 7.1 Record: Subsystem is ALSA SPARC sound driver, specifically Sun
DBRI. Criticality is peripheral/platform-specific, not core kernel-wide.

Step 7.2 Record: Recent `sound/sparc` history is sparse and mostly
maintenance/refactoring/build-style changes, indicating a mature low-
churn driver area.

## Phase 8: Impact And Risk Assessment

Step 8.1 Record: Affected users are config/platform-specific: SPARC/SBus
builds with `SND_SUN_DBRI`.

Step 8.2 Record: Trigger is building this driver with a
compiler/configuration that treats the unannotated fallthrough warning
as an error. I did not independently reproduce the compiler failure
locally.

Step 8.3 Record: Failure mode is build failure, not runtime crash or
data corruption. Severity is high for affected builders because the
kernel/module cannot be built successfully under that toolchain/config.

Step 8.4 Record: Benefit is meaningful for affected stable users because
it restores buildability of an existing driver. Risk is very low: one
annotation line, no feature, no API change, no runtime logic change.
Risk-benefit ratio favors backporting.

## Phase 9: Final Synthesis

Step 9.1 Record: Evidence for backporting: concrete compiler error,
existing driver code in stable branches, one-line obviously-correct fix,
maintainer-applied patch, no runtime behavior change, and build fixes
are valid stable material. Evidence against: platform-specific impact
and no independent local build reproduction. Unresolved: exact true
historical introduction predates the shallow boundary; lore stable
search via WebFetch was blocked.

Step 9.2 Record: Stable rules checklist:
1. Obviously correct and tested: yes for correctness by inspection;
   maintainer applied it. No local build test performed.
2. Fixes a real bug: yes, reported compiler error in existing code.
3. Important issue: yes for affected stable builds, because it can stop
   compilation.
4. Small and contained: yes, one line in one function.
5. No new features/APIs: yes.
6. Can apply to stable trees: yes with at most trivial context
   adjustment, especially for older comment-style fallthrough branches.

Step 9.3 Record: Exception category applies: build fix.

Step 9.4 Record: Decision is to backport. This is exactly the kind of
low-risk build fix stable trees should carry.

## Verification

- [Phase 1] Parsed `git show --format=fuller --stat --patch
  2bcbb16316278`: confirmed subject, tags, compiler-error body, and one-
  line patch.
- [Phase 2] Read `sound/sparc/dbri.c`: confirmed `reverse_bytes()` has
  annotated fallthroughs except the candidate-added `case 2` annotation.
- [Phase 3] Ran `git blame 2bcbb16316278^ -L 578,598 --
  sound/sparc/dbri.c`: confirmed changed area, with shallow/grafted
  limitation.
- [Phase 3] Ran branch snippet checks on `pending-5.4` through
  `pending-7.0`: confirmed the missing annotation exists in all checked
  stable-related branches.
- [Phase 3] Ran recent file history and author history checks: found
  only related maintenance/refactor commits, no dependency series.
- [Phase 4] Ran `b4 dig -c`, `-a`, `-w`, and saved the mbox: confirmed
  single v1 patch, proper ALSA recipients, and maintainer “Applied now”
  reply.
- [Phase 5] Searched `reverse_bytes(` call sites: confirmed callers are
  `xmit_fixed()` and `dbri_process_one_interrupt()`.
- [Phase 6] Searched stable branch logs: no existing backport or
  duplicate fix found locally.
- [Phase 7] Checked `MAINTAINERS`: confirmed SOUND maintainers include
  Jaroslav Kysela and Takashi Iwai.
- [Phase 8] Checked `include/linux/compiler_attributes.h`: confirmed
  `fallthrough` is the intended kernel pseudo-keyword and is available
  in checked stable branches.
- UNVERIFIED: I did not reproduce the compiler error with a local
  SPARC/SBus DBRI build.
- UNVERIFIED: The exact original introduction before the repository’s
  shallow/grafted boundary could not be determined.
- UNVERIFIED: WebFetch could not read lore/stable search results because
  Anubis blocked the page.

**YES**

 sound/sparc/dbri.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c
index 75f82a92ff44f..2f5f62079fa4a 100644
--- a/sound/sparc/dbri.c
+++ b/sound/sparc/dbri.c
@@ -592,6 +592,7 @@ static __u32 reverse_bytes(__u32 b, int len)
 		fallthrough;
 	case 2:
 		b = ((b & 0xaaaaaaaa) >> 1) | ((b & 0x55555555) << 1);
+		fallthrough;
 	case 1:
 	case 0:
 		break;
-- 
2.53.0


             reply	other threads:[~2026-05-11 22:19 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-11 22:19 Sasha Levin [this message]
2026-05-11 22:19 ` [PATCH AUTOSEL 7.0-6.6] docs: cgroup-v1: Update charge-commit section Sasha Levin
2026-05-11 22:19 ` [PATCH AUTOSEL 7.0-5.10] drm/panel: feiyang-fy07024di26a30d: return display-on error Sasha Levin
2026-05-11 22:19 ` [PATCH AUTOSEL 7.0-6.1] smb: client: Zero-pad short GSS session keys per MS-SMB2 Sasha Levin
2026-05-11 22:19 ` [PATCH AUTOSEL 7.0-5.15] wifi: nl80211: re-check wiphy netns in nl80211_prepare_wdev_dump() continuation Sasha Levin
2026-05-11 22:19 ` [PATCH AUTOSEL 7.0-6.6] ipv6: Implement limits on extension header parsing Sasha Levin
2026-05-11 22:19 ` [PATCH AUTOSEL 7.0-6.12] net: usb: cdc_ncm: add Apple Mac USB-C direct networking quirk Sasha Levin
2026-05-11 22:19 ` [PATCH AUTOSEL 7.0-5.15] net: usb: r8152: add TRENDnet TUC-ET2G v2.0 Sasha Levin
2026-05-11 22:19 ` [PATCH AUTOSEL 7.0-5.10] i2c: dev: prevent integer overflow in I2C_TIMEOUT ioctl Sasha Levin
2026-05-11 22:19 ` [PATCH AUTOSEL 7.0-5.10] powerpc/vmx: avoid KASAN instrumentation in enter_vmx_ops() for kexec Sasha Levin
2026-05-11 22:19 ` [PATCH AUTOSEL 7.0-6.18] ALSA: usb-audio: add min_mute quirk for Razer Nommo V2 X Sasha Levin
2026-05-11 22:19 ` [PATCH AUTOSEL 7.0-5.10] wifi: libertas: fix integer underflow in process_cmdrequest() Sasha Levin
2026-05-11 22:19 ` [PATCH AUTOSEL 7.0] io_uring/wait: honour caller's time namespace for IORING_ENTER_ABS_TIMER Sasha Levin
2026-05-12 15:47   ` Jens Axboe
2026-05-11 22:19 ` [PATCH AUTOSEL 7.0-5.10] wifi: nl80211: require CAP_NET_ADMIN over the target netns in SET_WIPHY_NETNS Sasha Levin
2026-05-11 22:19 ` [PATCH AUTOSEL 7.0-6.12] media: qcom: camss: avoid format string warning Sasha Levin
2026-05-11 22:19 ` [PATCH AUTOSEL 7.0-5.10] scsi: scsi_dh_alua: Increase default ALUA timeout to maximum spec value Sasha Levin
2026-05-11 22:19 ` [PATCH AUTOSEL 7.0-6.18] Bluetooth: hci_uart: Fix NULL deref in recv callbacks when priv is uninitialized Sasha Levin
2026-05-11 22:19 ` [PATCH AUTOSEL 7.0] ALSA: hda/realtek: Add mute LED fixup for HP Pavilion 15-cs1xxx Sasha Levin
2026-05-11 22:19 ` [PATCH AUTOSEL 7.0-5.15] ALSA: usb-audio: Add quirk flags for AlphaTheta EUPHONIA Sasha Levin
2026-05-11 22:19 ` [PATCH AUTOSEL 7.0-6.18] ALSA: hda/realtek: Add codec SSID quirk for Lenovo Yoga Pro 9 16IMH9 Sasha Levin
2026-05-11 22:19 ` [PATCH AUTOSEL 7.0-5.10] fbdev: ipu-v3: clean up kernel-doc warnings Sasha Levin
2026-05-11 22:19 ` [PATCH AUTOSEL 7.0-6.6] ASoC: amd: yc: Add DMI quirk for MSI Bravo 15 C7VE Sasha Levin
2026-05-11 22:19 ` [PATCH AUTOSEL 7.0-6.1] powerpc/pasemi: Drop redundant res assignment Sasha Levin
2026-05-11 22:19 ` [PATCH AUTOSEL 7.0-5.15] scsi: smartpqi: Silence a recursive lock warning Sasha Levin
2026-05-11 22:19 ` [PATCH AUTOSEL 7.0-6.18] powerpc/pseries/htmdump: Free the global buffers in htmdump module exit Sasha Levin
2026-05-11 22:19 ` [PATCH AUTOSEL 7.0-5.10] i2c: acpi: Add ELAN0678 to i2c_acpi_force_100khz_device_ids Sasha Levin
2026-05-11 22:19 ` [PATCH AUTOSEL 7.0-6.18] iommu/amd: Use maximum Event log buffer size when SNP is enabled on Family 0x19 Sasha Levin
2026-05-11 22:19 ` [PATCH AUTOSEL 7.0-5.10] ALSA: usb-audio: add clock quirk for Motu 1248 Sasha Levin
2026-05-11 22:19 ` [PATCH AUTOSEL 7.0] ASoC: sdw_utils: avoid the SDCA companion function not supported failure Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260511221931.2370053-1-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@lists.linux.dev \
    --cc=perex@perex.cz \
    --cc=rosenp@gmail.com \
    --cc=stable@vger.kernel.org \
    --cc=tiwai@suse.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox