* [PATCH 1/3] ALSA: hda: aw88399: use auto-cleanup for ACPI subsystem ID string
@ 2026-10-29 10:51 Marco Giunta
2026-10-29 10:51 ` [PATCH 2/3] ALSA: hda: aw88399: add missing MODULE_AUTHOR to I2C driver Marco Giunta
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Marco Giunta @ 2026-10-29 10:51 UTC (permalink / raw)
To: Takashi Iwai, Mark Brown
Cc: Jaroslav Kysela, Liam Girdwood, Marco Giunta, linux-sound, linux-kernel
Use scope-based cleanup for the string returned by acpi_get_subsystem_id()
instead of freeing it manually, consistent with the other cleanup
annotations in aw88399_hda_acpi_probe() and aw88399_hda_init().
This is just a code cleanup, with no functional changes intended.
Signed-off-by: Marco Giunta <marco_giunta@outlook.it>
---
Hi Takashi & Mark,
This series contains some trivial cleanups that should (hopefully) improve
the overall code quality. These patches are the result of me re-reviewing
the driver code during the development of the recent firmware path change
series.
I appreciate that it's likely too late to get these into 7.4.
Apologies for not sending them earlier, I have been quite busy these past
few weeks.
Note: for simplicity, I based everything on Takashi's tree, but if
preferred I can resend patch 3 separately rebased on Mark's.
Best regards,
Marco
sound/hda/codecs/side-codecs/aw88399_hda.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/hda/codecs/side-codecs/aw88399_hda.c b/sound/hda/codecs/side-codecs/aw88399_hda.c
index 00b78299fa56..5d5acf87ef3c 100644
--- a/sound/hda/codecs/side-codecs/aw88399_hda.c
+++ b/sound/hda/codecs/side-codecs/aw88399_hda.c
@@ -184,7 +184,6 @@ static const struct aw88399_prop_model aw88399_prop_model_table[] = {
static int aw88399_hda_acpi_probe(struct aw88399_hda *aw88399)
{
struct acpi_device *adev;
- const char *sub;
const struct aw88399_prop_model *model;
aw88399->index = aw88399_hda_index_from_i2c(aw88399);
@@ -203,14 +202,13 @@ static int aw88399_hda_acpi_probe(struct aw88399_hda *aw88399)
if (!physdev)
return -ENODEV;
- sub = acpi_get_subsystem_id(ACPI_HANDLE(physdev));
+ const char *sub __free(kfree) = acpi_get_subsystem_id(ACPI_HANDLE(physdev));
if (IS_ERR_OR_NULL(sub)) {
dev_err(aw88399->dev, "ACPI subsystem ID not available\n");
return -ENODEV;
}
aw88399->acpi_subsystem_id = devm_kstrdup(aw88399->dev, sub, GFP_KERNEL);
- kfree(sub);
if (!aw88399->acpi_subsystem_id)
return -ENOMEM;
base-commit: af642c86437dc62558461f624efb703608d1c09f
--
2.56.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/3] ALSA: hda: aw88399: add missing MODULE_AUTHOR to I2C driver
2026-10-29 10:51 [PATCH 1/3] ALSA: hda: aw88399: use auto-cleanup for ACPI subsystem ID string Marco Giunta
@ 2026-10-29 10:51 ` Marco Giunta
2026-10-29 10:51 ` [PATCH 3/3] ASoC: aw88399: move library exports to SND_SOC_AW88399_LIB namespace Marco Giunta
2026-10-31 16:02 ` [PATCH 1/3] ALSA: hda: aw88399: use auto-cleanup for ACPI subsystem ID string Takashi Iwai
2 siblings, 0 replies; 5+ messages in thread
From: Marco Giunta @ 2026-10-29 10:51 UTC (permalink / raw)
To: Takashi Iwai, Mark Brown
Cc: Jaroslav Kysela, Liam Girdwood, Marco Giunta, linux-sound, linux-kernel
The original AW88399 HDA driver submission accidentally didn't include my
MODULE_AUTHOR() metadata in the I2C driver.
Add it, matching the main HDA driver.
Signed-off-by: Marco Giunta <marco_giunta@outlook.it>
---
sound/hda/codecs/side-codecs/aw88399_hda_i2c.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/hda/codecs/side-codecs/aw88399_hda_i2c.c b/sound/hda/codecs/side-codecs/aw88399_hda_i2c.c
index 186e13adbc6c..9443ca887431 100644
--- a/sound/hda/codecs/side-codecs/aw88399_hda_i2c.c
+++ b/sound/hda/codecs/side-codecs/aw88399_hda_i2c.c
@@ -51,4 +51,5 @@ module_i2c_driver(aw88399_hda_i2c_driver);
MODULE_DESCRIPTION("HDA AW88399 I2C driver");
MODULE_IMPORT_NS("SND_HDA_SCODEC_AW88399");
MODULE_AUTHOR("Yakov Till <yakov.till@gmail.com>");
+MODULE_AUTHOR("Marco Giunta <marco_giunta@outlook.it>");
MODULE_LICENSE("GPL");
--
2.56.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 3/3] ASoC: aw88399: move library exports to SND_SOC_AW88399_LIB namespace
2026-10-29 10:51 [PATCH 1/3] ALSA: hda: aw88399: use auto-cleanup for ACPI subsystem ID string Marco Giunta
2026-10-29 10:51 ` [PATCH 2/3] ALSA: hda: aw88399: add missing MODULE_AUTHOR to I2C driver Marco Giunta
@ 2026-10-29 10:51 ` Marco Giunta
2026-10-29 11:19 ` Mark Brown
2026-10-31 16:02 ` [PATCH 1/3] ALSA: hda: aw88399: use auto-cleanup for ACPI subsystem ID string Takashi Iwai
2 siblings, 1 reply; 5+ messages in thread
From: Marco Giunta @ 2026-10-29 10:51 UTC (permalink / raw)
To: Takashi Iwai, Mark Brown
Cc: Jaroslav Kysela, Liam Girdwood, Marco Giunta, linux-sound, linux-kernel
Replace every EXPORT_SYMBOL_GPL(x) in aw88399-lib.c with
EXPORT_SYMBOL_NS_GPL(x, "SND_SOC_AW88399_LIB"), and add the corresponding
MODULE_IMPORT_NS("SND_SOC_AW88399_LIB") metadata to the ASoC and HDA
users of the library (aw88399.c, aw88399_hda.c, aw88399_hda_i2c.c).
This makes module dependencies explicit, consistent with the namespaced
exports in the HDA side-codec driver.
Signed-off-by: Marco Giunta <marco_giunta@outlook.it>
---
sound/hda/codecs/side-codecs/aw88399_hda.c | 1 +
.../hda/codecs/side-codecs/aw88399_hda_i2c.c | 1 +
sound/soc/codecs/aw88399-lib.c | 30 +++++++++----------
sound/soc/codecs/aw88399.c | 1 +
4 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/sound/hda/codecs/side-codecs/aw88399_hda.c b/sound/hda/codecs/side-codecs/aw88399_hda.c
index 5d5acf87ef3c..94a4577cb2fe 100644
--- a/sound/hda/codecs/side-codecs/aw88399_hda.c
+++ b/sound/hda/codecs/side-codecs/aw88399_hda.c
@@ -355,6 +355,7 @@ const struct dev_pm_ops aw88399_hda_pm_ops = {
EXPORT_SYMBOL_NS_GPL(aw88399_hda_pm_ops, "SND_HDA_SCODEC_AW88399");
MODULE_DESCRIPTION("AW88399 HDA driver");
+MODULE_IMPORT_NS("SND_SOC_AW88399_LIB");
MODULE_AUTHOR("Yakov Till <yakov.till@gmail.com>");
MODULE_AUTHOR("Marco Giunta <marco_giunta@outlook.it>");
MODULE_LICENSE("GPL");
diff --git a/sound/hda/codecs/side-codecs/aw88399_hda_i2c.c b/sound/hda/codecs/side-codecs/aw88399_hda_i2c.c
index 9443ca887431..0b3fa75e09c7 100644
--- a/sound/hda/codecs/side-codecs/aw88399_hda_i2c.c
+++ b/sound/hda/codecs/side-codecs/aw88399_hda_i2c.c
@@ -50,6 +50,7 @@ module_i2c_driver(aw88399_hda_i2c_driver);
MODULE_DESCRIPTION("HDA AW88399 I2C driver");
MODULE_IMPORT_NS("SND_HDA_SCODEC_AW88399");
+MODULE_IMPORT_NS("SND_SOC_AW88399_LIB");
MODULE_AUTHOR("Yakov Till <yakov.till@gmail.com>");
MODULE_AUTHOR("Marco Giunta <marco_giunta@outlook.it>");
MODULE_LICENSE("GPL");
diff --git a/sound/soc/codecs/aw88399-lib.c b/sound/soc/codecs/aw88399-lib.c
index b4e8aae56805..b08baacad87b 100644
--- a/sound/soc/codecs/aw88399-lib.c
+++ b/sound/soc/codecs/aw88399-lib.c
@@ -23,7 +23,7 @@ const struct regmap_config aw88399_remap_config = {
.reg_format_endian = REGMAP_ENDIAN_LITTLE,
.val_format_endian = REGMAP_ENDIAN_BIG,
};
-EXPORT_SYMBOL_GPL(aw88399_remap_config);
+EXPORT_SYMBOL_NS_GPL(aw88399_remap_config, "SND_SOC_AW88399_LIB");
static void aw_dev_pwd(struct aw_device *aw_dev, bool pwd)
{
@@ -165,7 +165,7 @@ int aw_dev_check_syspll(struct aw_device *aw_dev)
return 0;
}
-EXPORT_SYMBOL_GPL(aw_dev_check_syspll);
+EXPORT_SYMBOL_NS_GPL(aw_dev_check_syspll, "SND_SOC_AW88399_LIB");
static int aw_dev_check_sysst(struct aw_device *aw_dev)
{
@@ -241,7 +241,7 @@ void aw_dev_dsp_enable(struct aw_device *aw_dev, bool is_enable)
if (ret)
dev_dbg(aw_dev->dev, "%s failed\n", __func__);
}
-EXPORT_SYMBOL_GPL(aw_dev_dsp_enable);
+EXPORT_SYMBOL_NS_GPL(aw_dev_dsp_enable, "SND_SOC_AW88399_LIB");
static int aw88399_dev_get_icalk(struct aw88399 *aw88399, int16_t *icalk)
{
@@ -418,7 +418,7 @@ int aw_dev_update_cali_re(struct aw_cali_desc *cali_desc)
return ret;
}
-EXPORT_SYMBOL_GPL(aw_dev_update_cali_re);
+EXPORT_SYMBOL_NS_GPL(aw_dev_update_cali_re, "SND_SOC_AW88399_LIB");
static int aw_dev_fw_crc_check(struct aw_device *aw_dev)
{
@@ -572,7 +572,7 @@ int aw_dev_get_dsp_status(struct aw_device *aw_dev)
return 0;
}
-EXPORT_SYMBOL_GPL(aw_dev_get_dsp_status);
+EXPORT_SYMBOL_NS_GPL(aw_dev_get_dsp_status, "SND_SOC_AW88399_LIB");
static int aw_dev_dsp_check(struct aw_device *aw_dev)
{
@@ -625,7 +625,7 @@ int aw_dev_set_volume(struct aw_device *aw_dev, unsigned int value)
return ret;
}
-EXPORT_SYMBOL_GPL(aw_dev_set_volume);
+EXPORT_SYMBOL_NS_GPL(aw_dev_set_volume, "SND_SOC_AW88399_LIB");
static void aw_dev_fade_in(struct aw_device *aw_dev)
{
@@ -682,7 +682,7 @@ void aw88399_dev_mute(struct aw_device *aw_dev, bool is_mute)
aw_dev_fade_in(aw_dev);
}
}
-EXPORT_SYMBOL_GPL(aw88399_dev_mute);
+EXPORT_SYMBOL_NS_GPL(aw88399_dev_mute, "SND_SOC_AW88399_LIB");
static void aw88399_dev_set_dither(struct aw88399 *aw88399, bool dither)
{
@@ -1038,7 +1038,7 @@ int aw88399_dev_get_prof_name(struct aw_device *aw_dev, int index, char **prof_n
return 0;
}
-EXPORT_SYMBOL_GPL(aw88399_dev_get_prof_name);
+EXPORT_SYMBOL_NS_GPL(aw88399_dev_get_prof_name, "SND_SOC_AW88399_LIB");
static int aw88399_dev_get_prof_data(struct aw_device *aw_dev, int index,
struct aw_prof_desc **prof_desc)
@@ -1163,7 +1163,7 @@ void aw88399_startup_work(struct work_struct *work)
aw88399_start_pa(aw88399);
mutex_unlock(&aw88399->lock);
}
-EXPORT_SYMBOL_GPL(aw88399_startup_work);
+EXPORT_SYMBOL_NS_GPL(aw88399_startup_work, "SND_SOC_AW88399_LIB");
void aw88399_start(struct aw88399 *aw88399, bool sync_start)
{
@@ -1191,7 +1191,7 @@ void aw88399_start(struct aw88399 *aw88399, bool sync_start)
&aw88399->start_work,
AW88399_START_WORK_DELAY_MS);
}
-EXPORT_SYMBOL_GPL(aw88399_start);
+EXPORT_SYMBOL_NS_GPL(aw88399_start, "SND_SOC_AW88399_LIB");
static int aw_dev_check_sysint(struct aw_device *aw_dev)
{
@@ -1244,7 +1244,7 @@ int aw88399_stop(struct aw_device *aw_dev)
return 0;
}
-EXPORT_SYMBOL_GPL(aw88399_stop);
+EXPORT_SYMBOL_NS_GPL(aw88399_stop, "SND_SOC_AW88399_LIB");
static int aw88399_dev_init(struct aw88399 *aw88399, struct aw_container *aw_cfg)
{
@@ -1323,7 +1323,7 @@ int aw88399_request_firmware_file(struct aw88399 *aw88399, const char *fw_name)
return ret;
}
-EXPORT_SYMBOL_GPL(aw88399_request_firmware_file);
+EXPORT_SYMBOL_NS_GPL(aw88399_request_firmware_file, "SND_SOC_AW88399_LIB");
void aw88399_hw_reset(struct aw88399 *aw88399)
{
@@ -1336,7 +1336,7 @@ void aw88399_hw_reset(struct aw88399 *aw88399)
usleep_range(AW88399_1000_US, AW88399_1000_US + 10);
}
}
-EXPORT_SYMBOL_GPL(aw88399_hw_reset);
+EXPORT_SYMBOL_NS_GPL(aw88399_hw_reset, "SND_SOC_AW88399_LIB");
static void aw88399_parse_channel_dt(struct aw_device *aw_dev)
{
@@ -1401,13 +1401,13 @@ int aw88399_init(struct aw88399 *aw88399, struct i2c_client *i2c, struct regmap
return 0;
}
-EXPORT_SYMBOL_GPL(aw88399_init);
+EXPORT_SYMBOL_NS_GPL(aw88399_init, "SND_SOC_AW88399_LIB");
void aw88399_dev_set_channel(struct aw88399 *aw88399, int channel)
{
aw88399->aw_pa->channel = channel;
}
-EXPORT_SYMBOL_GPL(aw88399_dev_set_channel);
+EXPORT_SYMBOL_NS_GPL(aw88399_dev_set_channel, "SND_SOC_AW88399_LIB");
MODULE_DESCRIPTION("AW88399 common device library");
MODULE_LICENSE("GPL");
diff --git a/sound/soc/codecs/aw88399.c b/sound/soc/codecs/aw88399.c
index 320dc1b87841..c398f66a5262 100644
--- a/sound/soc/codecs/aw88399.c
+++ b/sound/soc/codecs/aw88399.c
@@ -818,4 +818,5 @@ static struct i2c_driver aw88399_i2c_driver = {
module_i2c_driver(aw88399_i2c_driver);
MODULE_DESCRIPTION("ASoC AW88399 Smart PA Driver");
+MODULE_IMPORT_NS("SND_SOC_AW88399_LIB");
MODULE_LICENSE("GPL v2");
--
2.56.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 3/3] ASoC: aw88399: move library exports to SND_SOC_AW88399_LIB namespace
2026-10-29 10:51 ` [PATCH 3/3] ASoC: aw88399: move library exports to SND_SOC_AW88399_LIB namespace Marco Giunta
@ 2026-10-29 11:19 ` Mark Brown
0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2026-10-29 11:19 UTC (permalink / raw)
To: Marco Giunta
Cc: Takashi Iwai, Jaroslav Kysela, Liam Girdwood, linux-sound, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 381 bytes --]
On Thu, Oct 29, 2026 at 11:51:59AM +0100, Marco Giunta wrote:
> Replace every EXPORT_SYMBOL_GPL(x) in aw88399-lib.c with
> EXPORT_SYMBOL_NS_GPL(x, "SND_SOC_AW88399_LIB"), and add the corresponding
> MODULE_IMPORT_NS("SND_SOC_AW88399_LIB") metadata to the ASoC and HDA
> users of the library (aw88399.c, aw88399_hda.c, aw88399_hda_i2c.c).
Acked-by: Mark Brown <broonie@kernel.org>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/3] ALSA: hda: aw88399: use auto-cleanup for ACPI subsystem ID string
2026-10-29 10:51 [PATCH 1/3] ALSA: hda: aw88399: use auto-cleanup for ACPI subsystem ID string Marco Giunta
2026-10-29 10:51 ` [PATCH 2/3] ALSA: hda: aw88399: add missing MODULE_AUTHOR to I2C driver Marco Giunta
2026-10-29 10:51 ` [PATCH 3/3] ASoC: aw88399: move library exports to SND_SOC_AW88399_LIB namespace Marco Giunta
@ 2026-10-31 16:02 ` Takashi Iwai
2 siblings, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2026-10-31 16:02 UTC (permalink / raw)
To: Marco Giunta
Cc: Takashi Iwai, Mark Brown, Jaroslav Kysela, Liam Girdwood,
linux-sound, linux-kernel
On Thu, 29 Oct 2026 11:51:57 +0100,
Marco Giunta wrote:
>
> Use scope-based cleanup for the string returned by acpi_get_subsystem_id()
> instead of freeing it manually, consistent with the other cleanup
> annotations in aw88399_hda_acpi_probe() and aw88399_hda_init().
>
> This is just a code cleanup, with no functional changes intended.
>
> Signed-off-by: Marco Giunta <marco_giunta@outlook.it>
> ---
> Hi Takashi & Mark,
>
> This series contains some trivial cleanups that should (hopefully) improve
> the overall code quality. These patches are the result of me re-reviewing
> the driver code during the development of the recent firmware path change
> series.
>
> I appreciate that it's likely too late to get these into 7.4.
> Apologies for not sending them earlier, I have been quite busy these past
> few weeks.
>
> Note: for simplicity, I based everything on Takashi's tree, but if
> preferred I can resend patch 3 separately rebased on Mark's.
Applied all three patches now. thanks.
Takashi
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-10-31 16:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-29 10:51 [PATCH 1/3] ALSA: hda: aw88399: use auto-cleanup for ACPI subsystem ID string Marco Giunta
2026-10-29 10:51 ` [PATCH 2/3] ALSA: hda: aw88399: add missing MODULE_AUTHOR to I2C driver Marco Giunta
2026-10-29 10:51 ` [PATCH 3/3] ASoC: aw88399: move library exports to SND_SOC_AW88399_LIB namespace Marco Giunta
2026-10-29 11:19 ` Mark Brown
2026-10-31 16:02 ` [PATCH 1/3] ALSA: hda: aw88399: use auto-cleanup for ACPI subsystem ID string Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®