From patchwork Fri May 14 10:32:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huacai Chen X-Patchwork-Id: 12257417 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70065C433ED for ; Fri, 14 May 2021 10:31:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 51C1B61457 for ; Fri, 14 May 2021 10:31:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230217AbhENKc5 (ORCPT ); Fri, 14 May 2021 06:32:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:42760 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229973AbhENKc5 (ORCPT ); Fri, 14 May 2021 06:32:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BB0B7611AB; Fri, 14 May 2021 10:31:44 +0000 (UTC) From: Huacai Chen To: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org, Jiaxun Yang , Huacai Chen , kernel test robot Subject: [PATCH] MIPS: Loongson64: Remove a "set but not used" variable Date: Fri, 14 May 2021 18:32:17 +0800 Message-Id: <20210514103217.2051315-1-chenhuacai@loongson.cn> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org 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 Signed-off-by: Huacai Chen --- 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: