* [PATCH] ALSA: hda: acpi: Make driver's match data const static
@ 2025-05-22 20:52 Takashi Iwai
2025-05-22 21:14 ` Daniel Dadap
0 siblings, 1 reply; 2+ messages in thread
From: Takashi Iwai @ 2025-05-22 20:52 UTC (permalink / raw)
To: linux-sound; +Cc: Daniel Dadap
The driver's match data, nvidia_hda_data, is referred only locally,
and should be static. Also, as it's a read-only data, it can be
gracefully const, too.
Fixes: 4b214c9bbe26 ("ALSA: hda - Add new driver for HDA controllers listed via ACPI")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202505230426.k8ruTgnr-lkp@intel.com/
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/pci/hda/hda_acpi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/pci/hda/hda_acpi.c b/sound/pci/hda/hda_acpi.c
index 513f8fde198b..505cc97e0ee9 100644
--- a/sound/pci/hda/hda_acpi.c
+++ b/sound/pci/hda/hda_acpi.c
@@ -296,7 +296,7 @@ static const struct dev_pm_ops hda_acpi_pm = {
SYSTEM_SLEEP_PM_OPS(hda_acpi_suspend, hda_acpi_resume)
};
-struct hda_data nvidia_hda_data = {
+static const struct hda_data nvidia_hda_data = {
.short_name = "NVIDIA",
.long_name = "NVIDIA HDA Controller",
.flags = AZX_DCAPS_CORBRP_SELF_CLEAR,
--
2.49.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ALSA: hda: acpi: Make driver's match data const static
2025-05-22 20:52 [PATCH] ALSA: hda: acpi: Make driver's match data const static Takashi Iwai
@ 2025-05-22 21:14 ` Daniel Dadap
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Dadap @ 2025-05-22 21:14 UTC (permalink / raw)
To: Takashi Iwai; +Cc: linux-sound
Reviewed-by: Daniel Dadap <ddadap@nvidia.com>
On Thu, May 22, 2025 at 10:52:51PM +0200, Takashi Iwai wrote:
> The driver's match data, nvidia_hda_data, is referred only locally,
> and should be static. Also, as it's a read-only data, it can be
> gracefully const, too.
>
> Fixes: 4b214c9bbe26 ("ALSA: hda - Add new driver for HDA controllers listed via ACPI")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202505230426.k8ruTgnr-lkp@intel.com/
> Signed-off-by: Takashi Iwai <tiwai@suse.de>
> ---
> sound/pci/hda/hda_acpi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/pci/hda/hda_acpi.c b/sound/pci/hda/hda_acpi.c
> index 513f8fde198b..505cc97e0ee9 100644
> --- a/sound/pci/hda/hda_acpi.c
> +++ b/sound/pci/hda/hda_acpi.c
> @@ -296,7 +296,7 @@ static const struct dev_pm_ops hda_acpi_pm = {
> SYSTEM_SLEEP_PM_OPS(hda_acpi_suspend, hda_acpi_resume)
> };
>
> -struct hda_data nvidia_hda_data = {
> +static const struct hda_data nvidia_hda_data = {
> .short_name = "NVIDIA",
> .long_name = "NVIDIA HDA Controller",
> .flags = AZX_DCAPS_CORBRP_SELF_CLEAR,
> --
> 2.49.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-05-22 21:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-22 20:52 [PATCH] ALSA: hda: acpi: Make driver's match data const static Takashi Iwai
2025-05-22 21:14 ` Daniel Dadap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).