ASoC: Intel: remove GFP_ATOMIC, use GFP_KERNEL
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Thu, 1 Nov 2018 21:34:52 +0000 (16:34 -0500)
committerMark Brown <broonie@kernel.org>
Tue, 6 Nov 2018 17:24:36 +0000 (17:24 +0000)
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 <andriy.shevchenko@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/atom/sst/sst_pvt.c
sound/soc/intel/boards/cht_bsw_rt5672.c
sound/soc/intel/boards/glk_rt5682_max98357a.c
sound/soc/intel/boards/kbl_da7219_max98927.c
sound/soc/intel/boards/skl_hda_dsp_generic.c

index af93244b48686f48ac08f8f8e55269911545b8ed..00a37a09dc9b0fa46166c309655eb004cf896fff 100644 (file)
@@ -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;
index 51f0d45d6f8f9d7d4d0b5abdb9239fda3fb00071..9de64f447e7bed94cbbaf0d788f5bcbcc0c76743 100644 (file)
@@ -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;
 
index c4b94e2617c59b00a606f69baf8c5a2471c93d90..c74c4f17316fe898ff29e16a2be4982499d7f612 100644 (file)
@@ -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;
 
index 3bc78e3a91ee5fb1f84b6c7d9cd1b1ad244b3197..58eb0fe69978bda9b465992f54bcfe46afde5e6b 100644 (file)
@@ -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;
 
index b6f287fa950533600def972a726b23d4f7c505fa..15c502d6774d08d255f65667df322aa4bfbc149e 100644 (file)
@@ -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;