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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux