Re: [thisops uV2 03/10] percpu: Generic support forthis_cpu_add,sub,dec,inc_return

From: Christoph Lameter
Date: Mon Nov 29 2010 - 11:09:11 EST


On Sat, 27 Nov 2010, Mathieu Desnoyers wrote:

> >
> > +#define __pcpu_size_call_return2(stem, variable, ...) \
> > +({ typeof(variable) pscr_ret__; \
>
> isn't it usual to do ?
>
> ( { \
> typeof(variable) pscr_ret__; \
>
> instead ?

Not in macros like this as far as I can tell but I can change it.

> > + switch(sizeof(variable)) { \
> > + case 1: pscr_ret__ = stem##1(variable, __VA_ARGS__);break; \
>
> ;break; at the EOL seems a bit odd. Maybe moving it to the next line ?

Again this seems to be common in macros like this.

>
> > + preempt_disable(); \
> > + __this_cpu_add((pcp), val); \
>
> Hrm, you are inconsistent between your macros. Here you use "(pcp), " but above:
> "(variable, ". I think the extra () are not needed in this case, so you might
> want to consider removing these from (pcp).

Hmmm... I will try to straighten that out.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/