mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] scsi: ufs: fix call_kern.cocci warnings
@ 2019-11-03  8:59 Julia Lawall
  0 siblings, 0 replies; only message in thread
From: Julia Lawall @ 2019-11-03  8:59 UTC (permalink / raw)
  To: Can Guo
  Cc: asutoshd, nguyenb, rnayak, linux-scsi, kernel-team, saravanak,
	salyzyn, cang, Venkat Gopalakrishnan, Alim Akhtar, Avri Altman,
	Pedro Sousa, James E.J. Bottomley, Martin K. Petersen,
	Stanley Chu, Bean Huo, Tomas Winkler, Subhash Jadavani,
	open list, kbuild-all

From: kbuild test robot <lkp@intel.com>

Function ufshcd_dump_regs called from ufshcd_intr inside a lock
but uses GFP_KERNEL.

Generated by: scripts/coccinelle/locks/call_kern.cocci

Fixes: 3393ec7d5dc1 ("scsi: ufs: Fix irq return code")
CC: Venkat Gopalakrishnan <venkatg@codeaurora.org>
Signed-off-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
---

url:    https://github.com/0day-ci/linux/commits/Can-Guo/UFS-driver-general-fixes-bundle-3/20191103-092121
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
:::::: branch date: 2 hours ago
:::::: commit date: 2 hours ago

Another approach would be to reorganize the code to not use this function
in printing the error message from the interrupt handler, or to reorganize
the code in some other way.

 ufshcd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -117,7 +117,7 @@ int ufshcd_dump_regs(struct ufs_hba *hba
 	if (offset % 4 != 0 || len % 4 != 0) /* keep readl happy */
 		return -EINVAL;

-	regs = kzalloc(len, GFP_KERNEL);
+	regs = kzalloc(len, GFP_ATOMIC);
 	if (!regs)
 		return -ENOMEM;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-11-03  8:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-03  8:59 [PATCH] scsi: ufs: 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®