Re: [patch] x86, mm: Clean up initmem_init

From: Cyrill Gorcunov
Date: Fri Mar 04 2011 - 07:38:50 EST


On Fri, Mar 4, 2011 at 10:08 AM, Ingo Molnar <mingo@xxxxxxx> wrote:
...
>>
>> It's a matter of style and I think it's up to Ingo what he'd prefer to
>> see.
>
> I think your variant is cleaner: hiding function call side-effects in conditionscan
> be a fragile thing to do. We want constant expressions with no side-effects - so if
> functions are called they should be constant functions as well.

Well, we do it a lot with say strcmp and others so I would use rather
semantic argument,
but I agree that David's version is easier to read and mark same time
that these functions
are important steps in bootup procedure. So I'm sorry for proposing
this change in first place.

>
> Code compactness isn't everything - if it was we'd be using C to the max to create
> unreadable compound expressions all the time.
>
> Thanks,
>
>        Ingo
>
--
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/