Messages in this thread |  | | From | Thomas Gleixner <> | Subject | Re: [PATCH 1/5] x86/alternative: simplify DUMP_BYTES macro | Date | Tue, 05 Apr 2022 18:36:53 +0200 |
| |
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@gmail.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
|  |