[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87v8vn1o7u.ffs@tglx>
Date: Tue, 05 Apr 2022 18:36:53 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Alexey Dobriyan <adobriyan@...il.com>, x86@...nel.org
Cc: mingo@...hat.com, bp@...en8.de, dave.hansen@...ux.intel.com,
hpa@...or.com, linux-kernel@...r.kernel.org, adobriyan@...il.com
Subject: Re: [PATCH 1/5] x86/alternative: simplify DUMP_BYTES macro
On Fri, Mar 11 2022 at 17:43, Alexey Dobriyan wrote:
> Avoid zero length check with clever whitespace placement in the format
> string.
>
> Signed-off-by: Alexey Dobriyan (CloudLinux) <adobriyan@...il.com>
> ---
> arch/x86/kernel/alternative.c | 21 +++++++++------------
> 1 file changed, 9 insertions(+), 12 deletions(-)
>
> diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
> index 5007c3ffe96f..6c9758ee6810 100644
> --- a/arch/x86/kernel/alternative.c
> +++ b/arch/x86/kernel/alternative.c
> @@ -66,13 +66,10 @@ do { \
> if (unlikely(debug_alternative)) { \
> int j; \
> \
> - if (!(len)) \
> - break; \
> - \
How does that clever whitespace placement prevent this being printed in
the len == 0 case, which is a legit case?
> printk(KERN_DEBUG pr_fmt(fmt), ##args); \
This is debug muck. So why does it have to be "optimized"?
Thanks,
tglx
Powered by blists - more mailing lists