History

modpost: remove unnecessary check in do_acpi_entry()

The 'id' pointer is never NULL since it has the same address as 'symval'. Also, checking (*id)[0] is simpler than calling strlen().

Masahiro Yamada committed 1 year ago

Commit b7bca421 parent 0c3e0911 file · +1 −1Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/mod/file2alias.c+1−1
@@ -570,7 +570,7 @@ static int do_acpi_entry(const char *filename, · 569 unmodified lines
570 DEF_FIELD(symval, acpi_device_id, cls);570 DEF_FIELD(symval, acpi_device_id, cls);
571 DEF_FIELD(symval, acpi_device_id, cls_msk);571 DEF_FIELD(symval, acpi_device_id, cls_msk);
572 572
573 if (id && strlen((const char *)*id))573 if ((*id)[0])
574 sprintf(alias, "acpi*:%s:*", *id);574 sprintf(alias, "acpi*:%s:*", *id);
575 else {575 else {
576 int i, byte_shift, cnt = 0;576 int i, byte_shift, cnt = 0;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t