Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1554218pxb; Sat, 15 Jan 2022 16:05:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJxh6z1iH2of9Keo0R9eL+8DUKKckUns3VnMAuzG8bAz24zT7B0vKFLnUruKOy4j2AuNR+iA X-Received: by 2002:a05:6402:483:: with SMTP id k3mr14607423edv.323.1642291558320; Sat, 15 Jan 2022 16:05:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642291558; cv=none; d=google.com; s=arc-20160816; b=PKXvlulU32RtFRj6GkqD3yLfer+K5W9Mwfq8ZxUXj8MXOVVJDJj3f6CwxmNRjdN2d7 OCVopdU0RV5i7DmzrEXP2QZuj/XYEZz5BblmShMnLGFCgER8rSzDFeSrl2YbMY/IpQDr IzooswDj0SKLztFRA7x4bKli/Oggj2CAAWcd7XZI9nhR3Iy47vzDIcr/Ll0oB9fCt2Lb CzqJShYoy/ogjVMH5Zw15bcegKmIFd91pG1TiphG5igczY8AbynphKOXAFJIeWIhzIVq ZYcQySZtSlEtFYaW39qO1LPfODVVAxOIuN/qFnbe/YotOElP6BRfROXfwlf57dDS5iBk h3BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=3uctyne+NC/5uHopi6R0iV+FxN1IwKELPH+CBgJUXO4=; b=GbrvUTCty7x8MeUGtdGeXVOh5MucoYDy4VrAgp0rHoJb1sYNiwj8uqULcEcgq6drEu DmdVZbLQoMdF1p7pTKA0aBwDU+qekVXhsQlKm2EXV+5LHDs5Te1fd0TIyx+yUzmA3vnc tzUSUlq2uf+O8P7TDnCxsRvO1gPhQWTYITs2mxtq0YPaksCrCa9C+zC95cH0L90DF+uc XMoY+7V+q19L4PVCCB/C+2FGJRZ1bDoQsgDiQfKwHxd8Cv7pVhadLqDodhk3zfj3i+gg JEyDm3bzEwCjuLS0ZeXIMDyZad9+KxMZkLWB9aL+Xa43oWZbPC7Q43I/Og84NUmdPwal EQMQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sa13si5216534ejc.688.2022.01.15.16.05.10; Sat, 15 Jan 2022 16:05:58 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232697AbiAOJFe (ORCPT + 99 others); Sat, 15 Jan 2022 04:05:34 -0500 Received: from smtp03.smtpout.orange.fr ([80.12.242.125]:64678 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232658AbiAOJFc (ORCPT ); Sat, 15 Jan 2022 04:05:32 -0500 Received: from pop-os.home ([90.126.236.122]) by smtp.orange.fr with ESMTPA id 8f04nie42hTNk8f04n3ox2; Sat, 15 Jan 2022 10:05:31 +0100 X-ME-Helo: pop-os.home X-ME-Auth: YWZlNiIxYWMyZDliZWIzOTcwYTEyYzlhMmU3ZiQ1M2U2MzfzZDfyZTMxZTBkMTYyNDBjNDJlZmQ3ZQ== X-ME-Date: Sat, 15 Jan 2022 10:05:31 +0100 X-ME-IP: 90.126.236.122 From: Christophe JAILLET To: John Garry , "James E.J. Bottomley" , "Martin K. Petersen" Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-scsi@vger.kernel.org Subject: [PATCH] scsi: hisi_sas: Remove useless DMA-32 fallback configuration Date: Sat, 15 Jan 2022 10:05:22 +0100 Message-Id: <1bf2d3660178b0e6f172e5208bc0bd68d31d9268.1642237482.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As stated in [1], dma_set_mask() with a 64-bit mask never fails if dev->dma_mask is non-NULL. So, if it fails, the 32 bits case will also fail for the same reason. Simplify code and remove some dead code accordingly. [1]: https://lore.kernel.org/linux-kernel/YL3vSPK5DXTNvgdx@infradead.org/#t Signed-off-by: Christophe JAILLET --- drivers/scsi/hisi_sas/hisi_sas_main.c | 3 --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 2 -- 2 files changed, 5 deletions(-) diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index a05ec7aece5a..2f53a2ee024a 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -2666,9 +2666,6 @@ static struct Scsi_Host *hisi_sas_shost_alloc(struct platform_device *pdev, goto err_out; error = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64)); - if (error) - error = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32)); - if (error) { dev_err(dev, "No usable DMA addressing method\n"); goto err_out; diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c index a45ef9a5e12e..a01a3a7b706b 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c @@ -4695,8 +4695,6 @@ hisi_sas_v3_probe(struct pci_dev *pdev, const struct pci_device_id *id) goto err_out; rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)); - if (rc) - rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); if (rc) { dev_err(dev, "No usable DMA addressing method\n"); rc = -ENODEV; -- 2.32.0