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.

Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Tom Rix 2022-04-21 12:42:54 -04:00 committed by Rafael J. Wysocki
parent 3a506ca2cc
commit db2d1693fa
1 changed files with 1 additions and 1 deletions

View 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);