[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH v5 04/14] tables.h: add linker table support
- To: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>, hpa@xxxxxxxxx
- From: "Luis R. Rodriguez" <mcgrof@xxxxxxxxxx>
- Date: Tue, 3 Jan 2017 22:25:28 +0100
- Cc: gnomes@xxxxxxxxxxxxxxxxxxx, dalias@xxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, jkosina@xxxxxxx, benh@xxxxxxxxxxxxxxxxxxx, ming.lei@xxxxxxxxxxxxx, heiko.carstens@xxxxxxxxxx, platform-driver-x86@xxxxxxxxxxxxxxx, James.Bottomley@xxxxxxxxxxxxxxxxxxxxx, paul.gortmaker@xxxxxxxxxxxxx, paulus@xxxxxxxxx, mpe@xxxxxxxxxxxxxx, masami.hiramatsu.pt@xxxxxxxxxxx, wangnan0@xxxxxxxxxx, mchehab@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, markus.heiser@xxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, linux@xxxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, will.deacon@xxxxxxx, korea.drzix@xxxxxxxxx, x86@xxxxxxxxxx, anil.s.keshavamurthy@xxxxxxxxx, fontana@xxxxxxxxxxxxxxx, mingo@xxxxxxxxxx, dsahern@xxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, catalin.marinas@xxxxxxx, dvhart@xxxxxxxxxxxxx, dwmw2@xxxxxxxxxxxxx, linux@xxxxxxxxxxxx, david.vrabel@xxxxxxxxxx, linux-xtensa@xxxxxxxxxxxxxxxx, pali.rohar@xxxxxxxxx, keescook@xxxxxxxxxxxx, arnd@xxxxxxxx, realmz6@xxxxxxxxx, jani.nikula@xxxxxxxxx, linux@xxxxxxxxxxxxxxxxxx, rusty@xxxxxxxxxxxxxxx, npiggin@xxxxxxxxx, acme@xxxxxxxxxx, jbaron@xxxxxxxxxx, ananth@xxxxxxxxxxxxxxxxxx, bp@xxxxxxxxx, rostedt@xxxxxxxxxxx, jpoimboe@xxxxxxxxxx, namhyung@xxxxxxxxxx, tglx@xxxxxxxxxxxxx, mcb30@xxxxxxxx, linux-kbuild@xxxxxxxxxxxxxxx, alan@xxxxxxxxxxxxxxx, jgross@xxxxxxxx, chris@xxxxxxxxxx, pebolle@xxxxxxxxxx, tony.luck@xxxxxxxxx, jcmvbkbc@xxxxxxxxx, gregkh@xxxxxxxxxxxxxxxxxxx, dmitry.torokhov@xxxxxxxxx, adrian.hunter@xxxxxxxxx, luto@xxxxxxxxxxxxxx, ak@xxxxxxxxxxxxxxx, "Luis R. Rodriguez" <mcgrof@xxxxxxxxxx>, mmarek@xxxxxxxx, msalter@xxxxxxxxxx, mhiramat@xxxxxxxxxx, jolsa@xxxxxxxxxx, andrew.cooper3@xxxxxxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx, torvalds@xxxxxxxxxxxxxxxxxxxx, davem@xxxxxxxxxxxxx, joro@xxxxxxxxxx
- Delivery-date: Tue, 03 Jan 2017 21:26:02 +0000
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
On Thu, Dec 22, 2016 at 03:58:18PM +0200, Andy Shevchenko wrote:
> On Wed, 2016-12-21 at 18:38 -0800, Luis R. Rodriguez wrote:
> > +#define LINKTABLE_FOR_EACH(pointer, tbl)
>
> Hmm... SOMEONE LIKES CAPITAL LETTERS FOR everything, right? :-)
>
> I would expect more standard linktable_for_each() macro
hpa had recommended this, if he prefers a lower case I can change that
but I really do consider this bikeshedding.
> Same to the rest of similar macros.
Same answer here.
> > +/**
> > + * LINKTABLE_RUN_ERR - run each linker table entry func and return
> > error if any
> > + *
> > + * @tbl: linker table
> > + * @func: structure name for the function name we want to call.
> > + * @args...: arguments to pass to func
> > + *
> > + * Example usage::
> > + *
> > + * unsigned int err = LINKTABLE_RUN_ERR(frobnicator_fns,
> > some_run,);
> > + */
> > +#define LINKTABLE_RUN_ERR(tbl, func, args...)
> > \
> > +({
> > \
> > + size_t i;
> > \
> > + int err = 0;
> > \
> > + for (i = 0; !err && i < LINKTABLE_SIZE(tbl); i++)
> > \
> > + err = (LINKTABLE_START(tbl)[i]).func (args);
>
>
> > \
> > + err;
>
> Indentation here a bit confusing.
Ah yes, good catch, fixed.
Luis
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|