Re: [PATCH][delayacct] Fix the timespec_sub() interface (was Re: [Patch 1/8] Setup)

Andrew Morton
2006-05-10T10:27:45Z

Balbir Singh <balbir@in.ibm.com> wrote:
>
> Please find the updated patch, which changes the interface of timespec_sub()
> as suggested in the review comments
>
> ...
>
> /*
> - * sub = end - start, in normalized form
> + * sub = lhs - rhs, in normalized form
> */
> -static inline void timespec_sub(struct timespec *start, struct timespec *end,
> - struct timespec *sub)
> +static inline struct timespec timespec_sub(struct timespec *lhs,
> + struct timespec *rhs)
> {

I'd have thought that it would be more consistent and a saner interface to
use pass-by-value:

static inline struct timespec timespec_sub(struct timespec lhs,
struct timespec rhs)

It should generate the same code.

I mentioned this last time - did you choose to not do this for some reason,
or did it just slip past?