Re: Add restart support to i2c-pnx

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

 



On Thu, Feb 03, 2011 at 08:54:30AM +0100, matej.kupljen@xxxxxxxxx wrote:
> 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.

the kernel has this.
 
> >> +	if ((!repeated) && (wait_timeout(I2C_PNX_TIMEOUT, alg_data))) {
> > 
> > no need for () around !repeated.
> 
> Agreed, but for the clarity sake.

Makes it less clear, there's more on each line.
 
> >> +		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

-- 
Ben Dooks, ben@xxxxxxxxx, http://www.fluff.org/ben/

Large Hadron Colada: A large Pina Colada that makes the universe disappear.

--
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