* [PATCH] ASoC: tas2781: remove unused acpi_subysystem_id
@ 2024-02-06 20:25 Gergo Koteles
2024-02-06 21:34 ` [PATCH v2] " Gergo Koteles
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Gergo Koteles @ 2024-02-06 20:25 UTC (permalink / raw)
To: Shenghao Ding, Kevin Lu, Baojun Xu, Jaroslav Kysela, Takashi Iwai,
Liam Girdwood, Mark Brown
Cc: linux-sound, linux-kernel, alsa-devel, Gergo Koteles, stable
The acpi_subysystem_id is only written and freed, not read, so
unnecessary.
Fixes: ef3bcde75d06 ("ASoC: tas2781: Add tas2781 driver")
CC: stable@vger.kernel.org
Signed-off-by: Gergo Koteles <soyer@irl.hu>
---
include/sound/tas2781.h | 1 -
sound/pci/hda/tas2781_hda_i2c.c | 10 ----------
sound/soc/codecs/tas2781-comlib.c | 1 -
3 files changed, 12 deletions(-)
diff --git a/include/sound/tas2781.h b/include/sound/tas2781.h
index 9aff384941de..99ca3e401fd1 100644
--- a/include/sound/tas2781.h
+++ b/include/sound/tas2781.h
@@ -103,7 +103,6 @@ struct tasdevice_priv {
struct tm tm;
enum device_catlog_id catlog_id;
- const char *acpi_subsystem_id;
unsigned char cal_binaryname[TASDEVICE_MAX_CHANNELS][64];
unsigned char crc8_lkp_tbl[CRC8_TABLE_SIZE];
unsigned char coef_binaryname[64];
diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c
index 1bfb00102a77..02c85084aca5 100644
--- a/sound/pci/hda/tas2781_hda_i2c.c
+++ b/sound/pci/hda/tas2781_hda_i2c.c
@@ -129,18 +129,8 @@ static int tas2781_read_acpi(struct tasdevice_priv *p, const char *hid)
acpi_dev_free_resource_list(&resources);
strscpy(p->dev_name, hid, sizeof(p->dev_name));
- physdev = get_device(acpi_get_first_physical_node(adev));
acpi_dev_put(adev);
- /* No side-effect to the playback even if subsystem_id is NULL*/
- sub = acpi_get_subsystem_id(ACPI_HANDLE(physdev));
- if (IS_ERR(sub))
- sub = NULL;
-
- p->acpi_subsystem_id = sub;
-
- put_device(physdev);
-
return 0;
err:
diff --git a/sound/soc/codecs/tas2781-comlib.c b/sound/soc/codecs/tas2781-comlib.c
index 5d0e5348b361..3aa81514dad7 100644
--- a/sound/soc/codecs/tas2781-comlib.c
+++ b/sound/soc/codecs/tas2781-comlib.c
@@ -408,7 +408,6 @@ void tasdevice_remove(struct tasdevice_priv *tas_priv)
{
if (gpio_is_valid(tas_priv->irq_info.irq_gpio))
gpio_free(tas_priv->irq_info.irq_gpio);
- kfree(tas_priv->acpi_subsystem_id);
mutex_destroy(&tas_priv->codec_lock);
}
EXPORT_SYMBOL_GPL(tasdevice_remove);
base-commit: 610010737f74482a61896596a0116876ecf9e65c
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2] ASoC: tas2781: remove unused acpi_subysystem_id
2024-02-06 20:25 [PATCH] ASoC: tas2781: remove unused acpi_subysystem_id Gergo Koteles
@ 2024-02-06 21:34 ` Gergo Koteles
2024-02-07 10:06 ` Mark Brown
2024-02-06 21:49 ` [PATCH v3] " Gergo Koteles
2024-02-07 10:02 ` [PATCH] " Greg KH
2 siblings, 1 reply; 8+ messages in thread
From: Gergo Koteles @ 2024-02-06 21:34 UTC (permalink / raw)
To: Shenghao Ding, Kevin Lu, Baojun Xu, Jaroslav Kysela, Takashi Iwai,
Liam Girdwood, Mark Brown
Cc: linux-sound, linux-kernel, alsa-devel, Gergo Koteles, stable
The acpi_subysystem_id is only written and freed, not read, so
unnecessary.
Fixes: ef3bcde75d06 ("ASoC: tas2781: Add tas2781 driver")
CC: stable@vger.kernel.org
Signed-off-by: Gergo Koteles <soyer@irl.hu>
---
include/sound/tas2781.h | 1 -
sound/pci/hda/tas2781_hda_i2c.c | 11 -----------
sound/soc/codecs/tas2781-comlib.c | 1 -
3 files changed, 13 deletions(-)
diff --git a/include/sound/tas2781.h b/include/sound/tas2781.h
index 9aff384941de..99ca3e401fd1 100644
--- a/include/sound/tas2781.h
+++ b/include/sound/tas2781.h
@@ -103,7 +103,6 @@ struct tasdevice_priv {
struct tm tm;
enum device_catlog_id catlog_id;
- const char *acpi_subsystem_id;
unsigned char cal_binaryname[TASDEVICE_MAX_CHANNELS][64];
unsigned char crc8_lkp_tbl[CRC8_TABLE_SIZE];
unsigned char coef_binaryname[64];
diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c
index 1bfb00102a77..2fd391bc693a 100644
--- a/sound/pci/hda/tas2781_hda_i2c.c
+++ b/sound/pci/hda/tas2781_hda_i2c.c
@@ -111,7 +111,6 @@ static int tas2781_get_i2c_res(struct acpi_resource *ares, void *data)
static int tas2781_read_acpi(struct tasdevice_priv *p, const char *hid)
{
struct acpi_device *adev;
- struct device *physdev;
LIST_HEAD(resources);
const char *sub;
int ret;
@@ -129,18 +128,8 @@ static int tas2781_read_acpi(struct tasdevice_priv *p, const char *hid)
acpi_dev_free_resource_list(&resources);
strscpy(p->dev_name, hid, sizeof(p->dev_name));
- physdev = get_device(acpi_get_first_physical_node(adev));
acpi_dev_put(adev);
- /* No side-effect to the playback even if subsystem_id is NULL*/
- sub = acpi_get_subsystem_id(ACPI_HANDLE(physdev));
- if (IS_ERR(sub))
- sub = NULL;
-
- p->acpi_subsystem_id = sub;
-
- put_device(physdev);
-
return 0;
err:
diff --git a/sound/soc/codecs/tas2781-comlib.c b/sound/soc/codecs/tas2781-comlib.c
index 5d0e5348b361..3aa81514dad7 100644
--- a/sound/soc/codecs/tas2781-comlib.c
+++ b/sound/soc/codecs/tas2781-comlib.c
@@ -408,7 +408,6 @@ void tasdevice_remove(struct tasdevice_priv *tas_priv)
{
if (gpio_is_valid(tas_priv->irq_info.irq_gpio))
gpio_free(tas_priv->irq_info.irq_gpio);
- kfree(tas_priv->acpi_subsystem_id);
mutex_destroy(&tas_priv->codec_lock);
}
EXPORT_SYMBOL_GPL(tasdevice_remove);
base-commit: 610010737f74482a61896596a0116876ecf9e65c
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v3] ASoC: tas2781: remove unused acpi_subysystem_id
2024-02-06 20:25 [PATCH] ASoC: tas2781: remove unused acpi_subysystem_id Gergo Koteles
2024-02-06 21:34 ` [PATCH v2] " Gergo Koteles
@ 2024-02-06 21:49 ` Gergo Koteles
2024-02-07 10:07 ` Mark Brown
2024-02-07 10:02 ` [PATCH] " Greg KH
2 siblings, 1 reply; 8+ messages in thread
From: Gergo Koteles @ 2024-02-06 21:49 UTC (permalink / raw)
To: Shenghao Ding, Kevin Lu, Baojun Xu, Jaroslav Kysela, Takashi Iwai,
Liam Girdwood, Mark Brown
Cc: linux-sound, linux-kernel, alsa-devel, Gergo Koteles, stable
The acpi_subysystem_id is only written and freed, not read, so
unnecessary.
Fixes: ef3bcde75d06 ("ASoC: tas2781: Add tas2781 driver")
CC: stable@vger.kernel.org
Signed-off-by: Gergo Koteles <soyer@irl.hu>
---
Changes since v2: remove sub from tas2781_read_acpi
Changes since v1: remove physdev from tas2781_read_acpi
---
include/sound/tas2781.h | 1 -
sound/pci/hda/tas2781_hda_i2c.c | 12 ------------
sound/soc/codecs/tas2781-comlib.c | 1 -
3 files changed, 14 deletions(-)
diff --git a/include/sound/tas2781.h b/include/sound/tas2781.h
index 9aff384941de..99ca3e401fd1 100644
--- a/include/sound/tas2781.h
+++ b/include/sound/tas2781.h
@@ -103,7 +103,6 @@ struct tasdevice_priv {
struct tm tm;
enum device_catlog_id catlog_id;
- const char *acpi_subsystem_id;
unsigned char cal_binaryname[TASDEVICE_MAX_CHANNELS][64];
unsigned char crc8_lkp_tbl[CRC8_TABLE_SIZE];
unsigned char coef_binaryname[64];
diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c
index 1bfb00102a77..4c9a788c3501 100644
--- a/sound/pci/hda/tas2781_hda_i2c.c
+++ b/sound/pci/hda/tas2781_hda_i2c.c
@@ -111,9 +111,7 @@ static int tas2781_get_i2c_res(struct acpi_resource *ares, void *data)
static int tas2781_read_acpi(struct tasdevice_priv *p, const char *hid)
{
struct acpi_device *adev;
- struct device *physdev;
LIST_HEAD(resources);
- const char *sub;
int ret;
adev = acpi_dev_get_first_match_dev(hid, NULL, -1);
@@ -129,18 +127,8 @@ static int tas2781_read_acpi(struct tasdevice_priv *p, const char *hid)
acpi_dev_free_resource_list(&resources);
strscpy(p->dev_name, hid, sizeof(p->dev_name));
- physdev = get_device(acpi_get_first_physical_node(adev));
acpi_dev_put(adev);
- /* No side-effect to the playback even if subsystem_id is NULL*/
- sub = acpi_get_subsystem_id(ACPI_HANDLE(physdev));
- if (IS_ERR(sub))
- sub = NULL;
-
- p->acpi_subsystem_id = sub;
-
- put_device(physdev);
-
return 0;
err:
diff --git a/sound/soc/codecs/tas2781-comlib.c b/sound/soc/codecs/tas2781-comlib.c
index 5d0e5348b361..3aa81514dad7 100644
--- a/sound/soc/codecs/tas2781-comlib.c
+++ b/sound/soc/codecs/tas2781-comlib.c
@@ -408,7 +408,6 @@ void tasdevice_remove(struct tasdevice_priv *tas_priv)
{
if (gpio_is_valid(tas_priv->irq_info.irq_gpio))
gpio_free(tas_priv->irq_info.irq_gpio);
- kfree(tas_priv->acpi_subsystem_id);
mutex_destroy(&tas_priv->codec_lock);
}
EXPORT_SYMBOL_GPL(tasdevice_remove);
base-commit: 610010737f74482a61896596a0116876ecf9e65c
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] ASoC: tas2781: remove unused acpi_subysystem_id
2024-02-06 20:25 [PATCH] ASoC: tas2781: remove unused acpi_subysystem_id Gergo Koteles
2024-02-06 21:34 ` [PATCH v2] " Gergo Koteles
2024-02-06 21:49 ` [PATCH v3] " Gergo Koteles
@ 2024-02-07 10:02 ` Greg KH
2024-02-07 23:24 ` Gergo Koteles
2 siblings, 1 reply; 8+ messages in thread
From: Greg KH @ 2024-02-07 10:02 UTC (permalink / raw)
To: Gergo Koteles
Cc: Shenghao Ding, Kevin Lu, Baojun Xu, Jaroslav Kysela, Takashi Iwai,
Liam Girdwood, Mark Brown, linux-sound, linux-kernel, alsa-devel,
stable
On Tue, Feb 06, 2024 at 09:25:50PM +0100, Gergo Koteles wrote:
> The acpi_subysystem_id is only written and freed, not read, so
> unnecessary.
>
> Fixes: ef3bcde75d06 ("ASoC: tas2781: Add tas2781 driver")
What does this really "fix"? It's just a cleanup.
> CC: stable@vger.kernel.org
Again, what bug is this fixing?
Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
about what should be tagged for stable kernels, which this patch series
does not seem to fix.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] ASoC: tas2781: remove unused acpi_subysystem_id
2024-02-06 21:34 ` [PATCH v2] " Gergo Koteles
@ 2024-02-07 10:06 ` Mark Brown
0 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2024-02-07 10:06 UTC (permalink / raw)
To: Gergo Koteles
Cc: Shenghao Ding, Kevin Lu, Baojun Xu, Jaroslav Kysela, Takashi Iwai,
Liam Girdwood, linux-sound, linux-kernel, alsa-devel, stable
[-- Attachment #1: Type: text/plain, Size: 285 bytes --]
On Tue, Feb 06, 2024 at 10:34:15PM +0100, Gergo Koteles wrote:
> The acpi_subysystem_id is only written and freed, not read, so
> unnecessary.
>
> Fixes: ef3bcde75d06 ("ASoC: tas2781: Add tas2781 driver")
> CC: stable@vger.kernel.org
This is clearly a cleanup, not a bugfix.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3] ASoC: tas2781: remove unused acpi_subysystem_id
2024-02-06 21:49 ` [PATCH v3] " Gergo Koteles
@ 2024-02-07 10:07 ` Mark Brown
2024-02-07 23:49 ` Gergo Koteles
0 siblings, 1 reply; 8+ messages in thread
From: Mark Brown @ 2024-02-07 10:07 UTC (permalink / raw)
To: Gergo Koteles
Cc: Shenghao Ding, Kevin Lu, Baojun Xu, Jaroslav Kysela, Takashi Iwai,
Liam Girdwood, linux-sound, linux-kernel, alsa-devel, stable
[-- Attachment #1: Type: text/plain, Size: 431 bytes --]
On Tue, Feb 06, 2024 at 10:49:29PM +0100, Gergo Koteles wrote:
> The acpi_subysystem_id is only written and freed, not read, so
> unnecessary.
Please don't send new patches in reply to old patches or serieses, this
makes it harder for both people and tools to understand what is going
on - it can bury things in mailboxes and make it difficult to keep track
of what current patches are, both for the new patches and the old ones.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ASoC: tas2781: remove unused acpi_subysystem_id
2024-02-07 10:02 ` [PATCH] " Greg KH
@ 2024-02-07 23:24 ` Gergo Koteles
0 siblings, 0 replies; 8+ messages in thread
From: Gergo Koteles @ 2024-02-07 23:24 UTC (permalink / raw)
To: Greg KH
Cc: Shenghao Ding, Kevin Lu, Baojun Xu, Jaroslav Kysela, Takashi Iwai,
Liam Girdwood, Mark Brown, linux-sound, linux-kernel, alsa-devel,
stable
Hi Greg,
On Wed, 2024-02-07 at 10:02 +0000, Greg KH wrote:
> On Tue, Feb 06, 2024 at 09:25:50PM +0100, Gergo Koteles wrote:
> > The acpi_subysystem_id is only written and freed, not read, so
> > unnecessary.
> >
> > Fixes: ef3bcde75d06 ("ASoC: tas2781: Add tas2781 driver")
>
> What does this really "fix"? It's just a cleanup.
>
> > CC: stable@vger.kernel.org
>
> Again, what bug is this fixing?
>
> Please read:
> https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
> about what should be tagged for stable kernels, which this patch series
> does not seem to fix.
>
Yes, you are right, this is not really a bug.
I took the scope of "oh, that's not good" too wide.
Sorry for the noise.
thanks,
Gergo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v3] ASoC: tas2781: remove unused acpi_subysystem_id
2024-02-07 10:07 ` Mark Brown
@ 2024-02-07 23:49 ` Gergo Koteles
0 siblings, 0 replies; 8+ messages in thread
From: Gergo Koteles @ 2024-02-07 23:49 UTC (permalink / raw)
To: Mark Brown
Cc: Shenghao Ding, Kevin Lu, Baojun Xu, Jaroslav Kysela, Takashi Iwai,
Liam Girdwood, linux-sound, linux-kernel, alsa-devel, stable
Hi Mark,
On Wed, 2024-02-07 at 10:07 +0000, Mark Brown wrote:
> On Tue, Feb 06, 2024 at 10:49:29PM +0100, Gergo Koteles wrote:
> > The acpi_subysystem_id is only written and freed, not read, so
> > unnecessary.
>
> Please don't send new patches in reply to old patches or serieses, this
> makes it harder for both people and tools to understand what is going
> on - it can bury things in mailboxes and make it difficult to keep track
> of what current patches are, both for the new patches and the old ones.
Alright. I read somewhere once.
Sorry for the noise.
thanks,
Gergo
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-02-07 23:49 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-06 20:25 [PATCH] ASoC: tas2781: remove unused acpi_subysystem_id Gergo Koteles
2024-02-06 21:34 ` [PATCH v2] " Gergo Koteles
2024-02-07 10:06 ` Mark Brown
2024-02-06 21:49 ` [PATCH v3] " Gergo Koteles
2024-02-07 10:07 ` Mark Brown
2024-02-07 23:49 ` Gergo Koteles
2024-02-07 10:02 ` [PATCH] " Greg KH
2024-02-07 23:24 ` Gergo Koteles
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox