* [PATCH -next] serial: cpm_uart: Fix build error without CONFIG_SERIAL_CPM_CONSOLE
@ 2022-05-17 8:13 YueHaibing
2022-05-17 9:12 ` Jiri Slaby
0 siblings, 1 reply; 3+ messages in thread
From: YueHaibing @ 2022-05-17 8:13 UTC (permalink / raw)
To: gregkh, jirislaby, geert; +Cc: linux-serial, linux-kernel, YueHaibing
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
udbg_putc = NULL;
#endif
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] serial: cpm_uart: Fix build error without CONFIG_SERIAL_CPM_CONSOLE
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
2022-05-18 1:10 ` YueHaibing
0 siblings, 1 reply; 3+ messages in thread
From: Jiri Slaby @ 2022-05-17 9:12 UTC (permalink / raw)
To: YueHaibing, gregkh, geert; +Cc: linux-serial, linux-kernel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] serial: cpm_uart: Fix build error without CONFIG_SERIAL_CPM_CONSOLE
2022-05-17 9:12 ` Jiri Slaby
@ 2022-05-18 1:10 ` YueHaibing
0 siblings, 0 replies; 3+ messages in thread
From: YueHaibing @ 2022-05-18 1:10 UTC (permalink / raw)
To: Jiri Slaby, gregkh, geert; +Cc: linux-serial, linux-kernel
On 2022/5/17 17:12, Jiri Slaby wrote:
> 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)
Ok, will do this in v2.
> instead
> ?
>
>> udbg_putc = NULL;
>> #endif
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-18 1:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2022-05-18 1:10 ` YueHaibing
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).