From patchwork Fri Jun 17 12:57:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 582948 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 52022C43334 for ; Fri, 17 Jun 2022 12:58:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382405AbiFQM6S (ORCPT ); Fri, 17 Jun 2022 08:58:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382226AbiFQM6L (ORCPT ); Fri, 17 Jun 2022 08:58:11 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E5262B1AF; Fri, 17 Jun 2022 05:58:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id AD2F6B82682; Fri, 17 Jun 2022 12:58:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 593ABC3411F; Fri, 17 Jun 2022 12:58:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1655470687; bh=PHa+k1YPCB+2jgYk545vxPTI79A930ycNAnnkPIO8Q0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nLNheZIMb11YnK30s1ue4ClOfmXib4scSxsRBkan3jiCrsYF14v8dRzqdsbD07xD/ 7CVlJX/9vypOil3A0ym7H4qwTjHxFVs2953dx4vTr/1tKVrlExjRwnVrNjB56/54b8 mI5c0Afql8VfQwtkoOtgPCBjeHOOsjVos0BnP7RKevmdbYMVMVehSfmRtWEVM7Zo+0 32Oor1aZzOjFgybMMdE7DBEwLj2FGEfKPYV0Lcgg2w1dTdhpLzSWnnUROwn+W6xw1r brAoIaL/gkUAawWzU4UY6DLRjidv0/55hJJFNX7mCSRMsy9E0xCQG8rGi327Q83BHu JVJbuHA/NBGRA== From: Arnd Bergmann To: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Arnd Bergmann , Jakub Kicinski , Christoph Hellwig , Marek Szyprowski , Robin Murphy , iommu@lists.linux-foundation.org, Khalid Aziz , "Maciej W . Rozycki" , Matt Wang , Miquel van Smoorenburg , Mark Salyzyn , linuxppc-dev@lists.ozlabs.org, linux-arch@vger.kernel.org, linux-alpha@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-parisc@vger.kernel.org, Denis Efremov Subject: [PATCH v2 1/3] scsi: dpt_i2o: drop stale VIRT_TO_BUS dependency Date: Fri, 17 Jun 2022 14:57:48 +0200 Message-Id: <20220617125750.728590-2-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20220617125750.728590-1-arnd@kernel.org> References: <20220617125750.728590-1-arnd@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org From: Arnd Bergmann The dpt_i2o driver was fixed to stop using virt_to_bus() in 2008, but it still has a stale reference in an error handling code path that could never work. Fix it up to build without VIRT_TO_BUS and remove the Kconfig dependency. The alternative to this would be to just remove the driver, as it is clearly obsolete. The i2o driver layer was removed in 2015 with commit 4a72a7af462d ("staging: remove i2o subsystem"), but the even older dpt_i2o scsi driver stayed around. The last non-cleanup patches I could find were from Miquel van Smoorenburg and Mark Salyzyn back in 2008, they might know if there is any chance of the hardware still being used anywhere. Fixes: 67af2b060e02 ("[SCSI] dpt_i2o: move from virt_to_bus/bus_to_virt to dma_alloc_coherent") Cc: Miquel van Smoorenburg Cc: Mark Salyzyn Signed-off-by: Arnd Bergmann Reviewed-by: Hannes Reinecke --- drivers/scsi/Kconfig | 2 +- drivers/scsi/dpt_i2o.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index a9fe5152addd..cf75588a2587 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig @@ -460,7 +460,7 @@ config SCSI_MVUMI config SCSI_DPT_I2O tristate "Adaptec I2O RAID support " - depends on SCSI && PCI && VIRT_TO_BUS + depends on SCSI && PCI help This driver supports all of Adaptec's I2O based RAID controllers as well as the DPT SmartRaid V cards. This is an Adaptec maintained diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index 2e9155ba7408..55dfe7011912 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c @@ -52,11 +52,11 @@ MODULE_DESCRIPTION("Adaptec I2O RAID Driver"); #include #include +#include #include #include #include /* for boot_cpu_data */ -#include /* for virt_to_bus, etc. */ #include #include @@ -2112,7 +2112,7 @@ static irqreturn_t adpt_isr(int irq, void *dev_id) } else { /* Ick, we should *never* be here */ printk(KERN_ERR "dpti: reply frame not from pool\n"); - reply = (u8 *)bus_to_virt(m); + goto out; } if (readl(reply) & MSG_FAIL) {