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]
Message-ID: <20090724182905.GA4389@kroah.com>
Date:	Fri, 24 Jul 2009 11:29:05 -0700
From:	Greg KH <greg@...ah.com>
To:	Trevor Pace <trevorpace@...il.com>
Cc:	Sergei Shtylyov <sshtylyov@...mvista.com>,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Removed useless retval variables in usb-serial.c

On Fri, Jul 24, 2009 at 02:06:16PM -0300, Trevor Pace wrote:
>  int usb_serial_resume(struct usb_interface *intf)
>  {
>  	struct usb_serial *serial = usb_get_intfdata(intf);
> -	int rv;
> 
>  	serial->suspending = 0;
> -	if (serial->type->resume)
> -		rv = serial->type->resume(serial);
> -	else
> -		rv = usb_serial_generic_resume(serial);
> 
> -	return rv;
> +	return (serial->type->resume)
> +		? serial->type->resume(serial)
> +		: usb_serial_generic_resume(serial);

Sorry, but no, I'm not going to take something like this.

The first version is just so much more readable, and easier to
understand, which is the main point.  We want and need code to be easy
to read and understand at a very quick glance.  This change only makes
it harder to do so.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ