Re: [PATCH v7u1 20/31] x86, kexec: replace ident_mapping_init andinit_level4_page

From: Borislav Petkov
Date: Thu Jan 10 2013 - 06:59:29 EST


On Wed, Jan 09, 2013 at 05:26:18PM -0800, Yinghai Lu wrote:
> I should say:
>
> that *is* initialized to false by default.
>
> please check
>
> http://stackoverflow.com/questions/10828294/c-and-c-partial-initialization-of-automatic-structure

Ok, I didn't know that, thanks for pointing it out.

And yet, this is not the point - the point is that this code is
complicated enough as it is so why not make the easy things trivial so
that people looking at it months or even years from now can still try to
understand it.

So what it is defined by the standard?! Just add that line anyway! Then
there's no need to go check what was meant. This way it is *there*,
*explicit* and everyone *knows* what is meant - even people who don't
sleep with C99std under their pillow.

It is not like we're saving code since the mov $0 gets issued by the
compiler anyway when it is on the stack:

movq $0, -48(%rbp) #, info
movq $0, -40(%rbp) #, info
movq $0, -32(%rbp) #, info
movq $0, -24(%rbp) #, info

Thanks.

--
Regards/Gruss,
Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/