Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: message: fusion: Use GFP_KERNEL

Pci_driver probe functions aren't called with locks held and thus don't
need GFP_ATOMIC. Use GFP_KERNEL instead.

Problem found with Coccinelle.

Link: https://lore.kernel.org/r/20220210204223.104181-9-Julia.Lawall@inria.fr
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Julia Lawall and committed by
Martin K. Petersen
f69b0791 31b17c3a

+1 -1
+1 -1
drivers/message/fusion/mptspi.c
··· 1493 1493 /* SCSI needs scsi_cmnd lookup table! 1494 1494 * (with size equal to req_depth*PtrSz!) 1495 1495 */ 1496 - ioc->ScsiLookup = kcalloc(ioc->req_depth, sizeof(void *), GFP_ATOMIC); 1496 + ioc->ScsiLookup = kcalloc(ioc->req_depth, sizeof(void *), GFP_KERNEL); 1497 1497 if (!ioc->ScsiLookup) { 1498 1498 error = -ENOMEM; 1499 1499 goto out_mptspi_probe;