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, 27 Jan 2017 13:39:05 +0100
From:   Johan Hovold <johan@...nel.org>
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     mrossibellom@...il.com, johan@...nel.org, elder@...nel.org,
        gregkh@...uxfoundation.org, greybus-dev@...ts.linaro.org,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] greybus: Fix coding stye error

On Fri, Jan 27, 2017 at 03:29:30PM +0300, Dan Carpenter wrote:
> On Fri, Jan 27, 2017 at 11:11:21AM +0100, mrossibellom@...il.com wrote:
> > From: Maxime Rossi Bellom <mrossibellom@...il.com>
> > 
> > Split line before funtion argument.
> > 
> > Error was reported by checkpatch.pl as
> > WARNING: line over 80 characters
> > 
> > Signed-off-by: Maxime Rossi Bellom <mrossibellom@...il.com>
> > ---
> >  drivers/staging/greybus/fw-management.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/staging/greybus/fw-management.c b/drivers/staging/greybus/fw-management.c
> > index 3cd6cf0..d88117e 100644
> > --- a/drivers/staging/greybus/fw-management.c
> > +++ b/drivers/staging/greybus/fw-management.c
> > @@ -516,7 +516,8 @@ static int fw_mgmt_ioctl(struct fw_mgmt *fw_mgmt, unsigned int cmd,
> >  		 */
> >  		fw_mgmt->mode_switch_started = true;
> >  
> > -		ret = gb_interface_request_mode_switch(fw_mgmt->connection->intf);
> > +		ret = gb_interface_request_mode_switch(
> > +				fw_mgmt->connection->intf);
> 
> 
> Another option would be to change the name from
> gb_interface_request_mode_switch() to gb_get_mode_switch() or something
> along those lines.  It requires understanding the code to say what a
> good name is.

Indeed, and please do not rename this function.

Adding a temporary variable for the interface pointer would be a better
way to deal with this if anyone is really bothered by this long line.

In fact, it may even be possible to just use connection->intf here in
this case.

But I'd just leave it as is.

Thanks,
Johan

Powered by blists - more mailing lists