Re: [PATCH -tip] x86: mm/init_32.c fix style problems

From: Ingo Molnar
Date: Sun Jun 21 2009 - 07:35:53 EST



* Jaswinder Singh Rajput <jaswinder@xxxxxxxxxx> wrote:

>
> Impact: cleanup
>
> Fix :
>
> WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
> ERROR: do not initialise externals to 0 or NULL
> ERROR: code indent should use tabs where possible
> ERROR: space required after that ',' (ctx:VxV)
> ERROR: spaces required around that ':' (ctx:ExV) X 3
>
> total: 6 errors, 1 warning
>
> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@xxxxxxxxx>
> ---
> arch/x86/mm/init_32.c | 14 +++++++-------
> 1 files changed, 7 insertions(+), 7 deletions(-)

Just like with hugetlbpage.c, this file too has other problems
beyond trivial style issues:

- one_page_table_init() logic should be restructured to have its
branch condition inverted into a goto out pattern, to get rid of
the ugly linebreaks.

- that ugly check in page_table_kmap_check() should be factored out
into a helper inline

- kernel_physical_mapping_init() is too large and should have its
innards factored out into one or more helper inlines.

- there's too many #idefs obscuring the easy readability of the
code. Could some be eliminated?

Some style issues as well:

- printk(KERN_* should be converted to pr_*(

- the #include files section looks unstructured and ugly. Please
take a look at arch/x86/mm/fault.c and try to eliminate all
unnecessary include lines and follow the format of fault.c.

These (and other issues) should be addressed as well, so that we
have a single act of churn there, followed by a quality end result.

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/