All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: ac97: fix build regression
@ 2024-01-03 10:25 Arnd Bergmann
  2024-01-03 10:33 ` Greg Kroah-Hartman
  2024-01-03 10:47 ` Takashi Iwai
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2024-01-03 10:25 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Greg Kroah-Hartman
  Cc: Arnd Bergmann, Yu Liao, Dawei Li, linux-sound, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

The ac97_bus_type structure is no longer declared in this file:

sound/ac97/bus.c: In function 'ac97_codec_add':
sound/ac97/bus.c:112:27: error: 'ac97_bus_type' undeclared (first use in this function); did you mean 'bus_type'?
  112 |         codec->dev.bus = &ac97_bus_type;
      |                           ^~~~~~~~~~~~~
      |                           bus_type
sound/ac97/bus.c:112:27: note: each undeclared identifier is reported only once for each function it appears in
sound/ac97/bus.c: In function 'snd_ac97_codec_driver_register':
sound/ac97/bus.c:191:28: error: 'ac97_bus_type' undeclared (first use in this function); did you mean 'ac97_bus_reset'?
  191 |         drv->driver.bus = &ac97_bus_type;

Include the header that contains the declaration and make sure the definition
is const but not static.

Fixes: 66e82d219924 ("ALSA: mark all struct bus_type as const")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 sound/ac97/bus.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/ac97/bus.c b/sound/ac97/bus.c
index 1dc7965eb14b..5e46b972a3da 100644
--- a/sound/ac97/bus.c
+++ b/sound/ac97/bus.c
@@ -15,6 +15,7 @@
 #include <linux/pm_runtime.h>
 #include <linux/slab.h>
 #include <linux/sysfs.h>
+#include <sound/ac97_codec.h>
 #include <sound/ac97/codec.h>
 #include <sound/ac97/controller.h>
 #include <sound/ac97/regs.h>
@@ -529,7 +530,7 @@ static void ac97_bus_remove(struct device *dev)
 	pm_runtime_disable(dev);
 }
 
-static struct bus_type ac97_bus_type = {
+const struct bus_type ac97_bus_type = {
 	.name		= "ac97bus",
 	.dev_groups	= ac97_dev_groups,
 	.match		= ac97_bus_match,
-- 
2.39.2


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

* Re: [PATCH] ALSA: ac97: fix build regression
  2024-01-03 10:25 [PATCH] ALSA: ac97: fix build regression Arnd Bergmann
@ 2024-01-03 10:33 ` Greg Kroah-Hartman
  2024-01-03 10:47 ` Takashi Iwai
  1 sibling, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2024-01-03 10:33 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Jaroslav Kysela, Takashi Iwai, Arnd Bergmann, Yu Liao, Dawei Li,
	linux-sound, linux-kernel

On Wed, Jan 03, 2024 at 11:25:38AM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The ac97_bus_type structure is no longer declared in this file:
> 
> sound/ac97/bus.c: In function 'ac97_codec_add':
> sound/ac97/bus.c:112:27: error: 'ac97_bus_type' undeclared (first use in this function); did you mean 'bus_type'?
>   112 |         codec->dev.bus = &ac97_bus_type;
>       |                           ^~~~~~~~~~~~~
>       |                           bus_type
> sound/ac97/bus.c:112:27: note: each undeclared identifier is reported only once for each function it appears in
> sound/ac97/bus.c: In function 'snd_ac97_codec_driver_register':
> sound/ac97/bus.c:191:28: error: 'ac97_bus_type' undeclared (first use in this function); did you mean 'ac97_bus_reset'?
>   191 |         drv->driver.bus = &ac97_bus_type;
> 
> Include the header that contains the declaration and make sure the definition
> is const but not static.
> 
> Fixes: 66e82d219924 ("ALSA: mark all struct bus_type as const")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  sound/ac97/bus.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Ick, sorry about that, this didn't trigger in all of my build testing,
nor for 0-day, odd.

Anyway, thanks for the fix it is obviously correct:

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

* Re: [PATCH] ALSA: ac97: fix build regression
  2024-01-03 10:25 [PATCH] ALSA: ac97: fix build regression Arnd Bergmann
  2024-01-03 10:33 ` Greg Kroah-Hartman
@ 2024-01-03 10:47 ` Takashi Iwai
  1 sibling, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2024-01-03 10:47 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Jaroslav Kysela, Takashi Iwai, Greg Kroah-Hartman, Arnd Bergmann,
	Yu Liao, Dawei Li, linux-sound, linux-kernel

On Wed, 03 Jan 2024 11:25:38 +0100,
Arnd Bergmann wrote:
> 
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The ac97_bus_type structure is no longer declared in this file:
> 
> sound/ac97/bus.c: In function 'ac97_codec_add':
> sound/ac97/bus.c:112:27: error: 'ac97_bus_type' undeclared (first use in this function); did you mean 'bus_type'?
>   112 |         codec->dev.bus = &ac97_bus_type;
>       |                           ^~~~~~~~~~~~~
>       |                           bus_type
> sound/ac97/bus.c:112:27: note: each undeclared identifier is reported only once for each function it appears in
> sound/ac97/bus.c: In function 'snd_ac97_codec_driver_register':
> sound/ac97/bus.c:191:28: error: 'ac97_bus_type' undeclared (first use in this function); did you mean 'ac97_bus_reset'?
>   191 |         drv->driver.bus = &ac97_bus_type;
> 
> Include the header that contains the declaration and make sure the definition
> is const but not static.
> 
> Fixes: 66e82d219924 ("ALSA: mark all struct bus_type as const")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Thanks, applied now.


Takashi

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

end of thread, other threads:[~2024-01-03 10:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-03 10:25 [PATCH] ALSA: ac97: fix build regression Arnd Bergmann
2024-01-03 10:33 ` Greg Kroah-Hartman
2024-01-03 10:47 ` Takashi Iwai

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.