diff mbox series

[RFC,2/3] scsi: mpt: Replace a few uses of GFP_ATOMIC with GFP_KERNEL

Message ID 20200903152832.484908-3-alex.dewar90@gmail.com
State New
Headers show
Series scsi: mpt: Refactor and port to dma_* interface | expand

Commit Message

Alex Dewar Sept. 3, 2020, 3:28 p.m. UTC
None of the relevant functions are called from an atomic context, so
allocate memory with GFP_KERNEL to give a better chance of allocating
memory.

Signed-off-by: Alex Dewar <alex.dewar90@gmail.com>
---
 drivers/message/fusion/mptbase.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index b7136257b455..85fd9c3721ec 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -4254,14 +4254,14 @@  initChainBuffers(MPT_ADAPTER *ioc)
 	 */
 	if (ioc->ReqToChain == NULL) {
 		sz = ioc->req_depth * sizeof(int);
-		mem = kmalloc(sz, GFP_ATOMIC);
+		mem = kmalloc(sz, GFP_KERNEL);
 		if (mem == NULL)
 			return -1;
 
 		ioc->ReqToChain = (int *) mem;
 		dinitprintk(ioc, printk(MYIOC_s_DEBUG_FMT "ReqToChain alloc  @ %p, sz=%d bytes\n",
 			 	ioc->name, mem, sz));
-		mem = kmalloc(sz, GFP_ATOMIC);
+		mem = kmalloc(sz, GFP_KERNEL);
 		if (mem == NULL)
 			return -1;
 
@@ -4328,7 +4328,7 @@  initChainBuffers(MPT_ADAPTER *ioc)
 
 	sz = num_chain * sizeof(int);
 	if (ioc->ChainToChain == NULL) {
-		mem = kmalloc(sz, GFP_ATOMIC);
+		mem = kmalloc(sz, GFP_KERNEL);
 		if (mem == NULL)
 			return -1;
 
@@ -5283,7 +5283,7 @@  mpt_GetScsiPortSettings(MPT_ADAPTER *ioc, int portnum)
 		int	 sz;
 		u8	*mem;
 		sz = MPT_MAX_SCSI_DEVICES * sizeof(int);
-		mem = kmalloc(sz, GFP_ATOMIC);
+		mem = kmalloc(sz, GFP_KERNEL);
 		if (mem == NULL)
 			return -EFAULT;