projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c3e091
)
modpost: remove unnecessary check in do_acpi_entry()
author
Masahiro Yamada
<masahiroy@kernel.org>
Tue, 19 Nov 2024 23:56:40 +0000
(08:56 +0900)
committer
Masahiro Yamada
<masahiroy@kernel.org>
Wed, 27 Nov 2024 23:11:56 +0000
(08:11 +0900)
The 'id' pointer is never NULL since it has the same address as
'symval'.
Also, checking (*id)[0] is simpler than calling strlen().
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
scripts/mod/file2alias.c
patch
|
blob
|
history
diff --git
a/scripts/mod/file2alias.c
b/scripts/mod/file2alias.c
index
634e407
..
34678ed
100644
(file)
--- a/
scripts/mod/file2alias.c
+++ b/
scripts/mod/file2alias.c
@@
-570,7
+570,7
@@
static int do_acpi_entry(const char *filename,
DEF_FIELD(symval, acpi_device_id, cls);
DEF_FIELD(symval, acpi_device_id, cls_msk);
- if (
id && strlen((const char *)*id)
)
+ if (
(*id)[0]
)
sprintf(alias, "acpi*:%s:*", *id);
else {
int i, byte_shift, cnt = 0;