From: Masahiro Yamada Date: Tue, 19 Nov 2024 23:56:40 +0000 (+0900) Subject: modpost: remove unnecessary check in do_acpi_entry() X-Git-Tag: ceph-for-6.13-rc4~108^2~19 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=b7bca42d101d8d9678068cde645bd6d0afa8a20f;p=ceph-client.git 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(). Signed-off-by: Masahiro Yamada --- diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 634e40748287c..34678ed40fdb2 100644 --- 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;