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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 1 Apr 2016 09:38:40 -0700
From:	Peter Hurley <peter@...leysoftware.com>
To:	Dominique van den Broeck <domdevlin@...e.fr>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Shraddha Barke <shraddha.6596@...il.com>,
	Radek Dostal <rd@...ekdostal.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] staging: fwserial: (coding style) Rewriting a call to
 a long function

Hi Dominique,

On 03/29/2016 10:14 AM, Dominique van den Broeck wrote:
> Fixing a lone row exceeding 80 columns so the only remaining warnings
> emitted by checkpatch.pl are missing comments on spinlocks and memory
> barriers.
> 
> Signed-off-by: Dominique van den Broeck <domdevlin@...e.fr>
> ---
>  drivers/staging/fwserial/fwserial.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/fwserial/fwserial.c b/drivers/staging/fwserial/fwserial.c
> index 4dd5304..c5f73ef 100644
> --- a/drivers/staging/fwserial/fwserial.c
> +++ b/drivers/staging/fwserial/fwserial.c
> @@ -1343,9 +1343,11 @@ static int fwtty_break_ctl(struct tty_struct *tty, int state)
>  
>  	if (state == -1) {
>  		set_bit(STOP_TX, &port->flags);
> -		ret = wait_event_interruptible_timeout(port->wait_tx,
> -					       !test_bit(IN_TX, &port->flags),
> -					       10);
> +		ret =
> +		wait_event_interruptible_timeout(port->wait_tx,
> +						 !test_bit(IN_TX, &port->flags),
> +						 10);
> +

I don't see a > 80-col line here?

And even if I did, this change would be super-ugly.
The preferred way to reduce this is to fold it into a helper function, like

	if (state == -1 && fwtty_wait_tx_complete(port))
		return -EINTR;


Regards,
Peter Hurley

>  		if (ret == 0 || ret == -ERESTARTSYS) {
>  			clear_bit(STOP_TX, &port->flags);
>  			fwtty_restart_tx(port);
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ