Messages in this thread | | | Date | Mon, 14 Oct 2013 03:07:27 -0400 | From | Chen Gong <> | Subject | Re: [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] | |