From patchwork Fri Nov 11 10:22:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sreekanth Reddy X-Patchwork-Id: 624394 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0B29C43217 for ; Fri, 11 Nov 2022 10:24:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231895AbiKKKYA (ORCPT ); Fri, 11 Nov 2022 05:24:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233697AbiKKKXi (ORCPT ); Fri, 11 Nov 2022 05:23:38 -0500 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8877DE87 for ; Fri, 11 Nov 2022 02:23:00 -0800 (PST) Received: by mail-pl1-x62a.google.com with SMTP id io19so3901924plb.8 for ; Fri, 11 Nov 2022 02:23:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=RpZBtVl1j22ENGDUXFoGduHSfqERLA8RwQarsL3j48c=; b=ZAScWpxE4jJiMnbH4snFRXLQ2/KdjDdEvQMxzcZ1KkX9T1HyJnBhAM6MeEszhaSPmY 9fR7dBfCRMBRjzHb1lqzK51/LnNTB4fLzpeTmkZlthjCkhhYLOq+6owIFUYeiOLAMHfG XLmfhQvxyIyUlzbpk2Sk1krVyEvWD2dllQ8oQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RpZBtVl1j22ENGDUXFoGduHSfqERLA8RwQarsL3j48c=; b=mSZ1qgjP3A6zq/z0Cs2WATAw+67x+AOOrJtUvcW+cn1iS0fX/boxIPn+csVdo9ckDr TGZHUCbg87t+Q7bAxnOyZ3PrjHgE4AlzrQjVLL6pPEQ3As47DojZ9X4jl0AXJt1Cqy2F EvI8p6/Zvs4niVk2qmlscY685IiRMOGTZCS2UVxRNHqsm6FRGlPIcX97tqU21zGNlOxp vaMIvioKLbIhMrPzbYXKac59zdI6xelaye9/HMbfPdICOXOeThI4NK3/J3oTv3EkzTak 7/m5Ca/Pq3Amxkd9Q4KW9bOgoHlkJv9vL5er/EFdv+vKy6kkQ1aHogT2DPl3YDTkFMRp b28w== X-Gm-Message-State: ANoB5pmuoevDnAH2s/H4+BlZ23nW3PT74ANK3JnFY6zBntNWAml8SWY5 BbQ1O2DFZhI/gimyWeSOXh+2xkKy10DVaaosMeJ7Kk/AFJR4xqeR7RT9VCDaVstqa2ACJHKVQUW pXmuh9b6/WLyWh5CmFfc3k9TUBZrPFDKN7V9+c/Xn7dOLXRfTzMn3YK4aUBoIpUggLbJbyidLyu Khguvl/nH3 X-Google-Smtp-Source: AA0mqf56R3tKwYR7SHbNyQk5LYw6UmDfEl1lmFgiopRNNzD/ZfhQF/fLYzWuUMpTlDTLiYlfahAAdw== X-Received: by 2002:a17:90a:e57:b0:212:d2be:c821 with SMTP id p23-20020a17090a0e5700b00212d2bec821mr1231720pja.37.1668162179574; Fri, 11 Nov 2022 02:22:59 -0800 (PST) Received: from dhcp-10-123-20-36.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id p129-20020a622987000000b0055f209690c0sm1240691pfp.50.2022.11.11.02.22.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 02:22:59 -0800 (PST) From: Sreekanth Reddy To: linux-scsi@vger.kernel.org Cc: martin.petersen@oracle.com, Sreekanth Reddy Subject: [PATCH 1/1] mpi3mr: Remove usage of dma_get_required_mask api Date: Fri, 11 Nov 2022 15:52:46 +0530 Message-Id: <20221111102246.19995-2-sreekanth.reddy@broadcom.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20221111102246.19995-1-sreekanth.reddy@broadcom.com> References: <20221111102246.19995-1-sreekanth.reddy@broadcom.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Remove the usage of dma_get_required_mask() API. Directly set the DMA mask to 63/64 if the system is a 64bit machine. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpi3mr/mpi3mr_fw.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c index 0c4aabaefdcc..286a44506578 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_fw.c +++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c @@ -3633,8 +3633,7 @@ int mpi3mr_setup_resources(struct mpi3mr_ioc *mrioc) int i, retval = 0, capb = 0; u16 message_control; u64 dma_mask = mrioc->dma_mask ? mrioc->dma_mask : - (((dma_get_required_mask(&pdev->dev) > DMA_BIT_MASK(32)) && - (sizeof(dma_addr_t) > 4)) ? DMA_BIT_MASK(64) : DMA_BIT_MASK(32)); + ((sizeof(dma_addr_t) > 4) ? DMA_BIT_MASK(64) : DMA_BIT_MASK(32)); if (pci_enable_device_mem(pdev)) { ioc_err(mrioc, "pci_enable_device_mem: failed\n");