Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI: versatile: Remove redundant variable retval

Variable retval is being assigned a value that is never read, the
variable is redundant and can be removed.

Cleans up clang scan build warning:
drivers/pci/controller/pci-versatile.c:37:10: warning: Although the value
stored to 'retval' is used in the enclosing expression, the value is never
actually read from 'retval' [deadcode.DeadStores]

Link: https://lore.kernel.org/r/20220418144416.86121-1-colin.i.king@gmail.com
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>

authored by

Colin Ian King and committed by
Lorenzo Pieralisi
6086987b 31231092

+1 -2
+1 -2
drivers/pci/controller/pci-versatile.c
··· 31 31 32 32 static int __init versatile_pci_slot_ignore(char *str) 33 33 { 34 - int retval; 35 34 int slot; 36 35 37 - while ((retval = get_option(&str, &slot))) { 36 + while (get_option(&str, &slot)) { 38 37 if ((slot < 0) || (slot > 31)) 39 38 pr_err("Illegal slot value: %d\n", slot); 40 39 else