[PATCH v1 1/5] ASoC: Intel: bytcht_cx2072x: Replace open coded acpi_dev_put()
Instead of calling put_device(&adev->dev) where adev is a pointer to an ACPI device, use specific call, i.e. acpi_dev_put().
Also move it out of the conditional to make it more visible in case some other code will be added which may use that pointer. We need to keep a reference as long as we use the pointer.
Signed-off-by: Andy Shevchenko andriy.shevchenko@linux.intel.com --- sound/soc/intel/boards/bytcht_cx2072x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/intel/boards/bytcht_cx2072x.c b/sound/soc/intel/boards/bytcht_cx2072x.c index 41cec67157b6..9942a2de6f7a 100644 --- a/sound/soc/intel/boards/bytcht_cx2072x.c +++ b/sound/soc/intel/boards/bytcht_cx2072x.c @@ -253,9 +253,9 @@ static int snd_byt_cht_cx2072x_probe(struct platform_device *pdev) if (adev) { snprintf(codec_name, sizeof(codec_name), "i2c-%s", acpi_dev_name(adev)); - put_device(&adev->dev); byt_cht_cx2072x_dais[dai_index].codecs->name = codec_name; } + acpi_dev_put(adev);
/* override platform name, if required */ ret = snd_soc_fixup_dai_links_platform_name(&byt_cht_cx2072x_card,
Instead of calling put_device(&adev->dev) where adev is a pointer to an ACPI device, use specific call, i.e. acpi_dev_put().
Also move it out of the conditional to make it more visible in case some other code will be added which may use that pointer. We need to keep a reference as long as we use the pointer.
Signed-off-by: Andy Shevchenko andriy.shevchenko@linux.intel.com --- sound/soc/intel/boards/bytcht_da7213.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/intel/boards/bytcht_da7213.c b/sound/soc/intel/boards/bytcht_da7213.c index a0c8f1d3f8ce..a3b0cfab17b0 100644 --- a/sound/soc/intel/boards/bytcht_da7213.c +++ b/sound/soc/intel/boards/bytcht_da7213.c @@ -256,9 +256,9 @@ static int bytcht_da7213_probe(struct platform_device *pdev) if (adev) { snprintf(codec_name, sizeof(codec_name), "i2c-%s", acpi_dev_name(adev)); - put_device(&adev->dev); dailink[dai_index].codecs->name = codec_name; } + acpi_dev_put(adev);
/* override platform name, if required */ platform_name = mach->mach_params.platform;
Instead of calling put_device(&adev->dev) where adev is a pointer to an ACPI device, use specific call, i.e. acpi_dev_put().
Also move it out of the conditional to make it more visible in case some other code will be added which may use that pointer. We need to keep a reference as long as we use the pointer.
Signed-off-by: Andy Shevchenko andriy.shevchenko@linux.intel.com --- sound/soc/intel/boards/cht_bsw_rt5645.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/intel/boards/cht_bsw_rt5645.c b/sound/soc/intel/boards/cht_bsw_rt5645.c index 25a054bd4073..875bc0b3d85d 100644 --- a/sound/soc/intel/boards/cht_bsw_rt5645.c +++ b/sound/soc/intel/boards/cht_bsw_rt5645.c @@ -581,9 +581,9 @@ static int snd_cht_mc_probe(struct platform_device *pdev) if (adev) { snprintf(cht_rt5645_codec_name, sizeof(cht_rt5645_codec_name), "i2c-%s", acpi_dev_name(adev)); - put_device(&adev->dev); cht_dailink[dai_index].codecs->name = cht_rt5645_codec_name; } + acpi_dev_put(adev);
/* * swap SSP0 if bytcr is detected
Instead of calling put_device(&adev->dev) where adev is a pointer to an ACPI device, use specific call, i.e. acpi_dev_put().
Also move it out of the conditional to make it more visible in case some other code will be added which may use that pointer. We need to keep a reference as long as we use the pointer.
Signed-off-by: Andy Shevchenko andriy.shevchenko@linux.intel.com --- sound/soc/intel/boards/cht_bsw_rt5672.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/intel/boards/cht_bsw_rt5672.c b/sound/soc/intel/boards/cht_bsw_rt5672.c index 49d3da8f7316..daa630a0efc1 100644 --- a/sound/soc/intel/boards/cht_bsw_rt5672.c +++ b/sound/soc/intel/boards/cht_bsw_rt5672.c @@ -473,9 +473,9 @@ static int snd_cht_mc_probe(struct platform_device *pdev) if (adev) { snprintf(drv->codec_name, sizeof(drv->codec_name), "i2c-%s", acpi_dev_name(adev)); - put_device(&adev->dev); cht_dailink[dai_index].codecs->name = drv->codec_name; } + acpi_dev_put(adev);
/* Use SSP0 on Bay Trail CR devices */ if (soc_intel_is_byt() && mach->mach_params.acpi_ipc_irq_index == 0) {
Instead of calling put_device(&adev->dev) where adev is a pointer to an ACPI device, use specific call, i.e. acpi_dev_put().
Also move it out of the conditional to make it more visible in case some other code will be added which may use that pointer. We need to keep a reference as long as we use the pointer.
Signed-off-by: Andy Shevchenko andriy.shevchenko@linux.intel.com --- sound/soc/intel/boards/sof_wm8804.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/intel/boards/sof_wm8804.c b/sound/soc/intel/boards/sof_wm8804.c index 54395e2ededc..fbad5a73de44 100644 --- a/sound/soc/intel/boards/sof_wm8804.c +++ b/sound/soc/intel/boards/sof_wm8804.c @@ -269,9 +269,9 @@ static int sof_wm8804_probe(struct platform_device *pdev) if (adev) { snprintf(codec_name, sizeof(codec_name), "%s%s", "i2c-", acpi_dev_name(adev)); - put_device(&adev->dev); dailink[dai_index].codecs->name = codec_name; } + acpi_dev_put(adev);
snd_soc_card_set_drvdata(card, ctx);
On 1/2/23 14:30, Andy Shevchenko wrote:
Instead of calling put_device(&adev->dev) where adev is a pointer to an ACPI device, use specific call, i.e. acpi_dev_put().
Also move it out of the conditional to make it more visible in case some other code will be added which may use that pointer. We need to keep a reference as long as we use the pointer.
Signed-off-by: Andy Shevchenko andriy.shevchenko@linux.intel.com
Answering for the series: we should make the change across all Intel machine drivers. I see at least four cases that were missed
bytcr_rt5640.c: put_device(&adev->dev); bytcr_rt5651.c: put_device(&adev->dev); bytcr_wm5102.c: put_device(&adev->dev); sof_es8336.c: put_device(&adev->dev);
sound/soc/intel/boards/bytcht_cx2072x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/intel/boards/bytcht_cx2072x.c b/sound/soc/intel/boards/bytcht_cx2072x.c index 41cec67157b6..9942a2de6f7a 100644 --- a/sound/soc/intel/boards/bytcht_cx2072x.c +++ b/sound/soc/intel/boards/bytcht_cx2072x.c @@ -253,9 +253,9 @@ static int snd_byt_cht_cx2072x_probe(struct platform_device *pdev) if (adev) { snprintf(codec_name, sizeof(codec_name), "i2c-%s", acpi_dev_name(adev));
byt_cht_cx2072x_dais[dai_index].codecs->name = codec_name; }put_device(&adev->dev);
acpi_dev_put(adev);
/* override platform name, if required */ ret = snd_soc_fixup_dai_links_platform_name(&byt_cht_cx2072x_card,
On Tue, Jan 03, 2023 at 09:08:20AM -0600, Pierre-Louis Bossart wrote:
On 1/2/23 14:30, Andy Shevchenko wrote:
Instead of calling put_device(&adev->dev) where adev is a pointer to an ACPI device, use specific call, i.e. acpi_dev_put().
Also move it out of the conditional to make it more visible in case some other code will be added which may use that pointer. We need to keep a reference as long as we use the pointer.
Signed-off-by: Andy Shevchenko andriy.shevchenko@linux.intel.com
Answering for the series: we should make the change across all Intel machine drivers. I see at least four cases that were missed
bytcr_rt5640.c: put_device(&adev->dev); bytcr_rt5651.c: put_device(&adev->dev); bytcr_wm5102.c: put_device(&adev->dev); sof_es8336.c: put_device(&adev->dev);
Aren't they (they all problematic, btw) covered by the fixes series https://lore.kernel.org/r/20230102203014.16041-1-andriy.shevchenko@linux.int...
On 1/4/23 04:29, Andy Shevchenko wrote:
On Tue, Jan 03, 2023 at 09:08:20AM -0600, Pierre-Louis Bossart wrote:
On 1/2/23 14:30, Andy Shevchenko wrote:
Instead of calling put_device(&adev->dev) where adev is a pointer to an ACPI device, use specific call, i.e. acpi_dev_put().
Also move it out of the conditional to make it more visible in case some other code will be added which may use that pointer. We need to keep a reference as long as we use the pointer.
Signed-off-by: Andy Shevchenko andriy.shevchenko@linux.intel.com
Answering for the series: we should make the change across all Intel machine drivers. I see at least four cases that were missed
bytcr_rt5640.c: put_device(&adev->dev); bytcr_rt5651.c: put_device(&adev->dev); bytcr_wm5102.c: put_device(&adev->dev); sof_es8336.c: put_device(&adev->dev);
Aren't they (they all problematic, btw) covered by the fixes series https://lore.kernel.org/r/20230102203014.16041-1-andriy.shevchenko@linux.int...
They are indeed, but if you group AMD-related patches with Intel ones, it's only human for reviewers to skip the thread entirely, even more so when catching up with email on January 3 :-)
For this series
Acked-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com
On Wed, Jan 04, 2023 at 08:15:27AM -0600, Pierre-Louis Bossart wrote:
For this series
Acked-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com
According to b4 you've only acked the first patch here because Andy doesn't send cover letters :/
On Wed, Jan 04, 2023 at 04:42:28PM +0000, Mark Brown wrote:
On Wed, Jan 04, 2023 at 08:15:27AM -0600, Pierre-Louis Bossart wrote:
For this series
Acked-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com
According to b4 you've only acked the first patch here because Andy doesn't send cover letters :/
Is b4 capable to spread tags from cover letter to the whole series? (Sorry, I'm a bit outdated with all Swiss-knife possibilities that b4 provides)
On Wed, Jan 04, 2023 at 06:48:11PM +0200, Andy Shevchenko wrote:
On Wed, Jan 04, 2023 at 04:42:28PM +0000, Mark Brown wrote:
According to b4 you've only acked the first patch here because Andy doesn't send cover letters :/
Is b4 capable to spread tags from cover letter to the whole series? (Sorry, I'm a bit outdated with all Swiss-knife possibilities that b4 provides)
Yes, it does that.
On Wed, Jan 04, 2023 at 05:16:04PM +0000, Mark Brown wrote:
On Wed, Jan 04, 2023 at 06:48:11PM +0200, Andy Shevchenko wrote:
On Wed, Jan 04, 2023 at 04:42:28PM +0000, Mark Brown wrote:
According to b4 you've only acked the first patch here because Andy doesn't send cover letters :/
Is b4 capable to spread tags from cover letter to the whole series? (Sorry, I'm a bit outdated with all Swiss-knife possibilities that b4 provides)
Yes, it does that.
Oh, cool to know! So it makes a lot of sense to create the cover letters even for straightforward independent changes that are united into the series for the easy handling.
Thank you!
P.S. Tell me if I need to resend with tags applied this time?
On Wed, Jan 04, 2023 at 08:15:27AM -0600, Pierre-Louis Bossart wrote:
On 1/4/23 04:29, Andy Shevchenko wrote:
On Tue, Jan 03, 2023 at 09:08:20AM -0600, Pierre-Louis Bossart wrote:
On 1/2/23 14:30, Andy Shevchenko wrote:
Instead of calling put_device(&adev->dev) where adev is a pointer to an ACPI device, use specific call, i.e. acpi_dev_put().
Also move it out of the conditional to make it more visible in case some other code will be added which may use that pointer. We need to keep a reference as long as we use the pointer.
Signed-off-by: Andy Shevchenko andriy.shevchenko@linux.intel.com
Answering for the series: we should make the change across all Intel machine drivers. I see at least four cases that were missed
bytcr_rt5640.c: put_device(&adev->dev); bytcr_rt5651.c: put_device(&adev->dev); bytcr_wm5102.c: put_device(&adev->dev); sof_es8336.c: put_device(&adev->dev);
Aren't they (they all problematic, btw) covered by the fixes series https://lore.kernel.org/r/20230102203014.16041-1-andriy.shevchenko@linux.int...
They are indeed, but if you group AMD-related patches with Intel ones, it's only human for reviewers to skip the thread entirely, even more so when catching up with email on January 3 :-)
Ah, I will try to remember to split also by platform (there are not many that's why I decided to group them by the problem type only).
For this series
Acked-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com
Thank you and HNY!
On Wed, Jan 04, 2023 at 08:15:27AM -0600, Pierre-Louis Bossart wrote:
On 1/4/23 04:29, Andy Shevchenko wrote:
On Tue, Jan 03, 2023 at 09:08:20AM -0600, Pierre-Louis Bossart wrote:
On 1/2/23 14:30, Andy Shevchenko wrote:
...
I see at least four cases that were missed
bytcr_rt5640.c: put_device(&adev->dev); bytcr_rt5651.c: put_device(&adev->dev); bytcr_wm5102.c: put_device(&adev->dev); sof_es8336.c: put_device(&adev->dev);
Aren't they (they all problematic, btw) covered by the fixes series https://lore.kernel.org/r/20230102203014.16041-1-andriy.shevchenko@linux.int...
They are indeed, but if you group AMD-related patches with Intel ones, it's only human for reviewers to skip the thread entirely, even more so when catching up with email on January 3 :-)
I'm not sure what should I do about that series. Shall I split AMD and Intel parts? (Assuming Intel will go as a series with cover letter.)
On Mon, 02 Jan 2023 22:30:33 +0200, Andy Shevchenko wrote:
Instead of calling put_device(&adev->dev) where adev is a pointer to an ACPI device, use specific call, i.e. acpi_dev_put().
Also move it out of the conditional to make it more visible in case some other code will be added which may use that pointer. We need to keep a reference as long as we use the pointer.
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/5] ASoC: Intel: bytcht_cx2072x: Replace open coded acpi_dev_put() commit: 7baff1a9debc5f4ff0d6bc1496358e251f66e396 [2/5] ASoC: Intel: bytcht_da7213: Replace open coded acpi_dev_put() commit: 4afda6de02285758c9b892a2e79658966d3cfbb0 [3/5] ASoC: Intel: cht_bsw_rt5645: Replace open coded acpi_dev_put() commit: 5360a1c0f251b8000e9b2ea7b9f9e40c2e8f1c83 [4/5] ASoC: Intel: cht_bsw_rt5672: Replace open coded acpi_dev_put() commit: 6736dd4e5b58f27983ab3dba5fa96ed97768beaf [5/5] ASoC: Intel: sof-wm8804: Replace open coded acpi_dev_put() commit: 892dbe0ecf658fd23e0a7255fca26a216cf54f96
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
participants (3)
-
Andy Shevchenko
-
Mark Brown
-
Pierre-Louis Bossart