linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [RESEND] SCSI: ips: remove pointless #warning
@ 2015-05-19 13:33 Arnd Bergmann
  2015-05-19 13:52 ` James Bottomley
  0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2015-05-19 13:33 UTC (permalink / raw)
  To: linux-scsi; +Cc: linux-arm-kernel, linux-kernel, James E.J. Bottomley

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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
Submitted last in January, but got no reply

diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
index 7542f11d3fcd..d86673a4cdb4 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 : \


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] [RESEND] SCSI: ips: remove pointless #warning
  2015-05-19 13:33 [PATCH] [RESEND] SCSI: ips: remove pointless #warning Arnd Bergmann
@ 2015-05-19 13:52 ` James Bottomley
  2015-05-19 13:56   ` Arnd Bergmann
  0 siblings, 1 reply; 6+ messages in thread
From: James Bottomley @ 2015-05-19 13:52 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-scsi, linux-arm-kernel, linux-kernel

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.

James



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] [RESEND] SCSI: ips: remove pointless #warning
  2015-05-19 13:52 ` James Bottomley
@ 2015-05-19 13:56   ` Arnd Bergmann
  2015-05-19 18:38     ` James Bottomley
  0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2015-05-19 13:56 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi, linux-arm-kernel, linux-kernel

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.

	Arnd

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] [RESEND] SCSI: ips: remove pointless #warning
  2015-05-19 13:56   ` Arnd Bergmann
@ 2015-05-19 18:38     ` James Bottomley
  2015-05-19 18:42       ` Arnd Bergmann
  2015-05-19 19:25       ` Joe Perches
  0 siblings, 2 replies; 6+ messages in thread
From: James Bottomley @ 2015-05-19 18:38 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: linux-scsi, linux-arm-kernel, linux-kernel

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

---

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;



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] [RESEND] SCSI: ips: remove pointless #warning
  2015-05-19 18:38     ` James Bottomley
@ 2015-05-19 18:42       ` Arnd Bergmann
  2015-05-19 19:25       ` Joe Perches
  1 sibling, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2015-05-19 18:42 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi, linux-arm-kernel, linux-kernel

On Tuesday 19 May 2015 11:38:17 James Bottomley wrote:
> 
> 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.
> 
> 

Good idea, thanks!

Acked-by: Arnd Bergmann <arnd@arndb.de>

	Arnd

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] [RESEND] SCSI: ips: remove pointless #warning
  2015-05-19 18:38     ` James Bottomley
  2015-05-19 18:42       ` Arnd Bergmann
@ 2015-05-19 19:25       ` Joe Perches
  1 sibling, 0 replies; 6+ messages in thread
From: Joe Perches @ 2015-05-19 19:25 UTC (permalink / raw)
  To: James Bottomley; +Cc: Arnd Bergmann, linux-scsi, linux-arm-kernel, linux-kernel

On Tue, 2015-05-19 at 11:38 -0700, James Bottomley wrote:
> 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"

trivial:

> > My main interest here is to get a clean build of ARM 'allmodconfig'.
[]
> What about this?  It captures the intent of the
> original but gets rid of the warning.
[]
> diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
[]
> @@ -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");

Bad comma after KERN_ERR, and KERN_ALERT might be better.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-05-19 19:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-19 13:33 [PATCH] [RESEND] SCSI: ips: remove pointless #warning Arnd Bergmann
2015-05-19 13:52 ` James Bottomley
2015-05-19 13:56   ` Arnd Bergmann
2015-05-19 18:38     ` James Bottomley
2015-05-19 18:42       ` Arnd Bergmann
2015-05-19 19:25       ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).