From patchwork Thu Jul 2 14:46:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 11639197 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7F56113B4 for ; Thu, 2 Jul 2020 14:52:54 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 568DA20771 for ; Thu, 2 Jul 2020 14:52:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bd8J80Ve"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="EmGnkDPA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 568DA20771 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wa6lHEqc1l7qGG8ZlreF3YaWixUyKqGnUoin7g2/8S0=; b=bd8J80VemZrwoNbWR8zbiraD9 iVkOo1w7nkAcU6oX2fDQRc9YDcBDVzLLnxrN9XrGlK+2q4AsRkXS6eKmcCFX3Mx5ywXut9SnMHRB3 eRplyzLaaD04phgczElsAuWAKf5+Ly/gpM8xWHRgx74jr+YqGVHmAfwwTZd0Bym9zNHaAUSwFcwdV B5QNoTO314Ak2JjYzOIc0urB2lxsNPZ/+EDKXr8x1n2GylZZCjkIzg8npRYjWV9uAunENdwNgJCFF E2UJqKVRbO/flpwpHYPoUwzHW62GDh5CT53w8xNQ83ibmHRFucap44IX+zLgOz6jTE40FFatZQ6o/ p8qKJ7lfA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jr0Y3-0007hC-Tl; Thu, 02 Jul 2020 14:50:48 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jr0UK-0005Nw-Ir for linux-arm-kernel@lists.infradead.org; Thu, 02 Jul 2020 14:46:57 +0000 Received: by mail-wm1-x342.google.com with SMTP id g10so9234762wmc.1 for ; Thu, 02 Jul 2020 07:46:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kZQeJUz+ErJ6yE5aR4TJ6dhksayixlSTB2k3nGSWLOM=; b=EmGnkDPALpzLOYQpEWxWIHKjJi1QPdROlga7PolW9eoc2fctcHjv9A3rBSoQzpnGVp 8PfqKc2hmGPJ7C4BmFS0/+f1wti/7JErmkD2W8yyRMjypPlwK6A36wVpTDLwyDQg87sw c0uu9+dF+Ug0g9aw3Q4mYqsHAtgNH8/XLOM5hiwW0CRDrWgad5eFiCp87XpG+pFKWWqx LuX983vQCmCEepm8sMhjowkgnJS7kOwY1pekRce9IZQL8MQQ4dn+hkHQkftKnTTGaDR5 900F+B1dg7IZ5BbGwkWizO0a35THYtH7qGGs4CJRdyIVW0UbbSb2o9jXD5Xq0qGGeOk+ KnRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kZQeJUz+ErJ6yE5aR4TJ6dhksayixlSTB2k3nGSWLOM=; b=oPry470P42HieGDJ1RI8ujguhAJO7yC8HfTezh9TKwRUBwYKwMK0UrcfYiwqkYUial DPA5Le81M2SE78v3E4nmw6HRPQj8fyNFQcF4C08sl5SLDxgy8OHmh6mBAeFtaw9u17+J nbK4eOPKABIRRTDiKtGSrNpIGHkxRhOvPWFevLW4yXqq+Jsgc/sozGrGPbKSXqVlFYPv Isd8+x/IwjVl9RJDKlWezz1MPSQb5HPWLWuxdlXYE4EAiTIWYLWIaNfOBQl4+xe9vvZp 57967bmBHA5AN0b/8zA4ocvo10OkiayB+lVYwnQ2Hm1HY7F3sUcAn+5EtVR7lcytq7G3 IAgQ== X-Gm-Message-State: AOAM533CCVRud4rzncViRuGrk4a57yjh76DpnGyWrzKkKnYgJt15AHXF oCTe51vS3tqws8Xxrl6j+dFkpQ== X-Google-Smtp-Source: ABdhPJyxMg7EbHaZ/31OlfupBkIBsGFOwrld5FUmxjo0/JeKjE8jPmiIcgJijoZ9w17/iOlzpi1ktw== X-Received: by 2002:a1c:b4c2:: with SMTP id d185mr30552951wmf.57.1593701215544; Thu, 02 Jul 2020 07:46:55 -0700 (PDT) Received: from localhost.localdomain ([2.27.35.144]) by smtp.gmail.com with ESMTPSA id g14sm7002737wrw.83.2020.07.02.07.46.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jul 2020 07:46:55 -0700 (PDT) From: Lee Jones To: gregkh@linuxfoundation.org Subject: [PATCH 19/30] usb: host: isp1362: Mark the many unused ISP1362_REG entries as __maybe_unused Date: Thu, 2 Jul 2020 15:46:14 +0100 Message-Id: <20200702144625.2533530-20-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200702144625.2533530-1-lee.jones@linaro.org> References: <20200702144625.2533530-1-lee.jones@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200702_104656_710620_AA008DD2 X-CRM114-Status: GOOD ( 12.87 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:342 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-usb@vger.kernel.org, Lee Jones , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, "by L. Wassmann" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org It would seem a shame to strip out all of the unused register entries, since they can act as a fair source of documentation. Instead, mark them all as __maybe_unused to show the build system that this behaviour is known and intentional. Fixes the following kernel build warning(s): In file included from drivers/usb/host/isp1362-hcd.c:96: drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_OTGALTTMR’ defined but not used [-Wunused-const-variable=] 59 | static isp1362_reg_t ISP1362_REG_##name = addr | ^~~~~~~~~~~~ drivers/usb/host/isp1362.h:199:1: note: in expansion of macro ‘ISP1362_REG’ 199 | ISP1362_REG(OTGALTTMR, 0x6C, REG_WIDTH_16, REG_ACCESS_RW); | ^~~~~~~~~~~ drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_OTGTIMER’ defined but not used [-Wunused-const-variable=] 59 | static isp1362_reg_t ISP1362_REG_##name = addr | ^~~~~~~~~~~~ drivers/usb/host/isp1362.h:198:1: note: in expansion of macro ‘ISP1362_REG’ 198 | ISP1362_REG(OTGTIMER, 0x6A, REG_WIDTH_16, REG_ACCESS_RW); | ^~~~~~~~~~~ drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_OTGINTENB’ defined but not used [-Wunused-const-variable=] 59 | static isp1362_reg_t ISP1362_REG_##name = addr | ^~~~~~~~~~~~ drivers/usb/host/isp1362.h:197:1: note: in expansion of macro ‘ISP1362_REG’ 197 | ISP1362_REG(OTGINTENB, 0x69, REG_WIDTH_16, REG_ACCESS_RW); | ^~~~~~~~~~~ drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_OTGINT’ defined but not used [-Wunused-const-variable=] 59 | static isp1362_reg_t ISP1362_REG_##name = addr | ^~~~~~~~~~~~ drivers/usb/host/isp1362.h:196:1: note: in expansion of macro ‘ISP1362_REG’ 196 | ISP1362_REG(OTGINT, 0x68, REG_WIDTH_16, REG_ACCESS_RW); | ^~~~~~~~~~~ drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_OTGSTATUS’ defined but not used [-Wunused-const-variable=] 59 | static isp1362_reg_t ISP1362_REG_##name = addr | ^~~~~~~~~~~~ drivers/usb/host/isp1362.h:195:1: note: in expansion of macro ‘ISP1362_REG’ 195 | ISP1362_REG(OTGSTATUS, 0x67, REG_WIDTH_16, REG_ACCESS_R); | ^~~~~~~~~~~ drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_OTGCONTROL’ defined but not used [-Wunused-const-variable=] 59 | static isp1362_reg_t ISP1362_REG_##name = addr | ^~~~~~~~~~~~ drivers/usb/host/isp1362.h:194:1: note: in expansion of macro ‘ISP1362_REG’ 194 | ISP1362_REG(OTGCONTROL, 0x62, REG_WIDTH_16, REG_ACCESS_RW); | ^~~~~~~~~~~ drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_HCATLPORT’ defined but not used [-Wunused-const-variable=] 59 | static isp1362_reg_t ISP1362_REG_##name = addr | ^~~~~~~~~~~~ drivers/usb/host/isp1362.h:183:1: note: in expansion of macro ‘ISP1362_REG’ 183 | ISP1362_REG(HCATLPORT, 0x44, REG_WIDTH_16, REG_ACCESS_RW); | ^~~~~~~~~~~ drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_HCINTLPORT’ defined but not used [-Wunused-const-variable=] 59 | static isp1362_reg_t ISP1362_REG_##name = addr | ^~~~~~~~~~~~ drivers/usb/host/isp1362.h:175:1: note: in expansion of macro ‘ISP1362_REG’ 175 | ISP1362_REG(HCINTLPORT, 0x43, REG_WIDTH_16, REG_ACCESS_RW); | ^~~~~~~~~~~ drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_HCISTL1PORT’ defined but not used [-Wunused-const-variable=] 59 | static isp1362_reg_t ISP1362_REG_##name = addr | ^~~~~~~~~~~~ drivers/usb/host/isp1362.h:171:1: note: in expansion of macro ‘ISP1362_REG’ 171 | ISP1362_REG(HCISTL1PORT, 0x42, REG_WIDTH_16, REG_ACCESS_RW); | ^~~~~~~~~~~ drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_HCISTL0PORT’ defined but not used [-Wunused-const-variable=] 59 | static isp1362_reg_t ISP1362_REG_##name = addr | ^~~~~~~~~~~~ drivers/usb/host/isp1362.h:170:1: note: in expansion of macro ‘ISP1362_REG’ 170 | ISP1362_REG(HCISTL0PORT, 0x40, REG_WIDTH_16, REG_ACCESS_RW); | ^~~~~~~~~~~ drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_HCINTDIS’ defined but not used [-Wunused-const-variable=] 59 | static isp1362_reg_t ISP1362_REG_##name = addr | ^~~~~~~~~~~~ drivers/usb/host/isp1362.h:77:1: note: in expansion of macro ‘ISP1362_REG’ 77 | ISP1362_REG(HCINTDIS, 0x05, REG_WIDTH_32, REG_ACCESS_RW); | ^~~~~~~~~~~ Cc: "by L. Wassmann" Signed-off-by: Lee Jones --- drivers/usb/host/isp1362.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/host/isp1362.h b/drivers/usb/host/isp1362.h index 4c49688a069d1..9bbfcc3fdd3cc 100644 --- a/drivers/usb/host/isp1362.h +++ b/drivers/usb/host/isp1362.h @@ -56,7 +56,7 @@ typedef const unsigned char isp1362_reg_t; #define ISP1362_REG_NO(r) (r) #define ISP1362_REG(name, addr, width, rw) \ -static isp1362_reg_t ISP1362_REG_##name = addr +static isp1362_reg_t __maybe_unused ISP1362_REG_##name = addr #define REG_ACCESS_TEST(r) do {} while (0) #define REG_WIDTH_TEST(r, w) do {} while (0)