Re: Add restart support to i2c-pnx

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

 



Ben,

>> -	struct i2c_pnx_algo_data *alg_data)
>> +	struct i2c_pnx_algo_data *alg_data, int repeated)
> 
> bool repeated.

I don't agree.
Since this is C and C++, we do not have a bool keyword.
And, there is no variable declared as bool in the source file this 
is why and defined this as int and not as bool.

>> +	if ((!repeated) && (wait_timeout(I2C_PNX_TIMEOUT, alg_data))) {
> 
> no need for () around !repeated.

Agreed, but for the clarity sake.

>> +		if((i > 0) && !(pmsg->flags & I2C_M_NOSTART))
> 
> no need for () around i > 0

Same as above. I my opinion it is better to use more parentheses then
fewer, since you do not rely on compiler implementation.

Regards,
Matej


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


[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux