From: Jiri Slaby <jirislaby@kernel.org>
To: YueHaibing <yuehaibing@huawei.com>,
gregkh@linuxfoundation.org, geert@linux-m68k.org
Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] serial: cpm_uart: Fix build error without CONFIG_SERIAL_CPM_CONSOLE
Date: Tue, 17 May 2022 11:12:34 +0200 [thread overview]
Message-ID: <2612fae5-e972-5c82-c44e-af1fb1d839fd@kernel.org> (raw)
In-Reply-To: <20220517081355.35456-1-yuehaibing@huawei.com>
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@huawei.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
next prev parent reply other threads:[~2022-05-17 9:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-17 8:13 [PATCH -next] serial: cpm_uart: Fix build error without CONFIG_SERIAL_CPM_CONSOLE YueHaibing
2022-05-17 9:12 ` Jiri Slaby [this message]
2022-05-18 1:10 ` YueHaibing
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2612fae5-e972-5c82-c44e-af1fb1d839fd@kernel.org \
--to=jirislaby@kernel.org \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=yuehaibing@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).