Re: [PATCH 5/9] staging: ks7010: Delete unnecessary uses of the variable "retval"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>> @@ -90,7 +90,6 @@ static int ks7010_sdio_write(struct ks_wlan_private *priv, unsigned int address,
>>>  void ks_wlan_hw_sleep_doze_request(struct ks_wlan_private *priv)
>>>  {
>>>  	unsigned char rw_data;
>>> -	int retval;
>>>
>>>  	DPRINTK(4, "\n");
>>>
>>> @@ -99,9 +98,10 @@ void ks_wlan_hw_sleep_doze_request(struct ks_wlan_private *priv)
>>>
>>>  	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.

Would you try an other source code formatting for the suggested change pattern?

Regards,
Markus
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux