All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Sreeraj S Kurup" <sreekuttan2156239@gmail.com>
Cc: linux-sound@vger.kernel.org
Subject: Re: [PATCH 2/3] ALSA: hda: hdmi_chmap: Update HDMI channel map codec read callers
Date: Thu, 03 Dec 2026 18:22:27 +0000	[thread overview]
Message-ID: <sashiko-outbox-248378@kernel.org> (raw)
In-Reply-To: <20261203170741.3873-3-sreekuttan2156239@gmail.com>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [High] ALSA: hda: local variable current in hdmi_set_channel_count()
  breaks build
- [High] ALSA: hda: split snd_hdac_codec_read() migration breaks build
  and bisect
--

commit d54e70f2805e77d43db50fbde0556d0b48b00dcf
Author: Sreeraj S Kurup <sreekuttan2156239@gmail.com>

ALSA: hda: hdmi_chmap: Update HDMI channel map codec read callers

This commit updates the snd_hdac_codec_read() callers in hdmi_chmap.c to use
the new status and output parameter interface, propagating read errors and
skipping the channel count update when reading the current count fails.

> diff --git a/sound/hda/core/hdmi_chmap.c b/sound/hda/core/hdmi_chmap.c
> index c897fc443467c..e9e599154ef12 100644
> --- a/sound/hda/core/hdmi_chmap.c
> +++ b/sound/hda/core/hdmi_chmap.c
> @@ -190,21 +190,41 @@ static int hdmi_pin_set_slot_channel(struct hdac_device *codec,
>  static int hdmi_pin_get_slot_channel(struct hdac_device *codec,
>  			hda_nid_t pin_nid, int asp_slot)
>  {
> -	return (snd_hdac_codec_read(codec, pin_nid, 0,
> +	unsigned int res;
> +	int err;
> +
> +	err = snd_hdac_codec_read(codec, pin_nid, 0,
>  				   AC_VERB_GET_HDMI_CHAN_SLOT,
> -				   asp_slot) & 0xf0) >> 4;
> +				   asp_slot, &res);
> +	if (err < 0)
> +		return err;
> +
> +	return (res & 0xf0) >> 4;
>  }

[Severity: High]
Does splitting the snd_hdac_codec_read() signature change across commits
break builds and git bisect?

Commit "ALSA: hda: core: Fix command creation error handling" changed
snd_hdac_codec_read() to six arguments, leaving callers in
include/sound/hda_codec.h (snd_hda_codec_read() and
snd_hda_codec_write_sync()) and sound/soc/codecs/hdac_hdmi.c broken.

Commit "ASoC: codecs: hdac_hdmi: Update codec read API callers" updates
hdac_hdmi.c later, but include/sound/hda_codec.h remains un-updated at the
end of the series.  All callers need to be updated in the same commit as
the signature change, or migrated via a transitional helper first.

[ ... ]

>  static void hdmi_set_channel_count(struct hdac_device *codec,
>  				   hda_nid_t cvt_nid, int chs)
>  {
> -	if (chs != hdmi_get_channel_count(codec, cvt_nid))
> +	int current;
> +
> +	current = hdmi_get_channel_count(codec, cvt_nid);
> +	if (current < 0)
> +		return;
> +
> +	if (chs != current)
>  		snd_hdac_codec_write(codec, cvt_nid, 0,
>  				    AC_VERB_SET_CVT_CHAN_COUNT, chs - 1);
>  }

[Severity: High]
Does naming this local variable current break the build?

current is a global macro expanding to get_current() via asm/current.h
(included through sound/control.h and linux/wait.h), so this fails to
compile whenever CONFIG_SND_HDA_CORE is enabled.  Renaming it to something
like cur_chs would avoid the collision.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261203170741.3873-1-sreekuttan2156239@gmail.com?part=2

  reply	other threads:[~2026-12-03 18:22 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03 17:04 [PATCH 0/3] ALSA: hda: Separate codec read status from response Sreeraj S Kurup
2026-12-03 17:05 ` [PATCH 1/3] ALSA: hda: core: Fix command creation error handling Sreeraj S Kurup
2026-12-03 18:12   ` sashiko-bot
2026-12-03 17:05 ` [PATCH 2/3] ALSA: hda: hdmi_chmap: Update HDMI channel map codec read callers Sreeraj S Kurup
2026-12-03 18:22   ` sashiko-bot [this message]
2026-12-04  4:32   ` kernel test robot
2026-12-04  4:54   ` kernel test robot
2026-12-04  4:54   ` kernel test robot
2026-12-03 17:05 ` [PATCH 3/3] ASoC: codecs: hdac_hdmi: Update codec read API callers Sreeraj S Kurup
2026-12-03 18:46   ` sashiko-bot
2026-12-03 17:33 ` [PATCH 0/3] ALSA: hda: Separate codec read status from response Takashi Iwai
2026-12-03 18:10   ` Sreeraj S Kurup
2026-12-03 18:31   ` Sreeraj S Kurup
2026-12-04  8:25     ` Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2026-12-04  5:06 [PATCH 2/3] ALSA: hda: hdmi_chmap: Update HDMI channel map codec read callers kernel test robot
2026-12-04  5:18 kernel test robot
2026-12-04  5:18 kernel test robot
2026-12-04  5:40 kernel test robot
2026-12-05  9:54 kernel test robot
2026-12-05  9:54 kernel test robot
2026-12-05  9:55 kernel test robot

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=sashiko-outbox-248378@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=sreekuttan2156239@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.