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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 22 Apr 2022 16:56:18 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Tom Rix <trix@...hat.com>
Cc:     "Rafael J. Wysocki" <rafael@...nel.org>,
        Len Brown <lenb@...nel.org>,
        ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ACPI: bgrt: use static for BGRT_SHOW kobj_attribute defines

On Thu, Apr 21, 2022 at 6:43 PM Tom Rix <trix@...hat.com> wrote:
>
> Smatch reports this repesentative issue
> bgrt.c:26:1: warning: symbol 'bgrt_attr_version' was not declared. Should it be static?
> Similar for *status,type,xoffset,yoffset
>
> These variables are defined with the BGRT_SHOW macro.
> For the definition of bgrt_attr_##_name,
> the storage-class specifier should be static
>
> Signed-off-by: Tom Rix <trix@...hat.com>
> ---
>  drivers/acpi/bgrt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/bgrt.c b/drivers/acpi/bgrt.c
> index 02d208732f9a..e4fb9e225ddf 100644
> --- a/drivers/acpi/bgrt.c
> +++ b/drivers/acpi/bgrt.c
> @@ -21,7 +21,7 @@ static struct kobject *bgrt_kobj;
>         {                                                                       \
>                 return sysfs_emit(buf, "%d\n", bgrt_tab._member);               \
>         }                                                                       \
> -       struct kobj_attribute bgrt_attr_##_name = __ATTR_RO(_name)
> +       static struct kobj_attribute bgrt_attr_##_name = __ATTR_RO(_name)
>
>  BGRT_SHOW(version, version);
>  BGRT_SHOW(status, status);
> --

Applied as 5.19 material, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ