Re: [PATCH v5 04/14] tables.h: add linker table support
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>, hpa@xxxxxxxxx
- Subject: Re: [PATCH v5 04/14] tables.h: add linker table support
- From: "Luis R. Rodriguez" <mcgrof@xxxxxxxxxx>
- Date: Tue, 3 Jan 2017 22:25:28 +0100
- Cc: "Luis R. Rodriguez" <mcgrof@xxxxxxxxxx>, acme@xxxxxxxxxx, tglx@xxxxxxxxxxxxx, mingo@xxxxxxxxxx, jpoimboe@xxxxxxxxxx, bp@xxxxxxxxx, npiggin@xxxxxxxxx, mhiramat@xxxxxxxxxx, masami.hiramatsu.pt@xxxxxxxxxxx, jbaron@xxxxxxxxxx, heiko.carstens@xxxxxxxxxx, ananth@xxxxxxxxxxxxxxxxxx, anil.s.keshavamurthy@xxxxxxxxx, davem@xxxxxxxxxxxxx, realmz6@xxxxxxxxx, dalias@xxxxxxxx, linux@xxxxxxxxxxxxxxxx, x86@xxxxxxxxxx, luto@xxxxxxxxxxxxxx, keescook@xxxxxxxxxxxx, linux@xxxxxxxxxxxx, torvalds@xxxxxxxxxxxxxxxxxxxx, gregkh@xxxxxxxxxxxxxxxxxxx, rusty@xxxxxxxxxxxxxxx, gnomes@xxxxxxxxxxxxxxxxxxx, alan@xxxxxxxxxxxxxxx, dwmw2@xxxxxxxxxxxxx, arnd@xxxxxxxx, ming.lei@xxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, benh@xxxxxxxxxxxxxxxxxxx, pebolle@xxxxxxxxxx, fontana@xxxxxxxxxxxxxxx, david.vrabel@xxxxxxxxxx, konrad.wilk@xxxxxxxxxx, mcb30@xxxxxxxx, jgross@xxxxxxxx, andrew.cooper3@xxxxxxxxxx, paul.gortmaker@xxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, ak@xxxxxxxxxxxxxxx, pali.rohar@xxxxxxxxx, dvhart@xxxxxxxxxxxxx, platform-driver-x86@xxxxxxxxxxxxxxx, mmarek@xxxxxxxx, linux@xxxxxxxxxxxxxxxxxx, jkosina@xxxxxxx, korea.drzix@xxxxxxxxx, linux-kbuild@xxxxxxxxxxxxxxx, tony.luck@xxxxxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, catalin.marinas@xxxxxxx, will.deacon@xxxxxxx, rostedt@xxxxxxxxxxx, jani.nikula@xxxxxxxxx, mchehab@xxxxxxxxxxxxxxx, markus.heiser@xxxxxxxxxxx, jolsa@xxxxxxxxxx, msalter@xxxxxxxxxx, chris@xxxxxxxxxx, jcmvbkbc@xxxxxxxxx, linux-xtensa@xxxxxxxxxxxxxxxx, adrian.hunter@xxxxxxxxx, dsahern@xxxxxxxxx, namhyung@xxxxxxxxxx, wangnan0@xxxxxxxxxx, dmitry.torokhov@xxxxxxxxx, joro@xxxxxxxxxx, paulus@xxxxxxxxx, mpe@xxxxxxxxxxxxxx, James.Bottomley@xxxxxxxxxxxxxxxxxxxxx
- In-reply-to: <1482415098.9552.123.camel@linux.intel.com>
- References: <1471642454-5679-1-git-send-email-mcgrof@kernel.org> <20161222023811.21246-1-mcgrof@kernel.org> <20161222023811.21246-5-mcgrof@kernel.org> <1482415098.9552.123.camel@linux.intel.com>
- User-agent: Mutt/1.6.0 (2016-04-01)
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
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]