[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170818082616.vyk5z5s2kicc66ip@gmail.com>
Date: Fri, 18 Aug 2017 10:26:16 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Ard Biesheuvel <ard.biesheuvel@...aro.org>
Cc: linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
"H. Peter Anvin" <hpa@...or.com>, Arnd Bergmann <arnd@...db.de>,
Heiko Carstens <heiko.carstens@...ibm.com>,
Kees Cook <keescook@...omium.org>,
Will Deacon <will.deacon@....com>,
Michael Ellerman <mpe@...erman.id.au>,
Thomas Garnier <thgarnie@...gle.com>,
Thomas Gleixner <tglx@...utronix.de>,
"Serge E. Hallyn" <serge@...lyn.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Catalin Marinas <catalin.marinas@....com>,
Petr Mladek <pmladek@...e.com>, Ingo Molnar <mingo@...hat.com>,
James Morris <james.l.morris@...cle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Nicolas Pitre <nico@...aro.org>,
Steven Rostedt <rostedt@...dmis.org>,
Martin Schwidefsky <schwidefsky@...ibm.com>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Jessica Yu <jeyu@...nel.org>
Subject: Re: [PATCH 5/5] kernel: tracepoints: add support for relative
references
* Ard Biesheuvel <ard.biesheuvel@...aro.org> 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.
Plus why the heavy use of 'signed int' here and elsewhere in the patches - why
not 'int' ?
Plus #2, the heavy use of type casts looks pretty ugly to begin with - is there no
way to turn this into more natural code?
Thanks,
Ingo
Powered by blists - more mailing lists