On Fri, 20 Feb 2009 12:45:46 +0100, Jean Delvare wrote:
> On Thu, 19 Feb 2009 22:23:25 +0100, Clifford Wolf wrote:
> > Hi Jean,
> >
> > On Thu, Feb 19, 2009 at 05:26:05PM +0100, Jean Delvare wrote:
> > > > @@ -1000,7 +1000,8 @@ module_exit(i2c_exit);
> > > > */
> > > > int i2c_transfer(struct i2c_adapter * adap, struct i2c_msg *msgs, int
> > > > num)
> > > > {
> > > > - int ret;
> > > > + unsigned long orig_jiffies = jiffies;
> > >
> > > I think you should initialize orig_jiffies *after* you get the bus
> > > lock. Otherwise the behavior depends on how long you had to wait to get
> > > control of the bus. Or was is intended?
> >
> > phew! this is a good question...
> >
> > to be honest: I haven't thought about that one yet.
> >
> > I think both approaches (including the wait for the lock in the timeout on
> > the one hand and just counting the time spent after getting the lock on the
> > other hand) would be valid..
> >
> > But I think it would be better to not include the wait-for-lock time and
> > move the initialization of orig_jiffies to after locking the mutex.
>
> I agree... Please send an updated patch.
Clifford, any news? I didn't get any update for this patch. If I don't
get one soon, I'll have to just discard it.
--
Jean Delvare
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html