From: Hans de Goede <hdegoede@redhat.com>
To: Bastien Nocera <hadess@hadess.net>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, kbuild test robot <lkp@intel.com>
Subject: Re: [PATCH] Input: goodix - Fix compilation when ACPI support is disabled
Date: Wed, 25 Mar 2020 15:05:52 +0100 [thread overview]
Message-ID: <3ed2db45-0fd6-694e-023d-427cb8854f81@redhat.com> (raw)
In-Reply-To: <be555dbf9c8508c5b8d9ed561384c66d76326241.camel@hadess.net>
Hi,
On 3/25/20 3:02 PM, Bastien Nocera wrote:
> 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".
If that is the problem I would prefer adding:
/* Our special handling for GPIO accesses through ACPI is x86 specific */
#if defined CONFIG_X86 && defined CONFIG_ACPI
#define ACPI_GPIO_SUPPORT
#endif
And use:
#ifdef ACPI_GPIO_SUPPORT
Elsewhere.
Would that work for you?
Regards,
Hans
next prev parent reply other threads:[~2020-03-25 14:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-25 10:33 [PATCH] Input: goodix - Fix compilation when ACPI support is disabled Hans de Goede
2020-03-25 10:47 ` Bastien Nocera
2020-03-25 11:49 ` Hans de Goede
2020-03-25 12:11 ` Bastien Nocera
2020-03-25 13:55 ` Hans de Goede
2020-03-25 14:02 ` Bastien Nocera
2020-03-25 14:05 ` Hans de Goede [this message]
2020-03-25 14:10 ` Bastien Nocera
2020-03-25 14:55 ` Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3ed2db45-0fd6-694e-023d-427cb8854f81@redhat.com \
--to=hdegoede@redhat.com \
--cc=dmitry.torokhov@gmail.com \
--cc=hadess@hadess.net \
--cc=linux-input@vger.kernel.org \
--cc=lkp@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).