lkml.org 
[lkml]   [2013]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 8/8] ACPI / trace: Add trace interface for eMCA driver
On Fri, Oct 11, 2013 at 06:14:36PM +0200, Borislav Petkov wrote:
> Date: Fri, 11 Oct 2013 18:14:36 +0200
> From: Borislav Petkov <bp@alien8.de>
> To: "Chen, Gong" <gong.chen@linux.intel.com>
> Cc: tony.luck@intel.com, linux-kernel@vger.kernel.org,
> linux-acpi@vger.kernel.org
> Subject: Re: [PATCH 8/8] ACPI / trace: Add trace interface for eMCA driver
> User-Agent: Mutt/1.5.21 (2010-09-15)
>
...
> > +static void dimm_err_location(struct cper_sec_mem_err *mem)
> > +{
> > + memset(dimm_location, 0, LOC_LEN);
> > + if (mem->validation_bits & CPER_MEM_VALID_MODULE_HANDLE) {
>
> By reversing this test you can save yourself an indentation level and a
> superfluous memset:
>
> if (!(mem->validation_bits & CPER_MEM_VALID_MODULE_HANDLE))
> return;
>
> memset(dimm_location, 0, LOC_LEN);
> dmi_memdev_name...
> ...
>
>
memset should be called before return, otherwise the values from last time
will happen again in this time.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2013-10-14 09:41    [W:0.133 / U:1.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site