Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1547828ybt; Thu, 2 Jul 2020 08:04:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbPZuj6fCNe8HlyLrHQM4BO+OnQTQ2hUchohTQqikxEEY6vd8badbGaQmvl8ar3qHT1hOt X-Received: by 2002:a50:cbcd:: with SMTP id l13mr18769639edi.384.1593702265313; Thu, 02 Jul 2020 08:04:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593702265; cv=none; d=google.com; s=arc-20160816; b=lhw/ZfrUOfRK06qWs0+8oF5YasSSr+2QzX9Ze9OXOI8Bc1BBHQlO85SxjxNqKXdPra W3i6/As+GpmFI6YtYZdQhyi9KpYRp6m8joHrC38uAq4I7CA69bQNpBDvuWlO/qe5XTxw tkoy8gAVA5ypOC6g8C3ku7Yc6mAy19fbVIE210M1qtT+O/dqUlRZ0FJtICQvfH/pZC6C /su5rIBCXUzUGQ2cmM9jh4jl9jtLG+ljx5sqxqYo18JWl09NNn/CS0Yp6EJ8FmJlvUIg CpMOKymGoXIpfdxtGGdRzkIVWg7KaopE0I4VI3DGmdjRWo3AqKsa5nffaojF75RtJQtr FO8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:ironport-sdr:ironport-sdr; bh=imrdBFnagV0/ysmGzgm32Dgf+HQUEGl+jHoMo/rv8Fo=; b=hUegjy7bpYGsCn2BxKOobXCq7G3eZysEnRfYZdHLEReQr166qOw9Cq/dwD13XBKxML xj/VYfa0jgYSj5v5V7VEYhFDMu/ZYFlfeV2WTCrlKSfnfLHunfWeGE3eqH+tsImL4/jH aY+4HfTW8aQ/co6k20fd6AHXhXh4BOC55OelbCC9LalAv5eSjjVxX4q/PQ5vD0M3DBpl 2/ijTb/aKdU2YzAvW0oNfNa4IwBV4ZtR/E2B8DlfmCyOmSPBOi5wMMsCBssUqoik26eg Zs79GngX9lE90YKz9CwuAWMu3iOnjIQxxII368PsnEMgHG1DzX/EJBtRTXHJSbUftta4 gqUA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b23si6025204ejb.465.2020.07.02.08.04.01; Thu, 02 Jul 2020 08:04:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729974AbgGBPCx (ORCPT + 99 others); Thu, 2 Jul 2020 11:02:53 -0400 Received: from mga18.intel.com ([134.134.136.126]:43273 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726032AbgGBPCw (ORCPT ); Thu, 2 Jul 2020 11:02:52 -0400 IronPort-SDR: ucuLy4blN1beFdCOl9mgxRgssnjxOXGLMVduG8jc/EjBU7ISPWxphFCNrwwCN4oBY3/gix4IST rRJ7aYF7/HtA== X-IronPort-AV: E=McAfee;i="6000,8403,9670"; a="134384102" X-IronPort-AV: E=Sophos;i="5.75,304,1589266800"; d="scan'208";a="134384102" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jul 2020 08:02:41 -0700 IronPort-SDR: W/iS25Y2HU7wr+H0UDFRVD3TdGcuFXMVpdLnjPeZ9a4kObj1kYA7x++obbTVf6rR1WgJA/yPNp LlVVPdTUSaZw== X-IronPort-AV: E=Sophos;i="5.75,304,1589266800"; d="scan'208";a="304275473" Received: from nchava-mobl1.amr.corp.intel.com (HELO [10.252.135.144]) ([10.252.135.144]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jul 2020 08:02:40 -0700 Subject: Re: [PATCH] riscv: asm/gdb_xml.h: use __maybe_used to make W=1 warnings go away To: Vincent Chen Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org, kernel test robot , Paul Walmsley , Palmer Dabbelt , Albert Ou , "open list:RISC-V ARCHITECTURE" , open list References: <20200701184751.84008-1-pierre-louis.bossart@linux.intel.com> From: Pierre-Louis Bossart Message-ID: Date: Thu, 2 Jul 2020 09:20:52 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/1/20 9:04 PM, Vincent Chen wrote: > On Thu, Jul 2, 2020 at 2:48 AM Pierre-Louis Bossart > wrote: >> >> 0day/kbuild reports warnings with the ASoC codecs compiled with W=1. >> >> In file included from arch/riscv/include/asm/kgdb.h:109, >> from include/linux/kgdb.h:20, >> from include/linux/fb.h:5, >> from include/drm/drm_crtc.h:31, >> from sound/soc/codecs/hdmi-codec.c:19: >> >> arch/riscv/include/asm/gdb_xml.h:23:19: warning: >> 'riscv_gdb_stub_cpuxml' defined but not used [-Wunused-const-variable=] >> 23 | static const char riscv_gdb_stub_cpuxml[2048] = >> | ^~~~~~~~~~~~~~~~~~~~~ >> arch/riscv/include/asm/gdb_xml.h:16:19: warning: >> 'riscv_gdb_stub_target_desc' defined but not used [-Wunused-const-variable=] >> 16 | static const char riscv_gdb_stub_target_desc[256] = >> | ^~~~~~~~~~~~~~~~~~~~~~~~~~ >> arch/riscv/include/asm/gdb_xml.h:13:19: warning: >> 'gdb_xfer_read_cpuxml' defined but not used [-Wunused-const-variable=] >> 13 | static const char gdb_xfer_read_cpuxml[39] = >> | ^~~~~~~~~~~~~~~~~~~~ >> arch/riscv/include/asm/gdb_xml.h:10:19: warning: >> 'gdb_xfer_read_target' defined but not used [-Wunused-const-variable=] >> 10 | static const char gdb_xfer_read_target[31] = "qXfer:features:read:target.xml:"; >> | ^~~~~~~~~~~~~~~~~~~~ >> arch/riscv/include/asm/gdb_xml.h:7:19: warning: >> 'riscv_gdb_stub_feature' defined but not used [-Wunused-const-variable=] >> 7 | static const char riscv_gdb_stub_feature[64] = >> | ^~~~~~~~~~~~~~~~~~~~~~ >> >> Reported-by: kernel test robot >> Signed-off-by: Pierre-Louis Bossart >> --- >> >> I don't know if this is the right way of solving this issue but this >> error is now consistently thrown in kbuild compile-test reports w/ >> W=1. >> > > Dear Pierre-Louis Bossart: > Thanks for your modifications. I have fixed the warnings in my latest > KGDB patchset and sent it out, but the merged KGDB patchset is not my > latest version. > I have sent a patch set to complement the missing ports, and I think > these warnings would disappear after this patch has been accepted and > merged. > > Here is the patch to fix this warning: > http://lists.infradead.org/pipermail/linux-riscv/2020-June/000660.html Thank you Vincent, let's drop my hacky patch then.