All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sound: soc: intel: bxt_da7219_max98357a: Replace GFP_ATOMIC with GFP_KERNEL in broxton_audio_probe
@ 2018-04-09 10:46 ` Jia-Ju Bai
  0 siblings, 0 replies; 17+ messages in thread
From: Jia-Ju Bai @ 2018-04-09 10:46 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, sathyanarayana.nujella,
	Adam.Thomson.Opensource
  Cc: alsa-devel, linux-kernel, Jia-Ju Bai

broxton_audio_probe() is never called in atomic context.
This function is only set as ".probe" in "struct platform_driver".

Despite never getting called from atomic context,
broxton_audio_probe() calls devm_kzalloc() with GFP_ATOMIC,
which waits busily for allocation.
GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL,
to avoid busy waiting and improve the possibility of sucessful allocation.

This is found by a static analysis tool named DCNS written by myself.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
---
 sound/soc/intel/boards/bxt_da7219_max98357a.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/boards/bxt_da7219_max98357a.c b/sound/soc/intel/boards/bxt_da7219_max98357a.c
index ce35ec7..f4361b7 100644
--- a/sound/soc/intel/boards/bxt_da7219_max98357a.c
+++ b/sound/soc/intel/boards/bxt_da7219_max98357a.c
@@ -585,7 +585,7 @@ static int broxton_audio_probe(struct platform_device *pdev)
 {
 	struct bxt_card_private *ctx;
 
-	ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_ATOMIC);
+	ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
 	if (!ctx)
 		return -ENOMEM;
 
-- 
1.9.1

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

* [PATCH] sound: soc: intel: bxt_da7219_max98357a: Replace GFP_ATOMIC with GFP_KERNEL in broxton_audio_probe
@ 2018-04-09 10:46 ` Jia-Ju Bai
  0 siblings, 0 replies; 17+ messages in thread
From: Jia-Ju Bai @ 2018-04-09 10:46 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, sathyanarayana.nujella,
	Adam.Thomson.Opensource
  Cc: alsa-devel, Jia-Ju Bai, linux-kernel

broxton_audio_probe() is never called in atomic context.
This function is only set as ".probe" in "struct platform_driver".

Despite never getting called from atomic context,
broxton_audio_probe() calls devm_kzalloc() with GFP_ATOMIC,
which waits busily for allocation.
GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL,
to avoid busy waiting and improve the possibility of sucessful allocation.

This is found by a static analysis tool named DCNS written by myself.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
---
 sound/soc/intel/boards/bxt_da7219_max98357a.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/boards/bxt_da7219_max98357a.c b/sound/soc/intel/boards/bxt_da7219_max98357a.c
index ce35ec7..f4361b7 100644
--- a/sound/soc/intel/boards/bxt_da7219_max98357a.c
+++ b/sound/soc/intel/boards/bxt_da7219_max98357a.c
@@ -585,7 +585,7 @@ static int broxton_audio_probe(struct platform_device *pdev)
 {
 	struct bxt_card_private *ctx;
 
-	ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_ATOMIC);
+	ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
 	if (!ctx)
 		return -ENOMEM;
 
-- 
1.9.1

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

* Re: [alsa-devel] [PATCH] sound: soc: intel: bxt_da7219_max98357a: Replace GFP_ATOMIC with GFP_KERNEL in broxton_audio_probe
  2018-04-09 10:46 ` Jia-Ju Bai
  (?)
@ 2018-04-09 18:57 ` Pierre-Louis Bossart
  2018-04-09 19:39     ` Takashi Iwai
  -1 siblings, 1 reply; 17+ messages in thread
From: Pierre-Louis Bossart @ 2018-04-09 18:57 UTC (permalink / raw)
  To: Jia-Ju Bai, lgirdwood, broonie, perex, tiwai,
	sathyanarayana.nujella, Adam.Thomson.Opensource
  Cc: alsa-devel, linux-kernel, Vinod Koul

On 4/9/18 5:46 AM, Jia-Ju Bai wrote:
> broxton_audio_probe() is never called in atomic context.
> This function is only set as ".probe" in "struct platform_driver".
> 
> Despite never getting called from atomic context,
> broxton_audio_probe() calls devm_kzalloc() with GFP_ATOMIC,
> which waits busily for allocation.
> GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL,
> to avoid busy waiting and improve the possibility of sucessful allocation.

[answering for the series]
Humm, this is interesting.
If indeed we can afford to sleep then the change should be done on ALL 
14 boards in sound/soc/intel/boards which follow the same code pattern.
If we cannot sleep then then none of these changes should be applied.
Liam and Vinod?

> 
> This is found by a static analysis tool named DCNS written by myself.
> 
> Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
> ---
>   sound/soc/intel/boards/bxt_da7219_max98357a.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/intel/boards/bxt_da7219_max98357a.c b/sound/soc/intel/boards/bxt_da7219_max98357a.c
> index ce35ec7..f4361b7 100644
> --- a/sound/soc/intel/boards/bxt_da7219_max98357a.c
> +++ b/sound/soc/intel/boards/bxt_da7219_max98357a.c
> @@ -585,7 +585,7 @@ static int broxton_audio_probe(struct platform_device *pdev)
>   {
>   	struct bxt_card_private *ctx;
>   
> -	ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_ATOMIC);
> +	ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
>   	if (!ctx)
>   		return -ENOMEM;
>   
> 

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

* Re: [alsa-devel] [PATCH] sound: soc: intel: bxt_da7219_max98357a: Replace GFP_ATOMIC with GFP_KERNEL in broxton_audio_probe
  2018-04-09 18:57 ` [alsa-devel] " Pierre-Louis Bossart
@ 2018-04-09 19:39     ` Takashi Iwai
  0 siblings, 0 replies; 17+ messages in thread
From: Takashi Iwai @ 2018-04-09 19:39 UTC (permalink / raw)
  To: Pierre-Louis Bossart
  Cc: Adam.Thomson.Opensource, Jia-Ju Bai, lgirdwood,
	sathyanarayana.nujella, broonie, perex, alsa-devel, Vinod Koul,
	linux-kernel

On Mon, 09 Apr 2018 20:57:43 +0200,
Pierre-Louis Bossart wrote:
> 
> On 4/9/18 5:46 AM, Jia-Ju Bai wrote:
> > broxton_audio_probe() is never called in atomic context.
> > This function is only set as ".probe" in "struct platform_driver".
> >
> > Despite never getting called from atomic context,
> > broxton_audio_probe() calls devm_kzalloc() with GFP_ATOMIC,
> > which waits busily for allocation.
> > GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL,
> > to avoid busy waiting and improve the possibility of sucessful allocation.
> 
> [answering for the series]
> Humm, this is interesting.
> If indeed we can afford to sleep then the change should be done on ALL
> 14 boards in sound/soc/intel/boards which follow the same code
> pattern.
> If we cannot sleep then then none of these changes should be applied.
> Liam and Vinod?

It must be sleepable context as it's a standard platform driver probe
callback.

And now looking at grep output, only sound/soc/intel contains so many
calls with GFP_ATOMIC.  I bet that almost all can be done with
GFP_KERNEL, maybe only one or two in atom/sst would be conditionally
with GFP_ATOMIC.


thanks,

Takashi

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

* Re: [alsa-devel] [PATCH] sound: soc: intel: bxt_da7219_max98357a: Replace GFP_ATOMIC with GFP_KERNEL in broxton_audio_probe
@ 2018-04-09 19:39     ` Takashi Iwai
  0 siblings, 0 replies; 17+ messages in thread
From: Takashi Iwai @ 2018-04-09 19:39 UTC (permalink / raw)
  To: Pierre-Louis Bossart
  Cc: Adam.Thomson.Opensource, Jia-Ju Bai, lgirdwood,
	sathyanarayana.nujella, broonie, perex, alsa-devel, Vinod Koul,
	linux-kernel

On Mon, 09 Apr 2018 20:57:43 +0200,
Pierre-Louis Bossart wrote:
> 
> On 4/9/18 5:46 AM, Jia-Ju Bai wrote:
> > broxton_audio_probe() is never called in atomic context.
> > This function is only set as ".probe" in "struct platform_driver".
> >
> > Despite never getting called from atomic context,
> > broxton_audio_probe() calls devm_kzalloc() with GFP_ATOMIC,
> > which waits busily for allocation.
> > GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL,
> > to avoid busy waiting and improve the possibility of sucessful allocation.
> 
> [answering for the series]
> Humm, this is interesting.
> If indeed we can afford to sleep then the change should be done on ALL
> 14 boards in sound/soc/intel/boards which follow the same code
> pattern.
> If we cannot sleep then then none of these changes should be applied.
> Liam and Vinod?

It must be sleepable context as it's a standard platform driver probe
callback.

And now looking at grep output, only sound/soc/intel contains so many
calls with GFP_ATOMIC.  I bet that almost all can be done with
GFP_KERNEL, maybe only one or two in atom/sst would be conditionally
with GFP_ATOMIC.


thanks,

Takashi

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

* Re: [alsa-devel] [PATCH] sound: soc: intel: bxt_da7219_max98357a: Replace GFP_ATOMIC with GFP_KERNEL in broxton_audio_probe
  2018-04-09 19:39     ` Takashi Iwai
@ 2018-04-10 14:02       ` Mark Brown
  -1 siblings, 0 replies; 17+ messages in thread
From: Mark Brown @ 2018-04-10 14:02 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Pierre-Louis Bossart, Adam.Thomson.Opensource, Jia-Ju Bai,
	lgirdwood, sathyanarayana.nujella, perex, alsa-devel, Vinod Koul,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 463 bytes --]

On Mon, Apr 09, 2018 at 09:39:06PM +0200, Takashi Iwai wrote:

> It must be sleepable context as it's a standard platform driver probe
> callback.

> And now looking at grep output, only sound/soc/intel contains so many
> calls with GFP_ATOMIC.  I bet that almost all can be done with
> GFP_KERNEL, maybe only one or two in atom/sst would be conditionally
> with GFP_ATOMIC.

Yeah, it's not like it'd be the first code quality problem found in the
Intel drivers.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] sound: soc: intel: bxt_da7219_max98357a: Replace GFP_ATOMIC with GFP_KERNEL in broxton_audio_probe
@ 2018-04-10 14:02       ` Mark Brown
  0 siblings, 0 replies; 17+ messages in thread
From: Mark Brown @ 2018-04-10 14:02 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: alsa-devel, lgirdwood, Vinod Koul, linux-kernel,
	Pierre-Louis Bossart, Jia-Ju Bai, sathyanarayana.nujella,
	Adam.Thomson.Opensource


[-- Attachment #1.1: Type: text/plain, Size: 463 bytes --]

On Mon, Apr 09, 2018 at 09:39:06PM +0200, Takashi Iwai wrote:

> It must be sleepable context as it's a standard platform driver probe
> callback.

> And now looking at grep output, only sound/soc/intel contains so many
> calls with GFP_ATOMIC.  I bet that almost all can be done with
> GFP_KERNEL, maybe only one or two in atom/sst would be conditionally
> with GFP_ATOMIC.

Yeah, it's not like it'd be the first code quality problem found in the
Intel drivers.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [alsa-devel] [PATCH] sound: soc: intel: bxt_da7219_max98357a: Replace GFP_ATOMIC with GFP_KERNEL in broxton_audio_probe
  2018-04-09 19:39     ` Takashi Iwai
  (?)
  (?)
@ 2018-04-10 14:17     ` Vinod Koul
  -1 siblings, 0 replies; 17+ messages in thread
From: Vinod Koul @ 2018-04-10 14:17 UTC (permalink / raw)
  To: Takashi Iwai
  Cc: Pierre-Louis Bossart, Adam.Thomson.Opensource, Jia-Ju Bai,
	lgirdwood, sathyanarayana.nujella, broonie, perex, alsa-devel,
	linux-kernel

On Mon, Apr 09, 2018 at 09:39:06PM +0200, Takashi Iwai wrote:
> On Mon, 09 Apr 2018 20:57:43 +0200,
> Pierre-Louis Bossart wrote:
> > 
> > On 4/9/18 5:46 AM, Jia-Ju Bai wrote:
> > > broxton_audio_probe() is never called in atomic context.
> > > This function is only set as ".probe" in "struct platform_driver".
> > >
> > > Despite never getting called from atomic context,
> > > broxton_audio_probe() calls devm_kzalloc() with GFP_ATOMIC,
> > > which waits busily for allocation.
> > > GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL,
> > > to avoid busy waiting and improve the possibility of sucessful allocation.
> > 
> > [answering for the series]
> > Humm, this is interesting.
> > If indeed we can afford to sleep then the change should be done on ALL
> > 14 boards in sound/soc/intel/boards which follow the same code
> > pattern.
> > If we cannot sleep then then none of these changes should be applied.
> > Liam and Vinod?
> 
> It must be sleepable context as it's a standard platform driver probe
> callback.
> 
> And now looking at grep output, only sound/soc/intel contains so many
> calls with GFP_ATOMIC.  I bet that almost all can be done with
> GFP_KERNEL, maybe only one or two in atom/sst would be conditionally
> with GFP_ATOMIC.

Yeah I don't see many cases which would warrant atomic context, I will review
them and fix these after merge window closes. Clearly machines have no
reason for that, and I guess most are copy-paste from 1st culprit

-- 
~Vinod

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

* Re: [PATCH] sound: soc: intel: bxt_da7219_max98357a: Replace GFP_ATOMIC with GFP_KERNEL in broxton_audio_probe
  2018-04-09 10:46 ` Jia-Ju Bai
@ 2018-04-13 10:41   ` Mark Brown
  -1 siblings, 0 replies; 17+ messages in thread
From: Mark Brown @ 2018-04-13 10:41 UTC (permalink / raw)
  To: Jia-Ju Bai
  Cc: lgirdwood, perex, tiwai, sathyanarayana.nujella,
	Adam.Thomson.Opensource, alsa-devel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 474 bytes --]

On Mon, Apr 09, 2018 at 06:46:21PM +0800, Jia-Ju Bai wrote:
> broxton_audio_probe() is never called in atomic context.
> This function is only set as ".probe" in "struct platform_driver".

Please submit patches using subject lines reflecting the style for the
subsystem.  This makes it easier for people to identify relevant
patches.  Look at what existing commits in the area you're changing are
doing and make sure your subject lines visually resemble what they're
doing.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] sound: soc: intel: bxt_da7219_max98357a: Replace GFP_ATOMIC with GFP_KERNEL in broxton_audio_probe
@ 2018-04-13 10:41   ` Mark Brown
  0 siblings, 0 replies; 17+ messages in thread
From: Mark Brown @ 2018-04-13 10:41 UTC (permalink / raw)
  To: Jia-Ju Bai
  Cc: alsa-devel, linux-kernel, tiwai, lgirdwood,
	sathyanarayana.nujella, Adam.Thomson.Opensource


[-- Attachment #1.1: Type: text/plain, Size: 474 bytes --]

On Mon, Apr 09, 2018 at 06:46:21PM +0800, Jia-Ju Bai wrote:
> broxton_audio_probe() is never called in atomic context.
> This function is only set as ".probe" in "struct platform_driver".

Please submit patches using subject lines reflecting the style for the
subsystem.  This makes it easier for people to identify relevant
patches.  Look at what existing commits in the area you're changing are
doing and make sure your subject lines visually resemble what they're
doing.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH] sound: soc: intel: bxt_da7219_max98357a: Replace GFP_ATOMIC with GFP_KERNEL in broxton_audio_probe
  2018-04-13 10:41   ` Mark Brown
@ 2018-04-13 10:54     ` Jia-Ju Bai
  -1 siblings, 0 replies; 17+ messages in thread
From: Jia-Ju Bai @ 2018-04-13 10:54 UTC (permalink / raw)
  To: Mark Brown
  Cc: lgirdwood, perex, tiwai, sathyanarayana.nujella,
	Adam.Thomson.Opensource, alsa-devel, linux-kernel



On 2018/4/13 18:41, Mark Brown wrote:
> On Mon, Apr 09, 2018 at 06:46:21PM +0800, Jia-Ju Bai wrote:
>> broxton_audio_probe() is never called in atomic context.
>> This function is only set as ".probe" in "struct platform_driver".
> Please submit patches using subject lines reflecting the style for the
> subsystem.  This makes it easier for people to identify relevant
> patches.  Look at what existing commits in the area you're changing are
> doing and make sure your subject lines visually resemble what they're
> doing.

Oh, sorry for my improper subjects.
Thanks for your very helpful advice :)
I looked at previous related patches, and find the subject should be 
"ASoC: Intel: ...."
I will follow it in my future patches.

Do I need to send V2 patches?


Best wishes,
Jia-Ju Bai

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

* Re: [PATCH] sound: soc: intel: bxt_da7219_max98357a: Replace GFP_ATOMIC with GFP_KERNEL in broxton_audio_probe
@ 2018-04-13 10:54     ` Jia-Ju Bai
  0 siblings, 0 replies; 17+ messages in thread
From: Jia-Ju Bai @ 2018-04-13 10:54 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, linux-kernel, tiwai, lgirdwood,
	sathyanarayana.nujella, Adam.Thomson.Opensource



On 2018/4/13 18:41, Mark Brown wrote:
> On Mon, Apr 09, 2018 at 06:46:21PM +0800, Jia-Ju Bai wrote:
>> broxton_audio_probe() is never called in atomic context.
>> This function is only set as ".probe" in "struct platform_driver".
> Please submit patches using subject lines reflecting the style for the
> subsystem.  This makes it easier for people to identify relevant
> patches.  Look at what existing commits in the area you're changing are
> doing and make sure your subject lines visually resemble what they're
> doing.

Oh, sorry for my improper subjects.
Thanks for your very helpful advice :)
I looked at previous related patches, and find the subject should be 
"ASoC: Intel: ...."
I will follow it in my future patches.

Do I need to send V2 patches?


Best wishes,
Jia-Ju Bai

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

* Re: [PATCH] sound: soc: intel: bxt_da7219_max98357a: Replace GFP_ATOMIC with GFP_KERNEL in broxton_audio_probe
  2018-04-13 10:54     ` Jia-Ju Bai
  (?)
@ 2018-04-13 10:55     ` Mark Brown
  -1 siblings, 0 replies; 17+ messages in thread
From: Mark Brown @ 2018-04-13 10:55 UTC (permalink / raw)
  To: Jia-Ju Bai
  Cc: lgirdwood, perex, tiwai, sathyanarayana.nujella,
	Adam.Thomson.Opensource, alsa-devel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 303 bytes --]

On Fri, Apr 13, 2018 at 06:54:15PM +0800, Jia-Ju Bai wrote:

> I looked at previous related patches, and find the subject should be "ASoC:
> Intel: ...."
> I will follow it in my future patches.

Right, that's it for these thanks.

> Do I need to send V2 patches?

No, it's OK - I already applied them.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Applied "ASoC: intel: bxt_da7219_max98357a: Replace GFP_ATOMIC with GFP_KERNEL in broxton_audio_probe" to the asoc tree
  2018-04-09 10:46 ` Jia-Ju Bai
@ 2018-04-13 10:56   ` Mark Brown
  -1 siblings, 0 replies; 17+ messages in thread
From: Mark Brown @ 2018-04-13 10:56 UTC (permalink / raw)
  To: Jia-Ju Bai
  Cc: Mark Brown, lgirdwood, broonie, perex, tiwai,
	sathyanarayana.nujella, Adam.Thomson.Opensource, alsa-devel,
	linux-kernel, alsa-devel

The patch

   ASoC: intel: bxt_da7219_max98357a: Replace GFP_ATOMIC with GFP_KERNEL in broxton_audio_probe

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

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

>From 8f2f9215aa14904ddd9775f3b4e7af2d94189dea Mon Sep 17 00:00:00 2001
From: Jia-Ju Bai <baijiaju1990@gmail.com>
Date: Mon, 9 Apr 2018 18:46:21 +0800
Subject: [PATCH] ASoC: intel: bxt_da7219_max98357a: Replace GFP_ATOMIC with
 GFP_KERNEL in broxton_audio_probe

broxton_audio_probe() is never called in atomic context.
This function is only set as ".probe" in "struct platform_driver".

Despite never getting called from atomic context,
broxton_audio_probe() calls devm_kzalloc() with GFP_ATOMIC,
which waits busily for allocation.
GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL,
to avoid busy waiting and improve the possibility of sucessful allocation.

This is found by a static analysis tool named DCNS written by myself.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/intel/boards/bxt_da7219_max98357a.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/boards/bxt_da7219_max98357a.c b/sound/soc/intel/boards/bxt_da7219_max98357a.c
index 668c0934e942..40eb979d5ac1 100644
--- a/sound/soc/intel/boards/bxt_da7219_max98357a.c
+++ b/sound/soc/intel/boards/bxt_da7219_max98357a.c
@@ -571,7 +571,7 @@ static int broxton_audio_probe(struct platform_device *pdev)
 {
 	struct bxt_card_private *ctx;
 
-	ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_ATOMIC);
+	ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
 	if (!ctx)
 		return -ENOMEM;
 
-- 
2.17.0

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

* Applied "ASoC: intel: bxt_da7219_max98357a: Replace GFP_ATOMIC with GFP_KERNEL in broxton_audio_probe" to the asoc tree
@ 2018-04-13 10:56   ` Mark Brown
  0 siblings, 0 replies; 17+ messages in thread
From: Mark Brown @ 2018-04-13 10:56 UTC (permalink / raw)
  To: Jia-Ju Bai; +Cc: Mark Brown, lgirdwood

The patch

   ASoC: intel: bxt_da7219_max98357a: Replace GFP_ATOMIC with GFP_KERNEL in broxton_audio_probe

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

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

>From 8f2f9215aa14904ddd9775f3b4e7af2d94189dea Mon Sep 17 00:00:00 2001
From: Jia-Ju Bai <baijiaju1990@gmail.com>
Date: Mon, 9 Apr 2018 18:46:21 +0800
Subject: [PATCH] ASoC: intel: bxt_da7219_max98357a: Replace GFP_ATOMIC with
 GFP_KERNEL in broxton_audio_probe

broxton_audio_probe() is never called in atomic context.
This function is only set as ".probe" in "struct platform_driver".

Despite never getting called from atomic context,
broxton_audio_probe() calls devm_kzalloc() with GFP_ATOMIC,
which waits busily for allocation.
GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL,
to avoid busy waiting and improve the possibility of sucessful allocation.

This is found by a static analysis tool named DCNS written by myself.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/intel/boards/bxt_da7219_max98357a.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/boards/bxt_da7219_max98357a.c b/sound/soc/intel/boards/bxt_da7219_max98357a.c
index 668c0934e942..40eb979d5ac1 100644
--- a/sound/soc/intel/boards/bxt_da7219_max98357a.c
+++ b/sound/soc/intel/boards/bxt_da7219_max98357a.c
@@ -571,7 +571,7 @@ static int broxton_audio_probe(struct platform_device *pdev)
 {
 	struct bxt_card_private *ctx;
 
-	ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_ATOMIC);
+	ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
 	if (!ctx)
 		return -ENOMEM;
 
-- 
2.17.0

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

* Applied "ASoC: intel: bxt_da7219_max98357a: Replace GFP_ATOMIC with GFP_KERNEL in broxton_audio_probe" to the asoc tree
  2018-04-09 10:46 ` Jia-Ju Bai
@ 2018-04-13 11:24   ` Mark Brown
  -1 siblings, 0 replies; 17+ messages in thread
From: Mark Brown @ 2018-04-13 11:24 UTC (permalink / raw)
  To: Jia-Ju Bai
  Cc: Mark Brown, lgirdwood, broonie, perex, tiwai,
	sathyanarayana.nujella, Adam.Thomson.Opensource, alsa-devel,
	linux-kernel, alsa-devel

The patch

   ASoC: intel: bxt_da7219_max98357a: Replace GFP_ATOMIC with GFP_KERNEL in broxton_audio_probe

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

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

>From 8f2f9215aa14904ddd9775f3b4e7af2d94189dea Mon Sep 17 00:00:00 2001
From: Jia-Ju Bai <baijiaju1990@gmail.com>
Date: Mon, 9 Apr 2018 18:46:21 +0800
Subject: [PATCH] ASoC: intel: bxt_da7219_max98357a: Replace GFP_ATOMIC with
 GFP_KERNEL in broxton_audio_probe

broxton_audio_probe() is never called in atomic context.
This function is only set as ".probe" in "struct platform_driver".

Despite never getting called from atomic context,
broxton_audio_probe() calls devm_kzalloc() with GFP_ATOMIC,
which waits busily for allocation.
GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL,
to avoid busy waiting and improve the possibility of sucessful allocation.

This is found by a static analysis tool named DCNS written by myself.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/intel/boards/bxt_da7219_max98357a.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/boards/bxt_da7219_max98357a.c b/sound/soc/intel/boards/bxt_da7219_max98357a.c
index 668c0934e942..40eb979d5ac1 100644
--- a/sound/soc/intel/boards/bxt_da7219_max98357a.c
+++ b/sound/soc/intel/boards/bxt_da7219_max98357a.c
@@ -571,7 +571,7 @@ static int broxton_audio_probe(struct platform_device *pdev)
 {
 	struct bxt_card_private *ctx;
 
-	ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_ATOMIC);
+	ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
 	if (!ctx)
 		return -ENOMEM;
 
-- 
2.17.0

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

* Applied "ASoC: intel: bxt_da7219_max98357a: Replace GFP_ATOMIC with GFP_KERNEL in broxton_audio_probe" to the asoc tree
@ 2018-04-13 11:24   ` Mark Brown
  0 siblings, 0 replies; 17+ messages in thread
From: Mark Brown @ 2018-04-13 11:24 UTC (permalink / raw)
  To: Jia-Ju Bai; +Cc: Mark Brown, lgirdwood

The patch

   ASoC: intel: bxt_da7219_max98357a: Replace GFP_ATOMIC with GFP_KERNEL in broxton_audio_probe

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

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

>From 8f2f9215aa14904ddd9775f3b4e7af2d94189dea Mon Sep 17 00:00:00 2001
From: Jia-Ju Bai <baijiaju1990@gmail.com>
Date: Mon, 9 Apr 2018 18:46:21 +0800
Subject: [PATCH] ASoC: intel: bxt_da7219_max98357a: Replace GFP_ATOMIC with
 GFP_KERNEL in broxton_audio_probe

broxton_audio_probe() is never called in atomic context.
This function is only set as ".probe" in "struct platform_driver".

Despite never getting called from atomic context,
broxton_audio_probe() calls devm_kzalloc() with GFP_ATOMIC,
which waits busily for allocation.
GFP_ATOMIC is not necessary and can be replaced with GFP_KERNEL,
to avoid busy waiting and improve the possibility of sucessful allocation.

This is found by a static analysis tool named DCNS written by myself.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/intel/boards/bxt_da7219_max98357a.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/boards/bxt_da7219_max98357a.c b/sound/soc/intel/boards/bxt_da7219_max98357a.c
index 668c0934e942..40eb979d5ac1 100644
--- a/sound/soc/intel/boards/bxt_da7219_max98357a.c
+++ b/sound/soc/intel/boards/bxt_da7219_max98357a.c
@@ -571,7 +571,7 @@ static int broxton_audio_probe(struct platform_device *pdev)
 {
 	struct bxt_card_private *ctx;
 
-	ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_ATOMIC);
+	ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
 	if (!ctx)
 		return -ENOMEM;
 
-- 
2.17.0

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

end of thread, other threads:[~2018-04-13 11:24 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-09 10:46 [PATCH] sound: soc: intel: bxt_da7219_max98357a: Replace GFP_ATOMIC with GFP_KERNEL in broxton_audio_probe Jia-Ju Bai
2018-04-09 10:46 ` Jia-Ju Bai
2018-04-09 18:57 ` [alsa-devel] " Pierre-Louis Bossart
2018-04-09 19:39   ` Takashi Iwai
2018-04-09 19:39     ` Takashi Iwai
2018-04-10 14:02     ` Mark Brown
2018-04-10 14:02       ` Mark Brown
2018-04-10 14:17     ` [alsa-devel] " Vinod Koul
2018-04-13 10:41 ` Mark Brown
2018-04-13 10:41   ` Mark Brown
2018-04-13 10:54   ` Jia-Ju Bai
2018-04-13 10:54     ` Jia-Ju Bai
2018-04-13 10:55     ` Mark Brown
2018-04-13 10:56 ` Applied "ASoC: intel: bxt_da7219_max98357a: Replace GFP_ATOMIC with GFP_KERNEL in broxton_audio_probe" to the asoc tree Mark Brown
2018-04-13 10:56   ` Mark Brown
2018-04-13 11:24 ` Mark Brown
2018-04-13 11:24   ` Mark Brown

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.