From: Tzung-Bi Shih <tzungbi@kernel.org>
To: Guenter Roeck <groeck@google.com>
Cc: Benson Leung <bleung@chromium.org>,
Guenter Roeck <groeck@chromium.org>,
"open list:CHROME HARDWARE PLATFORM SUPPORT"
<chrome-platform@lists.linux.dev>,
linux-kernel <linux-kernel@vger.kernel.org>,
kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] platform/chrome: cros_kbd_led_backlight: fix build warning
Date: Mon, 18 Jul 2022 10:48:11 +0000 [thread overview]
Message-ID: <YtU6a+bIpgpyScsL@google.com> (raw)
In-Reply-To: <CABXOdTeH-q=17QBnCn5NGT5V0QA5SOaTnrWaK+g5F3j4mVp8cA@mail.gmail.com>
On Sun, Jul 17, 2022 at 11:54:31PM -0700, Guenter Roeck wrote:
> On Sun, Jul 17, 2022 at 11:16 PM Tzung-Bi Shih <tzungbi@kernel.org> wrote:
> >
> > drivers/platform/chrome/cros_kbd_led_backlight.c got a new build warning
> > when using the randconfig in [1]:
> > >>> warning: unused variable 'keyboard_led_drvdata_ec_pwm'
> >
> > The warning happens when CONFIG_CROS_EC is set but CONFIG_OF is not set.
> > Reproduce:
> > - mkdir build_dir
> > - wget [1] -O build_dir/.config
> > - COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 \
> > O=build_dir ARCH=s390 SHELL=/bin/bash drivers/platform/chrome/
> >
>
> Have you tried the following ?
> CONFIG_ACPI=y
> CONFIG_CROS_EC=n
> CONFIG_OF=y
>
> That should be possible, but with your patch it should now result in a
> build error because keyboard_led_drvdata_ec_pwm is no longer defined.
Hmm, just got another lkp robot's warning about the undeclared symbol. Will
fix it by using __maybe_unused in next version.
> Also, with your patch, CONFIG_CROS_EC=y, CONFIG_ACPI=y, and
> CONFIG_OF=n (ie Intel/AMD systems) would result in the code not being
> compiled, which would be wrong.
Intel and AMD systems rely on `keyboard_led_drvdata_acpi` but not
`keyboard_led_drvdata_ec_pwm` for now. They shouldn't be affected by the
patch.
In any cases, let's use __maybe_unused in next version.
prev parent reply other threads:[~2022-07-18 10:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-18 6:16 [PATCH] platform/chrome: cros_kbd_led_backlight: fix build warning Tzung-Bi Shih
2022-07-18 6:54 ` Guenter Roeck
2022-07-18 10:48 ` Tzung-Bi Shih [this message]
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=YtU6a+bIpgpyScsL@google.com \
--to=tzungbi@kernel.org \
--cc=bleung@chromium.org \
--cc=chrome-platform@lists.linux.dev \
--cc=groeck@chromium.org \
--cc=groeck@google.com \
--cc=linux-kernel@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