Re: [PATCH 3/10] I386 mcheck p4 grotesque and needless warning fix.patch

From: Chuck Ebbert
Date: Tue Apr 10 2007 - 10:07:38 EST


Zachary Amsden wrote:
> No, just no. You do not use goto to skip a code block. You do not
> return an obvious variable from a singly-inlined function and give
> the function a return value. You don't put unexplained comments
> about kmalloc in code which doesn't do dynamic allocation. And
> you don't leave stray warnings around for no good reason.
>
> Also, when possible, it is better to use block scoped variables
> because gcc can sometime generate better code.
>
> Signed-off-by: Zachary Amsden <zach@xxxxxxxxxx>
>
> diff -r ed741f57dae8 arch/i386/kernel/cpu/mcheck/p4.c
> --- a/arch/i386/kernel/cpu/mcheck/p4.c Fri Apr 06 14:29:52 2007 -0700
> +++ b/arch/i386/kernel/cpu/mcheck/p4.c Fri Apr 06 14:43:24 2007 -0700
> @@ -124,12 +124,9 @@ static void intel_init_thermal(struct cp
>
>
> /* P4/Xeon Extended MCE MSR retrieval, return 0 if unsupported */
> -static inline int intel_get_extended_msrs(struct intel_mce_extended_msrs *r)
> +static inline void intel_get_extended_msrs(struct intel_mce_extended_msrs *r)
> {

The comment needs fixing.


-
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/