* [PATCH] drivers/fsi: sbefifo: fix call_kern.cocci warnings
@ 2017-11-21 6:12 Julia Lawall
0 siblings, 0 replies; only message in thread
From: Julia Lawall @ 2017-11-21 6:12 UTC (permalink / raw)
To: Eddie James
Cc: gregkh, devicetree, robh+dt, mark.rutland, bradleyb, cbostic,
joel, eajames, Edward A. James, kbuild-all, linux-kernel
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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-11-21 6:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-21 6:12 [PATCH] drivers/fsi: sbefifo: fix call_kern.cocci warnings Julia Lawall
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®