[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a6a2afaa-566e-8376-7999-410c886211c6@nokia.com>
Date: Tue, 13 Mar 2018 19:24:59 +0100
From: Alexander Sverdlin <alexander.sverdlin@...ia.com>
To: Ard Biesheuvel <ard.biesheuvel@...aro.org>
CC: linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Russell King <linux@...linux.org.uk>,
Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH v4 2/2] ARM: ftrace: Add MODULE_PLTS support
Hi!
On 13/03/18 18:51, Ard Biesheuvel wrote:
>>> if (IS_ENABLED(CONFIG_ARM_MODULE_PLTS))
>>> module_plt_alloc_fixed();
>> Do you consider this a legal C code if without module-plts.o the function would not exist at all?
>> That's too much relying on optimizer I think...
>>
> Yes, we rely on that in many different places in the kernel.
https://www.kernel.org/doc/Documentation/process/coding-style.rst:
"However, this approach still allows the C compiler to see the code
inside the block, and check it for correctness (syntax, types, symbol
references, etc). Thus, you still have to use an #ifdef if the code inside the
block references symbols that will not exist if the condition is not met."
But we can of course ignore it.
--
Best regards,
Alexander Sverdlin.
Powered by blists - more mailing lists