lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 11 Oct 2019 07:49:28 -0700
From:   Joe Perches <joe@...ches.com>
To:     Robert Richter <rrichter@...vell.com>
Cc:     Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
        Borislav Petkov <bp@...en8.de>,
        Tony Luck <tony.luck@...el.com>,
        James Morse <james.morse@....com>,
        "linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 05/19] EDAC, mc: Reduce indentation level in
 edac_mc_handle_error()

On Fri, 2019-10-11 at 12:08 +0000, Robert Richter wrote:
> On 11.10.19 03:50:23, Joe Perches wrote:
> > On Fri, 2019-10-11 at 07:20 -0300, Mauro Carvalho Chehab wrote:
> > > Em Thu, 10 Oct 2019 15:10:53 -0700 Joe Perches <joe@...ches.com> escreveu:
> > > > On Thu, 2019-10-10 at 20:25 +0000, Robert Richter wrote:
> > > > > Reduce the indentation level in edac_mc_handle_error() a bit by using
> > > > > continue. No functional changes.  
> > > > 
> > > > Seems fine, but trivially below:
> > > > 
> > > > > diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c  
> > > > []
> > > > > @@ -1171,37 +1171,38 @@ void edac_mc_handle_error(const enum hw_event_mc_err_type type,  
> > > > []
> > > > > +		strcpy(p, dimm->label);
> > > > > +		p += strlen(p);
> > > > > +		*p = '\0';  
> > > > 
> > > > This *p = '\0' is unnecessary as the strcpy already did that.
> > > 
> > > True, but better to put it on a separate patch, as it makes
> > > easier to review if you don't mix code de-indent with changes.
> > > 
> > > Also, maybe there are other occurrences of this pattern.
> > 
> > Maybe 80 or so uses of paired
> > 
> > 	strcpy(foo, bar);
> > 	strlen(foo)
> > 
> > where another function like stpcpy, which doesn't exist
> > in the kernel, could have been used.
> 
> Under drivers/edac/ I found this one place only.
> 
> So I could create a separate patch as a oneliner with that (trivial)
> change?

Of course yes.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ