From: Dan Carpenter <error27@gmail.com>
To: kernel-janitors@vger.kernel.org
Subject: [patch 1/2] Staging: crystalhd: change GFP_ATOMIC to GFP_KERNEL
Date: Mon, 14 Mar 2011 09:33:37 +0000 [thread overview]
Message-ID: <20110314093125.GL2008@bicker> (raw)
These two allocations are only called from the probe() path and there
aren't any locks held for probe().
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
These apply on top of Alexander Beregalov's patches.
diff --git a/drivers/staging/crystalhd/crystalhd_lnx.c b/drivers/staging/crystalhd/crystalhd_lnx.c
index 2b47ef9..4197111 100644
--- a/drivers/staging/crystalhd/crystalhd_lnx.c
+++ b/drivers/staging/crystalhd/crystalhd_lnx.c
@@ -393,8 +393,7 @@ static int __devinit chd_dec_init_chdev(struct crystalhd_adp *adp)
/* Allocate general purpose ioctl pool. */
for (i = 0; i < CHD_IODATA_POOL_SZ; i++) {
- /* FIXME: jarod: why atomic? */
- temp = kzalloc(sizeof(struct crystalhd_ioctl_data), GFP_ATOMIC);
+ temp = kzalloc(sizeof(struct crystalhd_ioctl_data), GFP_KERNEL);
if (!temp) {
BCMLOG_ERR("ioctl data pool kzalloc failed\n");
rc = -ENOMEM;
@@ -549,8 +548,7 @@ static int __devinit chd_dec_pci_probe(struct pci_dev *pdev,
pdev->vendor, pdev->device, pdev->subsystem_vendor,
pdev->subsystem_device);
- /* FIXME: jarod: why atomic? */
- pinfo = kzalloc(sizeof(struct crystalhd_adp), GFP_ATOMIC);
+ pinfo = kzalloc(sizeof(struct crystalhd_adp), GFP_KERNEL);
if (!pinfo) {
BCMLOG_ERR("Failed to allocate memory\n");
return -ENOMEM;
next reply other threads:[~2011-03-14 9:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-14 9:33 Dan Carpenter [this message]
2011-03-14 20:04 ` [patch 1/2] Staging: crystalhd: change GFP_ATOMIC to GFP_KERNEL Jarod Wilson
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=20110314093125.GL2008@bicker \
--to=error27@gmail.com \
--cc=kernel-janitors@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.