Re: [PATCH] serial: 8250_dw: #ifdef out dw8250_acpi_match if ACPI isn't set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Greg,

On Fri, 23 Dec 2016 19:09:23 +0100 Greg KH wrote:
> 
> On Fri, Dec 23, 2016 at 08:33:55PM +0800, Jisheng Zhang wrote:
> > dw8250_acpi_match is used only when ACPI is enabled. Fix the following
> > gcc warning when W=1 is set:
> > 
> > drivers/tty/serial/8250/8250_dw.c:640:36: warning: 'dw8250_acpi_match'
> > defined but not used [-Wunused-const-variable=]  
> 
> Don't set W=1 then, this type of "fix" is foolish and is just going to
> make code messier, sorry.

Per my understanding of commit c9c6837d3931 ("kbuild: move
-Wunused-const-variable to W=1 warning level"), "Once we have eliminated
the majority of the warnings for both, we can put them back into the
default list.", so we'll have such warning one day without W=1 in the
future.

And FWICT, other devices drivers which could be used in ACPI and DT also
add the "#ifdef ACPI" to the acpi match table, such as:

drivers/ata/ahci_xgene.c
drivers/dma/dw/platform.c
drivers/i2c/busses/i2c-designware-platdrv.c
drivers/hid/i2c-hid/i2c-hid.c
drivers/usb/dwc3/core.c

Thanks,
Jisheng
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux