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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>
> 
> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux