Re: [PATCH 2/2] serial: pch_uart: Fix build warning when CONFIG_DEBUG_FS=n

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

 



On Tue, 2014-02-04 at 15:58 +0900, Jingoo Han wrote:
> Add CONFIG_DEBUG_FS to 'char name' in order to fix the following
> build warning, because 'char name' is used only when CONFIG_DEBUG_FS
> is enabled.
> 
> drivers/tty/serial/pch_uart.c:1765:7: warning: unused variable 'name' [-Wunused-variable]
> 
> Signed-off-by: Jingoo Han <jg1.han@xxxxxxxxxxx>

Acked-by: Darren Hart <dvhart@xxxxxxxxxxxxxxx>

> ---
>  drivers/tty/serial/pch_uart.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
> index 8fa1134..0931b3f 100644
> --- a/drivers/tty/serial/pch_uart.c
> +++ b/drivers/tty/serial/pch_uart.c
> @@ -1762,7 +1762,9 @@ static struct eg20t_port *pch_uart_init_port(struct pci_dev *pdev,
>  	int fifosize;
>  	int port_type;
>  	struct pch_uart_driver_data *board;
> +#ifdef CONFIG_DEBUG_FS
>  	char name[32];	/* for debugfs file name */
> +#endif
>  
>  	board = &drv_dat[id->driver_data];
>  	port_type = board->port_type;

-- 
Darren Hart
Yocto Project - Linux Kernel
Intel Open Source Technology Center

--
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