lkml.org 
[lkml]   [2017]   [Dec]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] arch/x86/boot: sizeof macro

* Andy Shevchenko <andy.shevchenko@gmail.com> wrote:

> On Fri, Dec 29, 2017 at 8:30 PM, Saidgani Musaev <cpu808694@gmail.com> wrote:
>
> No changelog, no explanation why...
> No SoB tag...
>
> > - 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:

triton:~/tip> git grep 'sizeof(' | wc -l
116570

triton:~/tip> git grep 'sizeof [:alnum:]' | wc -l
177

Thanks,

Ingo

\
 
 \ /
  Last update: 2017-12-29 20:47    [W:0.034 / U:15.716 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site