Skip to content

Commit

Permalink
ASoC: Intel: remove GFP_ATOMIC, use GFP_KERNEL
Browse files Browse the repository at this point in the history
GFP_ATOMIC is not required on any Intel drivers, use GFP_KERNEL
instead. A first cleanup was merged in April but missed a number
occurrences and new ones were added by copy/paste inertia.

While we are at it, make checkpatch happy with a sizeof(*msg)

Reviewed-by: Andy Shevchenko <[email protected]>
Signed-off-by: Pierre-Louis Bossart <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
plbossart authored and broonie committed Nov 6, 2018
1 parent 48bf41a commit 972b0d4
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions sound/soc/intel/atom/sst/sst_pvt.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,11 @@ int sst_create_ipc_msg(struct ipc_post **arg, bool large)
{
struct ipc_post *msg;

msg = kzalloc(sizeof(struct ipc_post), GFP_ATOMIC);
msg = kzalloc(sizeof(*msg), GFP_KERNEL);
if (!msg)
return -ENOMEM;
if (large) {
msg->mailbox_data = kzalloc(SST_MAILBOX_SIZE, GFP_ATOMIC);
msg->mailbox_data = kzalloc(SST_MAILBOX_SIZE, GFP_KERNEL);
if (!msg->mailbox_data) {
kfree(msg);
return -ENOMEM;
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/boards/cht_bsw_rt5672.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
const char *i2c_name;
int i;

drv = devm_kzalloc(&pdev->dev, sizeof(*drv), GFP_ATOMIC);
drv = devm_kzalloc(&pdev->dev, sizeof(*drv), GFP_KERNEL);
if (!drv)
return -ENOMEM;

Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/boards/glk_rt5682_max98357a.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ static int geminilake_audio_probe(struct platform_device *pdev)
{
struct glk_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;

Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/boards/kbl_da7219_max98927.c
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ static int kabylake_audio_probe(struct platform_device *pdev)
{
struct kbl_codec_private *ctx;

ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_ATOMIC);
ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
if (!ctx)
return -ENOMEM;

Expand Down
2 changes: 1 addition & 1 deletion sound/soc/intel/boards/skl_hda_dsp_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ static int skl_hda_audio_probe(struct platform_device *pdev)

dev_dbg(&pdev->dev, "%s: entry\n", __func__);

ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_ATOMIC);
ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
if (!ctx)
return -ENOMEM;

Expand Down

0 comments on commit 972b0d4

Please sign in to comment.