From: Julia Lawall <julia.lawall@lip6.fr>
To: Eddie James <eajames@linux.vnet.ibm.com>
Cc: gregkh@linuxfoundation.org, devicetree@vger.kernel.org,
robh+dt@kernel.org, mark.rutland@arm.com,
bradleyb@fuzziesquirrel.com, cbostic@linux.vnet.ibm.com,
joel@jms.id.au, eajames@linux.vnet.ibm.com,
"Edward A. James" <eajames@us.ibm.com>,
kbuild-all@01.org, linux-kernel@vger.kernel.org
Subject: [PATCH] drivers/fsi: sbefifo: fix call_kern.cocci warnings
Date: Tue, 21 Nov 2017 07:12:11 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.20.1711210708090.1920@hadrien> (raw)
Function sbefifo_enq_xfr called inside lock from sbefifo_write_common but
uses GFP_KERNEL. Change to GFP_ATOMIC.
Generated by: scripts/coccinelle/locks/call_kern.cocci
Fixes: 0f8664fbfc9f ("drivers/fsi: sbefifo: Add miscdevice")
CC: Edward A. James <eajames@us.ibm.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
Semantic patch information:
The proposed change of converting the GFP_KERNEL is not necessarily the
correct one. It may be desired to unlock the lock, or to not call the
function under the lock in the first place.
fsi-sbefifo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/fsi/fsi-sbefifo.c
+++ b/drivers/fsi/fsi-sbefifo.c
@@ -266,7 +266,7 @@ static struct sbefifo_xfr *sbefifo_enq_x
if (READ_ONCE(sbefifo->rc))
return ERR_PTR(sbefifo->rc);
- xfr = kzalloc(sizeof(*xfr), GFP_KERNEL);
+ xfr = kzalloc(sizeof(*xfr), GFP_ATOMIC);
if (!xfr)
return ERR_PTR(-ENOMEM);
reply other threads:[~2017-11-21 6:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=alpine.DEB.2.20.1711210708090.1920@hadrien \
--to=julia.lawall@lip6.fr \
--cc=bradleyb@fuzziesquirrel.com \
--cc=cbostic@linux.vnet.ibm.com \
--cc=devicetree@vger.kernel.org \
--cc=eajames@linux.vnet.ibm.com \
--cc=eajames@us.ibm.com \
--cc=gregkh@linuxfoundation.org \
--cc=joel@jms.id.au \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®