On Fri, Jan 06, 2017 at 12:14:13AM +, Junichi Nomura wrote:
> Personally I have same opinion as yours. :)
>
> But according to Documentation/process/coding-style.rst, it seems
> "sizeof(*p)" is preferred style and the reason there makes some
> sense.
>
> Quote from coding-style.rst:
> > The
On 01/06/17 09:02, Borislav Petkov wrote:
> On Thu, Jan 05, 2017 at 11:52:07PM +, Junichi Nomura wrote:
+ p = kzalloc(sizeof(struct ucode_patch), GFP_KERNEL);
>>>
>>> Perhaps sizeof(*p) ?
>>
>> Yeah, that might be preferred.
>
> No, those things are never preferred because
>
>
On Thu, Jan 05, 2017 at 11:52:07PM +, Junichi Nomura wrote:
> >> + p = kzalloc(sizeof(struct ucode_patch), GFP_KERNEL);
> >
> > Perhaps sizeof(*p) ?
>
> Yeah, that might be preferred.
No, those things are never preferred because
sizeof(struct )
tells you exactly the size of w
On 01/06/17 02:44, Andy Shevchenko wrote:
> On Thu, Jan 5, 2017 at 3:03 AM, Junichi Nomura wrote:
>> We allocate struct ucode_patch here.
>>
>> "size" is a size of microcode data and used for kmemdup() later
>> in this function.
>>
>> Signed-off-by: Jun'ichi Nomura
>> Fixes: 06b8534cb728 ("x86/mi
On Thu, Jan 5, 2017 at 3:03 AM, Junichi Nomura wrote:
> We allocate struct ucode_patch here.
>
> "size" is a size of microcode data and used for kmemdup() later
> in this function.
>
> Signed-off-by: Jun'ichi Nomura
> Fixes: 06b8534cb728 ("x86/microcode: Rework microcode loading")
>
> diff --git
On Thu, Jan 05, 2017 at 01:03:51AM +, Junichi Nomura wrote:
> We allocate struct ucode_patch here.
>
> "size" is a size of microcode data and used for kmemdup() later
> in this function.
>
> Signed-off-by: Jun'ichi Nomura
> Fixes: 06b8534cb728 ("x86/microcode: Rework microcode loading")
>
>
6 matches
Mail list logo