From patchwork Tue May 19 18:38:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Bottomley X-Patchwork-Id: 6440321 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CE0C19F318 for ; Tue, 19 May 2015 18:41:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CE366203E1 for ; Tue, 19 May 2015 18:41:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CF8B1203B5 for ; Tue, 19 May 2015 18:41:32 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YumPj-0003Iq-3C; Tue, 19 May 2015 18:38:51 +0000 Received: from bedivere.hansenpartnership.com ([66.63.167.143]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YumPg-0003GZ-Cr for linux-arm-kernel@lists.infradead.org; Tue, 19 May 2015 18:38:48 +0000 Received: from localhost (localhost [127.0.0.1]) by bedivere.hansenpartnership.com (Postfix) with ESMTP id BBD6F8EE20D; Tue, 19 May 2015 11:38:26 -0700 (PDT) Received: from bedivere.hansenpartnership.com ([127.0.0.1]) by localhost (bedivere.hansenpartnership.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0PspnyOoYcrI; Tue, 19 May 2015 11:38:26 -0700 (PDT) Received: from [10.230.10.150] (unknown [72.28.92.15]) by bedivere.hansenpartnership.com (Postfix) with ESMTPSA id 315148EE002; Tue, 19 May 2015 11:38:26 -0700 (PDT) Message-ID: <1432060697.14737.1.camel@HansenPartnership.com> Subject: Re: [PATCH] [RESEND] SCSI: ips: remove pointless #warning From: James Bottomley To: Arnd Bergmann Date: Tue, 19 May 2015 11:38:17 -0700 In-Reply-To: <2850783.725LtIIUFq@wuerfel> References: <3121960.dnOqT9LCth@wuerfel> <1432043572.3007.14.camel@HansenPartnership.com> <2850783.725LtIIUFq@wuerfel> X-Mailer: Evolution 3.12.11 Mime-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150519_113848_450914_06BFF971 X-CRM114-Status: GOOD ( 19.39 ) X-Spam-Score: -0.0 (/) Cc: linux-arm-kernel@lists.infradead.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, 2015-05-19 at 15:56 +0200, Arnd Bergmann wrote: > On Tuesday 19 May 2015 06:52:52 James Bottomley wrote: > > On Tue, 2015-05-19 at 15:33 +0200, Arnd Bergmann wrote: > > > The ips driver contains > > > > > > #warning "This driver has only been tested on the x86/ia64/x86_64 platforms" > > > > > > which gets printed by the compiler every time this driver gets > > > build for something other than those three architectures. The same > > > is true for most other drivers, but none of them prints a warning like > > > this. > > > > > > Let's remove the warning now to reduce the amount of clutter. > > > > > > FWIW, I've reviewed the driver and found a few oddities, but nothing > > > that needs to be fixed or that would be architecture specific. > > > > In principle I don't disagree. However this warning was a specific > > request of the driver writers. Since the driver is pretty much dead, > > I'm not sure anyone is going to check or fix it for non-intel any time > > soon. > > My main interest here is to get a clean build of ARM 'allmodconfig'. > > If you prefer another approach, we could also add 'depends on X86 || IA64' > into Kconfig, which would also avoid that warning. Actually, no, that would cause problems if anyone is actually using this driver on non-intel. What about this? It captures the intent of the original but gets rid of the warning. James Acked-by: Arnd Bergmann diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c index 7542f11..6242872 100644 --- a/drivers/scsi/ips.c +++ b/drivers/scsi/ips.c @@ -206,10 +206,6 @@ module_param(ips, charp, 0); #define IPS_VERSION_HIGH IPS_VER_MAJOR_STRING "." IPS_VER_MINOR_STRING #define IPS_VERSION_LOW "." IPS_VER_BUILD_STRING " " -#if !defined(__i386__) && !defined(__ia64__) && !defined(__x86_64__) -#warning "This driver has only been tested on the x86/ia64/x86_64 platforms" -#endif - #define IPS_DMA_DIR(scb) ((!scb->scsi_cmd || ips_is_passthru(scb->scsi_cmd) || \ DMA_NONE == scb->scsi_cmd->sc_data_direction) ? \ PCI_DMA_BIDIRECTIONAL : \ @@ -6788,6 +6784,11 @@ ips_remove_device(struct pci_dev *pci_dev) static int __init ips_module_init(void) { +#if !defined(__i386__) && !defined(__ia64__) && !defined(__x86_64__) + printk(KERN_ERR, "ips: This driver has only been tested on the x86/ia64/x86_64 platforms\n"); + add_taint(TAINT_CPU_OUT_OF_SPEC, LOCKDEP_STILL_OK); +#endif + if (pci_register_driver(&ips_pci_driver) < 0) return -ENODEV; ips_driver_template.module = THIS_MODULE;