Thread (9 messages) 9 messages, 2 authors, 2020-03-25

Re: [PATCH] Input: goodix - Fix compilation when ACPI support is disabled

From: Bastien Nocera <hadess@hadess.net>
Date: 2020-03-25 14:03:02

On Wed, 2020-03-25 at 14:55 +0100, Hans de Goede wrote:
We could do something like that, but TBH I'm not a fan of that

adding extra wrappers makes it harder to see what the code is

actually doing.



I understand your dislike for the extra braces I added and

I'm fine with fixing that by adding __maybe_unused to the

variable declarations at the top. I don't really see what

the problem with the #ifdef-s is given how clean they are,

with the braces thing fixed by using __maybe_unused things

would look like e.g. this:
It's not only the fact that there's extra #ifdef's, it's that the
ifdef's need to be just "that". It's not "#ifdef FOO", it's "#if
defined CONFIG_X86 && defined CONFIG_ACPI".

I'd really prefer a separate function(s) that would be the only
place(s) where the conditions would be, and with one-liner bodies, to
work-around the fact that those ACPI calls are only really half-
stubbed.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help