Content-Type: multipart/mixed; boundary="===============1026038437788066382==" MIME-Version: 1.0 From: Julia Lawall To: kbuild-all@lists.01.org Subject: [PATCH] scsi: ufs: fix call_kern.cocci warnings Date: Sun, 03 Nov 2019 09:59:47 +0100 Message-ID: List-Id: --===============1026038437788066382== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: kbuild test robot 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 Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall --- 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-n= ext :::::: 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 !=3D 0 || len % 4 !=3D 0) /* keep readl happy */ return -EINVAL; - regs =3D kzalloc(len, GFP_KERNEL); + regs =3D kzalloc(len, GFP_ATOMIC); if (!regs) return -ENOMEM; --===============1026038437788066382==--