lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2612fae5-e972-5c82-c44e-af1fb1d839fd@kernel.org>
Date:   Tue, 17 May 2022 11:12:34 +0200
From:   Jiri Slaby <jirislaby@...nel.org>
To:     YueHaibing <yuehaibing@...wei.com>, gregkh@...uxfoundation.org,
        geert@...ux-m68k.org
Cc:     linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] serial: cpm_uart: Fix build error without
 CONFIG_SERIAL_CPM_CONSOLE

On 17. 05. 22, 10:13, YueHaibing wrote:
> drivers/tty/serial/cpm_uart/cpm_uart_core.c: In function ‘cpm_uart_init_port’:
> drivers/tty/serial/cpm_uart/cpm_uart_core.c:1251:7: error: ‘udbg_port’ undeclared (first use in this function); did you mean ‘uart_port’?
>    if (!udbg_port)
>         ^~~~~~~~~
>         uart_port
> 
> commit d142585bceb3 leave this corner, wrap it with #ifdef block
> 
> Fixes: d142585bceb3 ("serial: cpm_uart: Protect udbg definitions by CONFIG_SERIAL_CPM_CONSOLE")
> Signed-off-by: YueHaibing <yuehaibing@...wei.com>
> ---
>   drivers/tty/serial/cpm_uart/cpm_uart_core.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/tty/serial/cpm_uart/cpm_uart_core.c b/drivers/tty/serial/cpm_uart/cpm_uart_core.c
> index d6d3db9c3b1f..ec3a8f768555 100644
> --- a/drivers/tty/serial/cpm_uart/cpm_uart_core.c
> +++ b/drivers/tty/serial/cpm_uart/cpm_uart_core.c
> @@ -1248,7 +1248,9 @@ static int cpm_uart_init_port(struct device_node *np,
>   
>   #ifdef CONFIG_PPC_EARLY_DEBUG_CPM
>   #ifdef CONFIG_CONSOLE_POLL
> +#ifdef CONFIG_SERIAL_CPM_CONSOLE
>   	if (!udbg_port)
> +#endif
>   #endif

That's ugly, could you merge the two to
   #if defined(ONE) && defined(TWO)
instead
?

>   		udbg_putc = NULL;
>   #endif


-- 
js
suse labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ