projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7410b8e
)
platform/x86: wmi: remove variable
author
Barnabás Pőcze
<pobrn@protonmail.com>
Sat, 4 Sep 2021 17:56:07 +0000
(17:56 +0000)
committer
Hans de Goede
<hdegoede@redhat.com>
Tue, 14 Sep 2021 10:26:02 +0000
(12:26 +0200)
The `block` variable is assigned and only used once, the code
shorter and probably clearer without it; so remove it.
Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
Link:
https://lore.kernel.org/r/20210904175450.156801-21-pobrn@protonmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/wmi.c
patch
|
blob
|
history
diff --git
a/drivers/platform/x86/wmi.c
b/drivers/platform/x86/wmi.c
index 91350af097d6fd1c784a1d59182e20631be63d63..163969a8beac015897e0083258bcd2028006ca1f 100644
(file)
--- a/
drivers/platform/x86/wmi.c
+++ b/
drivers/platform/x86/wmi.c
@@
-118,15
+118,12
@@
static bool find_guid(const char *guid_string, struct wmi_block **out)
{
guid_t guid_input;
struct wmi_block *wblock;
- struct guid_block *block;
if (guid_parse(guid_string, &guid_input))
return false;
list_for_each_entry(wblock, &wmi_block_list, list) {
- block = &wblock->gblock;
-
- if (guid_equal(&block->guid, &guid_input)) {
+ if (guid_equal(&wblock->gblock.guid, &guid_input)) {
if (out)
*out = wblock;
return true;