Commit 214509e
platform/x86: thinkpad_acpi: remove redundant assignment to variable i
The variable i is being initialized with the value 0 that is never
read, it is being re-assigned 0 again in a for-loop statement later
on. The initialization is redundant and can be removed.
The initialization of variable n can also be deferred after the
sanity check on pointer n and the declaration of all the int variables
can be combined as a final code clear-up.
Cleans up clang scan build warning:
warning: Value stored to 'i' is never read [deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20240106154740.55202-1-colin.i.king@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>1 parent 6613476 commit 214509e
1 file changed
+3
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6208 | 6208 | | |
6209 | 6209 | | |
6210 | 6210 | | |
6211 | | - | |
6212 | | - | |
6213 | | - | |
6214 | | - | |
6215 | | - | |
| 6211 | + | |
6216 | 6212 | | |
6217 | 6213 | | |
6218 | 6214 | | |
6219 | 6215 | | |
6220 | 6216 | | |
6221 | 6217 | | |
| 6218 | + | |
| 6219 | + | |
6222 | 6220 | | |
6223 | 6221 | | |
6224 | 6222 | | |
| |||
0 commit comments