ACPI: bgrt: use static for BGRT_SHOW kobj_attribute defines
PATCH 1/1 ACPI: bgrt: use static for BGRT_SHOW kobj_attribute defines
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
--- drivers/acpi/bgrt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/bgrt.c +1 -1
@@ -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);
Signature · 1 line
2.27.0
Quoted 19 lines · Tom Rix
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,yoffsetThese variables are defined with the
BGRT_SHOWmacro. For the definition of bgrt_attr_##_name,
the storage-class specifier should be staticSigned-off-by Tom Rix <[email protected]>--- drivers/acpi/bgrt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/acpi/bgrt.c +0
-0
drivers/acpi/bgrt.c static struct kobject *bgrt_kobj;
Quoted 9 lines
drivers/acpi/bgrt.c +1
-2@@ -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!