All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: Loongson64: Remove a "set but not used" variable
@ 2021-05-14 10:32 Huacai Chen
  2021-05-27 11:44 ` Thomas Bogendoerfer
  2021-06-14  2:03 ` Maciej W. Rozycki
  0 siblings, 2 replies; 3+ messages in thread
From: Huacai Chen @ 2021-05-14 10:32 UTC (permalink / raw)
  To: Thomas Bogendoerfer
  Cc: linux-mips, Jiaxun Yang, Huacai Chen, kernel test robot

This fix build warning:

   arch/mips/loongson64/env.c: In function 'prom_init_env':
>> arch/mips/loongson64/env.c:50:14: warning: variable 'device' set but not used [-Wunused-but-set-variable]
      50 |  u16 vendor, device;
         |              ^~~~~~
   {standard input}: Assembler messages:
   {standard input}:788: Error: found '(', expected: ')'
   {standard input}:788: Error: found '(', expected: ')'
   {standard input}:788: Error: non-constant expression in ".if" statement
   {standard input}:788: Error: junk at end of line, first unrecognized character is `('
   {standard input}:801: Error: found '(', expected: ')'
   {standard input}:801: Error: found '(', expected: ')'
   {standard input}:801: Error: non-constant expression in ".if" statement
   {standard input}:801: Error: junk at end of line, first unrecognized character is `('

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
---
 arch/mips/loongson64/env.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/mips/loongson64/env.c b/arch/mips/loongson64/env.c
index c8bb75d58f17..c961e2999f15 100644
--- a/arch/mips/loongson64/env.c
+++ b/arch/mips/loongson64/env.c
@@ -62,7 +62,7 @@ void __init prom_lefi_init_env(void)
 	struct efi_cpuinfo_loongson *ecpu;
 	struct irq_source_routing_table *eirq_source;
 	u32 id;
-	u16 vendor, device;
+	u16 vendor;
 
 	/* firmware arguments are initialized in head.S */
 	boot_p = (struct boot_params *)fw_arg2;
@@ -166,7 +166,6 @@ void __init prom_lefi_init_env(void)
 	/* Read the ID of PCI host bridge to detect bridge type */
 	id = readl(HOST_BRIDGE_CONFIG_ADDR);
 	vendor = id & 0xffff;
-	device = (id >> 16) & 0xffff;
 
 	switch (vendor) {
 	case PCI_VENDOR_ID_LOONGSON:
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-14  2:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-14 10:32 [PATCH] MIPS: Loongson64: Remove a "set but not used" variable Huacai Chen
2021-05-27 11:44 ` Thomas Bogendoerfer
2021-06-14  2:03 ` Maciej W. Rozycki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.