public inbox for linux-sound@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda: Remove duplicate cmedia entries in codecs Makefile
@ 2026-04-26  0:03 Sasha Levin
  2026-04-27 12:23 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Sasha Levin @ 2026-04-26  0:03 UTC (permalink / raw)
  To: Jaroslav Kysela
  Cc: Takashi Iwai, Sasha Levin, Richard Fitzgerald, linux-sound,
	linux-kernel

kconfiglint reports:

  M004: 'snd-hda-codec-cmedia-y' assigned with ':=' but was already
        assigned at line 5; previous value is overwritten

sound/hda/codecs/Makefile contains duplicate entries for the C-Media
codec driver — both the composite module definition and the obj-* build
target appear twice:

  Line 5:  snd-hda-codec-cmedia-y :=  cmedia.o
  Line 10: snd-hda-codec-cmedia-y :=  cmedia.o  (duplicate)
  Line 24: obj-$(CONFIG_SND_HDA_CODEC_CMEDIA) += snd-hda-codec-cmedia.o
  Line 29: obj-$(CONFIG_SND_HDA_CODEC_CMEDIA) += snd-hda-codec-cmedia.o  (duplicate)

This file was created by commit 6014e9021b28 ("ALSA: hda: Move codec
drivers into sound/hda/codecs directory") which
moved codec drivers from sound/pci/hda/ to sound/hda/codecs/. In that
initial file, cmedia appeared once in each section.

Immediately after, commit aeeb85f26c3b ("ALSA: hda: Split Realtek
HD-audio codec driver") reordered the entries and
inserted cmedia at new positions near the top of each section, as part
of splitting out the Realtek driver. However, the original cmedia entries
were not removed during this reordering, creating duplicates of both
lines. The second assignment harmlessly overwrites the first with the
same value, and the second obj-* line causes the module to be listed
twice — neither causes a build failure, but both are dead code.

Remove the duplicate entries (second occurrence of each).

Assisted-by: Claude:claude-opus-4-6 kconfiglint
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 sound/hda/codecs/Makefile | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sound/hda/codecs/Makefile b/sound/hda/codecs/Makefile
index e7f03e281999f..88d2f8a79467b 100644
--- a/sound/hda/codecs/Makefile
+++ b/sound/hda/codecs/Makefile
@@ -7,7 +7,6 @@ snd-hda-codec-cm9825-y :=	cm9825.o
 snd-hda-codec-analog-y :=	analog.o
 snd-hda-codec-ca0110-y :=	ca0110.o
 snd-hda-codec-ca0132-y :=	ca0132.o
-snd-hda-codec-cmedia-y :=	cmedia.o
 snd-hda-codec-conexant-y :=	conexant.o
 snd-hda-codec-idt-y :=		sigmatel.o
 snd-hda-codec-senarytech-y :=	senarytech.o
@@ -26,7 +25,6 @@ obj-$(CONFIG_SND_HDA_CODEC_CM9825) += snd-hda-codec-cm9825.o
 obj-$(CONFIG_SND_HDA_CODEC_ANALOG) += snd-hda-codec-analog.o
 obj-$(CONFIG_SND_HDA_CODEC_CA0110) += snd-hda-codec-ca0110.o
 obj-$(CONFIG_SND_HDA_CODEC_CA0132) += snd-hda-codec-ca0132.o
-obj-$(CONFIG_SND_HDA_CODEC_CMEDIA) += snd-hda-codec-cmedia.o
 obj-$(CONFIG_SND_HDA_CODEC_CONEXANT) += snd-hda-codec-conexant.o
 obj-$(CONFIG_SND_HDA_CODEC_SIGMATEL) += snd-hda-codec-idt.o
 obj-$(CONFIG_SND_HDA_CODEC_SENARYTECH) += snd-hda-codec-senarytech.o
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: hda: Remove duplicate cmedia entries in codecs Makefile
  2026-04-26  0:03 [PATCH] ALSA: hda: Remove duplicate cmedia entries in codecs Makefile Sasha Levin
@ 2026-04-27 12:23 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2026-04-27 12:23 UTC (permalink / raw)
  To: Sasha Levin
  Cc: Jaroslav Kysela, Takashi Iwai, Richard Fitzgerald, linux-sound,
	linux-kernel

On Sun, 26 Apr 2026 02:03:27 +0200,
Sasha Levin wrote:
> 
> kconfiglint reports:
> 
>   M004: 'snd-hda-codec-cmedia-y' assigned with ':=' but was already
>         assigned at line 5; previous value is overwritten
> 
> sound/hda/codecs/Makefile contains duplicate entries for the C-Media
> codec driver ― both the composite module definition and the obj-* build
> target appear twice:
> 
>   Line 5:  snd-hda-codec-cmedia-y :=  cmedia.o
>   Line 10: snd-hda-codec-cmedia-y :=  cmedia.o  (duplicate)
>   Line 24: obj-$(CONFIG_SND_HDA_CODEC_CMEDIA) += snd-hda-codec-cmedia.o
>   Line 29: obj-$(CONFIG_SND_HDA_CODEC_CMEDIA) += snd-hda-codec-cmedia.o  (duplicate)
> 
> This file was created by commit 6014e9021b28 ("ALSA: hda: Move codec
> drivers into sound/hda/codecs directory") which
> moved codec drivers from sound/pci/hda/ to sound/hda/codecs/. In that
> initial file, cmedia appeared once in each section.
> 
> Immediately after, commit aeeb85f26c3b ("ALSA: hda: Split Realtek
> HD-audio codec driver") reordered the entries and
> inserted cmedia at new positions near the top of each section, as part
> of splitting out the Realtek driver. However, the original cmedia entries
> were not removed during this reordering, creating duplicates of both
> lines. The second assignment harmlessly overwrites the first with the
> same value, and the second obj-* line causes the module to be listed
> twice ― neither causes a build failure, but both are dead code.
> 
> Remove the duplicate entries (second occurrence of each).
> 
> Assisted-by: Claude:claude-opus-4-6 kconfiglint
> Signed-off-by: Sasha Levin <sashal@kernel.org>

Applied now.  Thanks.


Takashi

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-27 12:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-26  0:03 [PATCH] ALSA: hda: Remove duplicate cmedia entries in codecs Makefile Sasha Levin
2026-04-27 12:23 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox