staging: ks7010: Delete unnecessary uses of the variable "retval"

Wolfram Sang wsa at the-dreams.de
Thu Jul 21 16:37:14 UTC 2016


On Thu, Jul 21, 2016 at 03:35:03PM +0200, SF Markus Elfring wrote:
> >>>>>  	if (atomic_read(&priv->sleepstatus.status) == 0) {
> >>>>>  		rw_data = GCR_B_DOZE;
> >>>>> -		retval =
> >>>>> -		    ks7010_sdio_write(priv, GCR_B, &rw_data, sizeof(rw_data));
> >>>>> -		if (retval) {
> >>>>> +		if (ks7010_sdio_write(priv,
> >>>>> +				      GCR_B,
> >>>>> +				      &rw_data,
> >>>>> +				      sizeof(rw_data))) {
> >>>>
> >>>> A multi-line function call in an if test does not look nice at all.  The
> >>>> original code was an easy-to-read expectable pattern.
> >>>
> >>> I agree. I am not strict on the 80 char limit, especially in cases like
> >>> the above.
> 
> Will this line length limitation trigger any more collateral evolution
> in the discussed software module?
> 
> 
> >> Would you try an other source code formatting for the suggested change pattern?
> > 
> > I don't understand the question?
> 
> Can you follow expectations around the proposed refactoring of any
> function implementations?

I don't understand both questions. Maybe you need to give examples?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20160721/52342b31/attachment.asc>


More information about the devel mailing list