Re: [PATCH 5/5] kernel: tracepoints: add support for relative references

From: Ingo Molnar
Date: Fri Aug 18 2017 - 13:58:51 EST



* Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx> wrote:

> On 18 August 2017 at 09:36, Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx> wrote:
> > On 18 August 2017 at 09:26, Ingo Molnar <mingo@xxxxxxxxxx> wrote:
> >>
> >> * Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx> wrote:
> >>
> >>> -static void for_each_tracepoint_range(struct tracepoint * const *begin,
> >>> - struct tracepoint * const *end,
> >>> +static void for_each_tracepoint_range(const void *begin, const void *end,
> >>> void (*fct)(struct tracepoint *tp, void *priv),
> >>> void *priv)
> >>> {
> >>> +#ifdef CONFIG_HAVE_ARCH_PREL32_RELOCATIONS
> >>> + const signed int *iter;
> >>> +
> >>> + if (!begin)
> >>> + return;
> >>> + for (iter = begin; iter < (signed int *)end; iter++) {
> >>> + fct((struct tracepoint *)((unsigned long)iter + *iter), priv);
> >>> + }
> >>
> >> I think checkpatch is correct here to complain about the unnecessary curly braces
> >> here.
> >>
> >
> > Fair enough. I will clean up to the extent feasible.
> >
>
> OK, in an honest attempt to at least remove as many of the checkpatch
> errors as I can, [...]

Note that I actually agreed with your list of checkpatch bogosities - the one I
commented on was the only thing that needed fixing, IMHO.

Thanks,

Ingo