Re: [Patch 1/8] Setup

Balbir Singh
2006-05-09T03:59:51Z

On Mon, May 08, 2006 at 02:23:22PM -0700, Andrew Morton wrote:
> Balbir Singh <balbir@in.ibm.com> wrote:
> >
> > +static inline void delayacct_end(struct timespec *start, struct timespec *end,
> > + u64 *total, u32 *count)
> > +{
> > + struct timespec ts = {0, 0};
> > + s64 ns;
> > +
> > + do_posix_clock_monotonic_gettime(end);
> > + timespec_sub(&ts, start, end);
> > + ns = timespec_to_ns(&ts);
> > + if (ns < 0)
> > + return;
> > +
> > + spin_lock(&current->delays->lock);
> > + *total += ns;
> > + (*count)++;
> > + spin_unlock(&current->delays->lock);
> > +}
>
> - too large to be inlined

I will un-inline it.

>
> - The initialisation of `ts' is unneeded (maybe it generated a bogus
> warning, but it won't do that if you switch timespec_sub to
> return-by-value)

gcc-4.1 does generate a bogus warning. I will switch to return by value
and remove the initialization of `ts'

Thanks,
Balbir Singh,
Linux Technology Center,
IBM Software Labs