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: <CACRpkdYDWGN3iJbEP9F_8vw1+R-farPbKT6x9ZqyksH6cQ4fTA@mail.gmail.com>
Date:   Wed, 2 Dec 2020 00:06:10 +0100
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Pawan Gupta <writetopawan@...il.com>, He Zhe <zhe.he@...driver.com>
Cc:     "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Drew Fustini <drew@...gleboard.org>
Subject: Re: [PATCH] pinctrl: core: Fix unused variable build warnings

On Mon, Nov 23, 2020 at 11:41 PM Pawan Gupta <writetopawan@...il.com> wrote:

> A recent commit f1b206cf7c57 ("pinctrl: core: print gpio in pins debugfs
> file") added build warnings when CONFIG_GPIOLIB=n. Offcourse the kernel
> fails to build when warnings are treated as errors. Below is the error
> message:
>
>   $ make CFLAGS_KERNEL+=-Werror
>
>   drivers/pinctrl/core.c: In function ‘pinctrl_pins_show’:
>   drivers/pinctrl/core.c:1607:20: error: unused variable ‘chip’ [-Werror=unused-variable]
>    1607 |  struct gpio_chip *chip;
>         |                    ^~~~
>   drivers/pinctrl/core.c:1606:15: error: unused variable ‘gpio_num’ [-Werror=unused-variable]
>    1606 |  unsigned int gpio_num;
>         |               ^~~~~~~~
>   drivers/pinctrl/core.c:1605:29: error: unused variable ‘range’ [-Werror=unused-variable]
>    1605 |  struct pinctrl_gpio_range *range;
>         |                             ^~~~~
>   cc1: all warnings being treated as errors
>
> These variables are only used inside #ifdef CONFIG_GPIOLIB, fix the
> build warnings by wrapping the definition inside the config.
>
> Fixes: f1b206cf7c57 ("pinctrl: core: print gpio in pins debugfs file")
> Signed-off-by: Pawan Gupta <writetopawan@...il.com>

This was fixed in
commit b507cb92477ad85902783a183c5ce01d16296687
"pinctrl: core: Add missing #ifdef CONFIG_GPIOLIB"
On october 28.

Thanks anyways!

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ