lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YtU6a+bIpgpyScsL@google.com>
Date:   Mon, 18 Jul 2022 10:48:11 +0000
From:   Tzung-Bi Shih <tzungbi@...nel.org>
To:     Guenter Roeck <groeck@...gle.com>
Cc:     Benson Leung <bleung@...omium.org>,
        Guenter Roeck <groeck@...omium.org>,
        "open list:CHROME HARDWARE PLATFORM SUPPORT" 
        <chrome-platform@...ts.linux.dev>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        kernel test robot <lkp@...el.com>
Subject: Re: [PATCH] platform/chrome: cros_kbd_led_backlight: fix build
 warning

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@...nel.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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ