From: Julia Lawall <julia.lawall-L2FTfq7BK8M@public.gmane.org>
Cc: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
mark.rutland-5wv7dgnIgG8@public.gmane.org,
bradleyb-r5pk2Da7Bxt8sGd51Jp2sdBPR1lH4CV8@public.gmane.org,
cbostic-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org,
joel-U3u1mxZcP9KHXe+LvDLADg@public.gmane.org,
eajames-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org,
"Edward A. James"
<eajames-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>,
kbuild-all-JC7UmRfGjtg@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.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-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Julia Lawall <julia.lawall-L2FTfq7BK8M@public.gmane.org>
Signed-off-by: Fengguang Wu <fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
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);
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
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-l2ftfq7bk8m@public.gmane.org \
--cc=bradleyb-r5pk2Da7Bxt8sGd51Jp2sdBPR1lH4CV8@public.gmane.org \
--cc=cbostic-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=eajames-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
--cc=eajames-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=joel-U3u1mxZcP9KHXe+LvDLADg@public.gmane.org \
--cc=kbuild-all-JC7UmRfGjtg@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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