From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Peter Cai <peter@typeblog.net>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>,
Bastien Nocera <hadess@hadess.net>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Len Brown <lenb@kernel.org>,
linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-input@vger.kernel.org
Subject: Re: [PATCH 2/2] touchscreen: goodix: define GPIO mapping for GPD P2 Max
Date: Fri, 30 Aug 2019 21:16:59 +0300 [thread overview]
Message-ID: <20190830181659.GO2680@smile.fi.intel.com> (raw)
In-Reply-To: <CA+Zf_0etfu7282TQ4wYE8tOrhh2Je4aV4Dz5tgC_wt7=FMAidA@mail.gmail.com>
On Fri, Aug 30, 2019 at 11:15:27PM +0800, Peter Cai wrote:
> On Fri, Aug 30, 2019, 7:55 PM Andy Shevchenko <
> andriy.shevchenko@linux.intel.com> wrote:
> > I guess most of these #ifdef:s makes code less readable for exchange of
> saving
> few bytes in the module footprint.
>
> Well since they can only be used when ACPI is supported
> (devm_acpi_dev_add_driver_gpios does not exist without ACPI defined, thus
> the last guard must exist),
This is not correct.
> if they were not guarded then we would be left
> with a bunch of unused variables warnings when building without ACPI which
> doesn't seem good.
Good / no-good is only matter of few dozens of bytes here and there to be saved.
> Should we use __maybe_unused here instead of #ifdef guards?
No, it won't make sense, because the structures will be part of
_add_driver_gpio() call, due to which compiler likely can't recognize unused
structures. However, you may try with warnings enabled `make W=1`.
> > Comma at the end?
>
> I was trying to follow the style of this driver but it doesn't seem to be
> really consistent within itself. Another dmi_system_id definition in the
> same file mixed both styles so I was kind of confused.
I see. So, this is for Dmitry's preferences.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2019-08-30 18:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-30 0:00 [PATCH 1/2] gpio: acpi: add quirk to override GpioInt polarity Peter Cai
2019-08-30 0:00 ` [PATCH 2/2] touchscreen: goodix: define GPIO mapping for GPD P2 Max Peter Cai
2019-08-30 11:55 ` Andy Shevchenko
2019-08-30 15:32 ` Peter Cai
[not found] ` <CA+Zf_0etfu7282TQ4wYE8tOrhh2Je4aV4Dz5tgC_wt7=FMAidA@mail.gmail.com>
2019-08-30 18:16 ` Andy Shevchenko [this message]
2019-09-02 6:35 ` kbuild test robot
2019-08-30 11:42 ` [PATCH 1/2] gpio: acpi: add quirk to override GpioInt polarity Andy Shevchenko
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=20190830181659.GO2680@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=bgolaszewski@baylibre.com \
--cc=dmitry.torokhov@gmail.com \
--cc=hadess@hadess.net \
--cc=lenb@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=peter@typeblog.net \
--cc=rjw@rjwysocki.net \
/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).