Skip to content

Commit 1b9c2e9

Browse files
qa-majeedrafaeljw
authored andcommitted
ACPI: bus: Define and use symbols for device and class name lengths
It is better to define symbols for the maximum ACPI device name length and the maximum ACPI class name length instead of using raw numbers in typedef statements. Signed-off-by: Muhammad Qasim Abdul Majeed <[email protected]> Link: https://patch.msgid.link/[email protected] [ rjw: Subject edits, added a changelog, dropped unrelated change ] Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent f70ae2d commit 1b9c2e9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

include/acpi/acpi_bus.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,12 @@ struct acpi_device_dir {
228228

229229
/* Plug and Play */
230230

231+
#define MAX_ACPI_DEVICE_NAME_LEN 40
232+
#define MAX_ACPI_CLASS_NAME_LEN 20
231233
typedef char acpi_bus_id[8];
232234
typedef u64 acpi_bus_address;
233-
typedef char acpi_device_name[40];
234-
typedef char acpi_device_class[20];
235+
typedef char acpi_device_name[MAX_ACPI_DEVICE_NAME_LEN];
236+
typedef char acpi_device_class[MAX_ACPI_CLASS_NAME_LEN];
235237

236238
struct acpi_hardware_id {
237239
struct list_head list;

0 commit comments

Comments
 (0)