All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <Julia.Lawall@inria.fr>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: kernel-janitors@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 4/9] crypto: use GFP_KERNEL
Date: Thu, 10 Feb 2022 21:42:18 +0100	[thread overview]
Message-ID: <20220210204223.104181-5-Julia.Lawall@inria.fr> (raw)
In-Reply-To: <20220210204223.104181-1-Julia.Lawall@inria.fr>

Platform_driver probe functions aren't called with locks held
and thus don't need GFP_ATOMIC. Use GFP_KERNEL instead.

Problem found with Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/crypto/ux500/cryp/cryp_core.c |    2 +-
 drivers/crypto/ux500/hash/hash_core.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/ux500/cryp/cryp_core.c b/drivers/crypto/ux500/cryp/cryp_core.c
index 97277b7150cb..5a57c9afd8c8 100644
--- a/drivers/crypto/ux500/cryp/cryp_core.c
+++ b/drivers/crypto/ux500/cryp/cryp_core.c
@@ -1264,7 +1264,7 @@ static int ux500_cryp_probe(struct platform_device *pdev)
 	struct device *dev = &pdev->dev;
 
 	dev_dbg(dev, "[%s]", __func__);
-	device_data = devm_kzalloc(dev, sizeof(*device_data), GFP_ATOMIC);
+	device_data = devm_kzalloc(dev, sizeof(*device_data), GFP_KERNEL);
 	if (!device_data) {
 		ret = -ENOMEM;
 		goto out;
diff --git a/drivers/crypto/ux500/hash/hash_core.c b/drivers/crypto/ux500/hash/hash_core.c
index 51a6e1a42434..5157c118d642 100644
--- a/drivers/crypto/ux500/hash/hash_core.c
+++ b/drivers/crypto/ux500/hash/hash_core.c
@@ -1658,7 +1658,7 @@ static int ux500_hash_probe(struct platform_device *pdev)
 	struct hash_device_data *device_data;
 	struct device		*dev = &pdev->dev;
 
-	device_data = devm_kzalloc(dev, sizeof(*device_data), GFP_ATOMIC);
+	device_data = devm_kzalloc(dev, sizeof(*device_data), GFP_KERNEL);
 	if (!device_data) {
 		ret = -ENOMEM;
 		goto out;


  parent reply	other threads:[~2022-02-10 20:43 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-10 20:42 [PATCH 0/9] use GFP_KERNEL Julia Lawall
2022-02-10 20:42 ` Julia Lawall
2022-02-10 20:42 ` Julia Lawall
2022-02-10 20:42 ` [PATCH 1/9] net: moxa: " Julia Lawall
2022-02-10 20:42 ` [PATCH 2/9] media: cx18: " Julia Lawall
2022-02-18 12:26   ` Dan Carpenter
2022-02-10 20:42 ` [PATCH 3/9] ASoC: Intel: bytcr_wm5102: " Julia Lawall
2022-02-10 20:42   ` Julia Lawall
2022-02-11  0:20   ` Pierre-Louis Bossart
2022-02-11  0:20     ` Pierre-Louis Bossart
2022-02-11  7:43     ` Hans de Goede
2022-02-11  7:43       ` Hans de Goede
2022-02-10 20:42 ` Julia Lawall [this message]
2022-02-18  5:37   ` [PATCH 4/9] crypto: " Herbert Xu
2022-02-10 20:42 ` [PATCH 5/9] pata_mpc52xx: " Julia Lawall
2022-02-10 20:45   ` Sergey Shtylyov
2022-02-11  7:43   ` Damien Le Moal
2022-02-10 20:42 ` [PATCH 6/9] media: fsl-viu: " Julia Lawall
2022-02-10 20:42 ` [PATCH 7/9] mtd: spear_smi: " Julia Lawall
2022-02-10 20:42   ` Julia Lawall
2022-02-18 14:32   ` Miquel Raynal
2022-02-18 14:32     ` Miquel Raynal
2022-02-10 20:42 ` [PATCH 8/9] [SCSI] mptfusion: " Julia Lawall
2022-02-11 22:10   ` Martin K. Petersen
2022-02-10 20:42 ` [PATCH 9/9] mfd: sta2x11: " Julia Lawall
2022-02-15 13:22   ` Lee Jones
2022-02-12  0:20 ` [PATCH 0/9] " patchwork-bot+netdevbpf
2022-02-12  0:20   ` patchwork-bot+netdevbpf
2022-02-14 12:54 ` (subset) " Mark Brown
2022-02-14 12:54   ` Mark Brown
2022-02-14 12:54   ` Mark Brown
2022-02-15  3:19 ` Martin K. Petersen
2022-02-15  3:19   ` Martin K. Petersen
2022-02-15  3:19   ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220210204223.104181-5-Julia.Lawall@inria.fr \
    --to=julia.lawall@inria.fr \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.