From: Ingo Molnar <mingo@kernel.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Saidgani Musaev <cpu808694@gmail.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
x86@kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] arch/x86/boot: sizeof macro
Date: Sat, 6 Jan 2018 12:50:20 +0100 [thread overview]
Message-ID: <20180106115020.abragiirty5edis5@gmail.com> (raw)
In-Reply-To: <CAHp75VdhZqRdRb2GJd4QnRoG6brYvfswZ6wR_pWEk+T-uJ3i5A@mail.gmail.com>
* Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> On Fri, Dec 29, 2017 at 9:46 PM, Ingo Molnar <mingo@kernel.org> wrote:
> > * Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
>
> >> > - ireg.cx = sizeof buf;
> >> > + ireg.cx = sizeof(buf);
> >>
> >> sizeof is operator, not a function.
> >> So, what are you trying to achieve?
> >
> > That's true, but in the kernel coding style we use it as a function:
>
> Yeah, the question is do we need to change all those 177 occurrences at all?
> Or perhaps it might be an opportunity during some other changes to
> certain users...
We probably don't want to change then, and my point was that 99.8% of the current
usage is as a 'function':
triton:~/tip> git grep 'sizeof(' | wc -l
116570
triton:~/tip> git grep 'sizeof [:alnum:]' | wc -l
177
i.e. your patch moves it in the exact wrong direction.
Thanks,
Ingo
next prev parent reply other threads:[~2018-01-06 11:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-29 18:30 [PATCH] arch/x86/boot: sizeof macro Saidgani Musaev
2017-12-29 18:41 ` Andy Shevchenko
2017-12-29 19:34 ` hacku
2017-12-29 19:46 ` Ingo Molnar
2017-12-31 11:48 ` Andy Shevchenko
2017-12-31 16:33 ` Joe Perches
2018-01-06 11:50 ` Ingo Molnar [this message]
2018-01-08 21:44 ` H. Peter Anvin
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=20180106115020.abragiirty5edis5@gmail.com \
--to=mingo@kernel.org \
--cc=andy.shevchenko@gmail.com \
--cc=cpu808694@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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