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

* Re: [PATCH] MIPS: Loongson64: Remove a "set but not used" variable
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Bogendoerfer @ 2021-05-27 11:44 UTC (permalink / raw)
  To: Huacai Chen; +Cc: linux-mips, Jiaxun Yang, kernel test robot

On Fri, May 14, 2021 at 06:32:17PM +0800, Huacai Chen wrote:
> 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(-)

applied to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

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

* Re: [PATCH] MIPS: Loongson64: Remove a "set but not used" variable
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Maciej W. Rozycki @ 2021-06-14  2:03 UTC (permalink / raw)
  To: Huacai Chen
  Cc: Thomas Bogendoerfer, linux-mips, Jiaxun Yang, kernel test robot

On Fri, 14 May 2021, Huacai Chen wrote:

> 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 `('

 What's this chain of assembler error messages doing here?  Surely it does 
not come from the compiler warning and is not related to the patch posted, 
and therefore it has no place in the commit description.  Have you checked 
where it's actually coming from?

  Maciej

^ permalink raw reply	[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.