From: Subject: Re: Add restart support to i2c-pnx Date: Thu, 03 Feb 2011 08:54:30 +0100 Message-ID: References: <20110202134102.1fd5b68d@endymion.delvare> <083DF309106F364B939360100EC290F80B0E17D10F@eu1rdcrdc1wx030.exi.nxp.com> <1296681822.15861.3.camel@orion> <20110202222404.GW15795@trinity.fluff.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: In-Reply-To: <20110202222404.GW15795-SMNkleLxa3Z6Wcw2j4pizdi2O/JbrIOy@public.gmane.org> Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Ben Dooks Cc: Kevin Wells , Jean Delvare , Vitaly Wool , linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-i2c@vger.kernel.org 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