Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp624822pxk; Thu, 3 Sep 2020 08:31:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaFzD/YDHWWpohlnvi9dHQgVJz7yIVvbAvmCPUJrKDbVZJzZAPtwYYGwRvs1eeKnNc6kdF X-Received: by 2002:a50:fd19:: with SMTP id i25mr3745933eds.142.1599147102499; Thu, 03 Sep 2020 08:31:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599147102; cv=none; d=google.com; s=arc-20160816; b=yPopxiJNQSQo4KZq14xwY0bhMUBtto40jUHW5sowI9USn8M4Dwy9glDCBgN9UBHuXn 8K6JSIcv+ITib12ah4/m12OXlpUm0ybv4yl733J+DDRbKXsxlGx0bi76T45JeH8I/itn Rn5ddCqf4L61R/5LywKfdRzGf/hKFxE3Mz8qaQ/2eFjzHYkLBnKy4AngvMCgxbxjsw4X Ht8fgvIm0ZT8Z0p2nXk5SrGAY7ghHbakaFIF2IfuWK28iJCao8ehAEkvKbv2uRGqDH/6 1jEVdfMg1EGP1s7jIRkDG8uSX2QmvPnhYbzpZsvtXh30Z+cpvgdZwq96ck2y6nqqv20C cspQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=OnIkX7rxg+ctJcVWRv3lpkXGv5XLsLWj9CB5s4zIv08=; b=JP6lPnWPTGbIHMjxoeN8h4arnJJOhiobs7dVSNSRZlGshnOSpCdZuLpTxZjt57NLFY 0c4PkpVdmTBmhA1sOkKJRPTx0+7i524am7/rpzBB0jFJfYvAfh4qgKbdIpqoy3hBf/qh ayC6hYdaamahPr4nacLKBiUF40lspCPsHqoyX3M1fBt9UjlX74Gk+4rjSrYLcL7Pwyov 013zL4Hqp0VffLy75qotu3cHojhEa7dHV75FXtp80SC0Y+IjSGClLgqwsPaDFfy9epA6 nkJqQfyKY83tyPCdgWe8dFZx+kYSf3AXGXuiDMYrCDK6W/+w/Jf4lBRBtFLyjcnE3Z7c 7q4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=uhYwIN2a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn23si1763985edb.206.2020.09.03.08.31.19; Thu, 03 Sep 2020 08:31:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=uhYwIN2a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728628AbgICP3L (ORCPT + 99 others); Thu, 3 Sep 2020 11:29:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728446AbgICP2r (ORCPT ); Thu, 3 Sep 2020 11:28:47 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B7F1C061244; Thu, 3 Sep 2020 08:28:47 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id e11so5608034wme.0; Thu, 03 Sep 2020 08:28:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OnIkX7rxg+ctJcVWRv3lpkXGv5XLsLWj9CB5s4zIv08=; b=uhYwIN2a/HWgD4LA8wl/lOsUUfZSY2RS8+WxUiUiIlkV+gGpBf6uzgy70WXmgbtvcG CtZhcl85NHxBFKeovA8X5vLdh+ctFqTzUd5bDDuePtDMy1GfCV+5iG5kiTI5/CnM8qV9 NM/vaEvQafotc00gBn//LqOzUQyOfFynXgTBvyAX5XMKDwjQlgejRLG9xZ7L0pa7OliY Sfvsa3Arxl66zBprfiAEQU1+I9FfM2ghAl+rKBLoMHZtawoaUlpTT+iJbK+Lw/rdVLSR F1zLsvUHycIQCfWHsg1bKYgFt1Dt/O6gA8wibHwxpDBoelpZture7QYbevKKp19tRyWO Xbkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OnIkX7rxg+ctJcVWRv3lpkXGv5XLsLWj9CB5s4zIv08=; b=geLN8UR04YC82zji+3KzhLwvwA2AkMmzyc/lSsh7E97Y26MfefYHMeNE+T3ecYMmCb ZM4Tc/w23wVMJAL90Lza1JS7Fo/GZ1R3e8hyDmiOKFQmM5DQHrxiJSyE5TydksCdE5Zg IGTmKGFppauLUZpaPEjfNZG8SQh4loskuwuaL1lyW/R3cyMf0OBoUUR9p3tZROQgrTPZ eghVVfU1F24yuevdZXZdSvL5GMdyE853dG7NEHoMFpPra7bKB0Cez7xxIK81HGZtWeb7 gv0QlmRvVI0LeqJHYEjVG6kEbempHEV/XD3DhXP4KoaX/p4xM1BU3a961I0j6CmOoWPm cekw== X-Gm-Message-State: AOAM531QF69MNegb/C9rUu1n3659xn5vmktUA7YlD0pAjOVImajEr8qL uGbdVbk4XuW818oEdj/18Tg= X-Received: by 2002:a1c:3886:: with SMTP id f128mr3051184wma.121.1599146925667; Thu, 03 Sep 2020 08:28:45 -0700 (PDT) Received: from localhost.localdomain (cpc83661-brig20-2-0-cust443.3-3.cable.virginm.net. [82.28.105.188]) by smtp.gmail.com with ESMTPSA id 32sm5750210wrh.18.2020.09.03.08.28.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 08:28:45 -0700 (PDT) From: Alex Dewar Cc: Alex Dewar , Sathya Prakash , Sreekanth Reddy , Suganath Prabu Subramani , MPT-FusionLinux.pdl@broadcom.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH RFC 2/3] scsi: mpt: Replace a few uses of GFP_ATOMIC with GFP_KERNEL Date: Thu, 3 Sep 2020 16:28:31 +0100 Message-Id: <20200903152832.484908-3-alex.dewar90@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200903152832.484908-1-alex.dewar90@gmail.com> References: <20200903152832.484908-1-alex.dewar90@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/message/fusion/mptbase.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; -- 2.28.0