Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Tom Rix and committed by
Rafael J. Wysocki
db2d1693 3a506ca2

+1 -1
+1 -1
drivers/acpi/bgrt.c
··· 21 21 { \ 22 22 return sysfs_emit(buf, "%d\n", bgrt_tab._member); \ 23 23 } \ 24 - struct kobj_attribute bgrt_attr_##_name = __ATTR_RO(_name) 24 + static struct kobj_attribute bgrt_attr_##_name = __ATTR_RO(_name) 25 25 26 26 BGRT_SHOW(version, version); 27 27 BGRT_SHOW(status, status);