diff mbox

[U-Boot,02/14] x86: Wrap print_ch() with config option

Message ID 1484739184-24211-3-git-send-email-bmeng.cn@gmail.com
State Accepted
Delegated to: Bin Meng
Headers show

Commit Message

Bin Meng Jan. 18, 2017, 11:32 a.m. UTC
print_ch() should not be used if DEBUG_UART is off.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---

 arch/x86/cpu/x86_64/cpu.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Simon Glass Jan. 23, 2017, 7:50 p.m. UTC | #1
Hi Bin,

On 18 January 2017 at 04:32, Bin Meng <bmeng.cn@gmail.com> wrote:
> print_ch() should not be used if DEBUG_UART is off.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> ---
>
>  arch/x86/cpu/x86_64/cpu.c | 2 ++
>  1 file changed, 2 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>

>
> diff --git a/arch/x86/cpu/x86_64/cpu.c b/arch/x86/cpu/x86_64/cpu.c
> index 77cbb56..82ea456 100644
> --- a/arch/x86/cpu/x86_64/cpu.c
> +++ b/arch/x86/cpu/x86_64/cpu.c
> @@ -31,7 +31,9 @@ void arch_setup_gd(gd_t *new_gd)
>          *
>          * U-Boot SPL 2017.01
>          */
> +#if CONFIG_IS_ENABLED(DEBUG_UART)

Or just #ifdef CONFIG_DEBUF_UART ?

>         printch(' ');
> +#endif
>  }
>
>  int cpu_has_64bit(void)
> --
> 2.9.2
>

Regards,
Simon
Bin Meng Feb. 7, 2017, 5:44 a.m. UTC | #2
On Tue, Jan 24, 2017 at 3:50 AM, Simon Glass <sjg@chromium.org> wrote:
> Hi Bin,
>
> On 18 January 2017 at 04:32, Bin Meng <bmeng.cn@gmail.com> wrote:
>> print_ch() should not be used if DEBUG_UART is off.
>>
>> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
>> ---
>>
>>  arch/x86/cpu/x86_64/cpu.c | 2 ++
>>  1 file changed, 2 insertions(+)
>
> Reviewed-by: Simon Glass <sjg@chromium.org>
>
>>
>> diff --git a/arch/x86/cpu/x86_64/cpu.c b/arch/x86/cpu/x86_64/cpu.c
>> index 77cbb56..82ea456 100644
>> --- a/arch/x86/cpu/x86_64/cpu.c
>> +++ b/arch/x86/cpu/x86_64/cpu.c
>> @@ -31,7 +31,9 @@ void arch_setup_gd(gd_t *new_gd)
>>          *
>>          * U-Boot SPL 2017.01
>>          */
>> +#if CONFIG_IS_ENABLED(DEBUG_UART)
>
> Or just #ifdef CONFIG_DEBUF_UART ?

Fixed, and

applied to u-boot-x86, thanks!
diff mbox

Patch

diff --git a/arch/x86/cpu/x86_64/cpu.c b/arch/x86/cpu/x86_64/cpu.c
index 77cbb56..82ea456 100644
--- a/arch/x86/cpu/x86_64/cpu.c
+++ b/arch/x86/cpu/x86_64/cpu.c
@@ -31,7 +31,9 @@  void arch_setup_gd(gd_t *new_gd)
 	 *
 	 * U-Boot SPL 2017.01
 	 */
+#if CONFIG_IS_ENABLED(DEBUG_UART)
 	printch(' ');
+#endif
 }
 
 int cpu_has_64bit(void)