]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ACPI: BGRT: use static for BGRT_SHOW kobj_attribute defines
authorTom Rix <trix@redhat.com>
Thu, 21 Apr 2022 16:42:54 +0000 (12:42 -0400)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 22 Apr 2022 14:55:33 +0000 (16:55 +0200)
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@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/bgrt.c

index 02d208732f9a3e0b8cbdb09ea30783bdbc9417e4..e4fb9e225ddfcb6830e96e67a90dd02c2b3f0e92 100644 (file)
@@ -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);