From patchwork Wed Nov 4 09:06:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 11880009 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=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, 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 6ECD1C4741F for ; Wed, 4 Nov 2020 09:08:53 +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 F27AB2242A for ; Wed, 4 Nov 2020 09:08:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="WuLG7YvT"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="brnfN0ua" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F27AB2242A 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+linux-arm-kernel=archiver.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=qSpY0gQs7YkuD2CBYX/X5vbZcL1djT1farGQaJKx5cc=; b=WuLG7YvTkTLTTN87k5m8zZ8Ia 9KSEbOYcViBo5RbIpmXWFpkZxI4hHu7WqEf+TMYc7Bz1c116VMwIi+D1F2sW+YkCYkGrCpXlEMBEk NFJfQGfXGw38W99D6vvZYJqNXC1emNnGkbIOZ5/u95k5k6ZjQQ0Q11Sa6roNcUM8C6P9TlyVMvj+T Vr48UZhmYXfGynOdXr7eYguSEUe3DyGERkWiNsbFN/9nVtjy4GiBLn959LjRQQED4M+lGhbwY6G78 fcjauPTqtHNKbevzxAIQnKUJ7U8AOGUzoEXpd7MYGYWXoHMw88r5Z/5OORCBRO5wE8AIEPtg7i76P zU3SQVxMQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kaEke-0003li-7a; Wed, 04 Nov 2020 09:06:44 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kaEkM-0003fj-N0 for linux-arm-kernel@lists.infradead.org; Wed, 04 Nov 2020 09:06:27 +0000 Received: by mail-wr1-x444.google.com with SMTP id p1so2026005wrf.12 for ; Wed, 04 Nov 2020 01:06:26 -0800 (PST) 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=c5eEvJlIJ9dRxH14TAwIWUTdkS+IjrVsnIh7Q0ggT08=; b=brnfN0ua+I8Gz0uH1YV2F5yGMa1nzKtE/fciwy9jk3b9rq5I0aNfgD4mZJzX8y7I1E v3JDs7pEobe4Yi8iYBQ40zxZ8nXthK8OcVOLr67uk0SAcc/ubdXmUKHvE0/AK1rMDu01 yrRiiolMV4YiWRm8HrWgQJ0JQAFJoqCM0yyfQZqUrnR9NiJ8SwrEv5+7kDefd5+Gi3cq gaPUm3pKb2M6ijdOnMD5xlQYyoNvOCtnC5vEOz1OroBw8vK3P6Lcw338vkw3+ONJXbDj vbiyjSwa39RI1uguEompiCmYj46eiYl+u75lYB12uxNu8llPEM5POY4oMBpriKxwoZcs 6iwg== 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=c5eEvJlIJ9dRxH14TAwIWUTdkS+IjrVsnIh7Q0ggT08=; b=VBwLYweThi+Tcs+lnB8eArx1guQxHYHX3WGXUhM0Xo2UjfwrFPdftXXZt82cMXPfZF JoSDmbr6fODF1iLoAYd0G8JuU/QAUqfF1k9VXFUSsNMUd6/J2ulZaVoVOhXfMNSb3Kjl FyIJppHHaAaLjPJuHfhdqQ0KCDrpUTh7yyFbtAFvLc3Ndv6W+XwCodnCFbechlW7DnfZ cLVT6FK9897H5fxRMgbopzzlGJSNpZx879o70QU0TrSIWYHw+BaUk24z26m20iVPjcP2 ulOLQOqw/DV6m2O9ssxBQ3tXcGmcLxxrSCAHuGbIryWyJQWwL4bpVtYdGnRWdhr0IAZ2 8PlQ== X-Gm-Message-State: AOAM533aHfRDGhhIWUsHW7PVxtZGBQJ3FCKMhpPZ41yF2OfR+DM+AkaM jlYX+PbrCGUqvC4SqNgXpyCWlWR5DryBHnO8 X-Google-Smtp-Source: ABdhPJym7Q/2k10PIfoqJtwM+8PymTLRCc0LKxW4WlS6/PkC+bMauBuh5tweYNKAWOXSj133iHyE3w== X-Received: by 2002:a05:6000:1252:: with SMTP id j18mr29760015wrx.18.1604480785876; Wed, 04 Nov 2020 01:06:25 -0800 (PST) Received: from dell.default ([91.110.221.242]) by smtp.gmail.com with ESMTPSA id e25sm1607823wrc.76.2020.11.04.01.06.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Nov 2020 01:06:24 -0800 (PST) From: Lee Jones To: davem@davemloft.net, kuba@kernel.org Subject: [PATCH 02/12] net: ethernet: smsc: smc911x: Mark 'status' as __maybe_unused Date: Wed, 4 Nov 2020 09:06:00 +0000 Message-Id: <20201104090610.1446616-3-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201104090610.1446616-1-lee.jones@linaro.org> References: <20201104090610.1446616-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-20201104_040626_857906_8EC05B53 X-CRM114-Status: GOOD ( 16.04 ) 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: Dustin McIntire , Lee Jones , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 'status' is used to interact with a hardware register. It might not be safe to remove it entirely. Mark it as __maybe_unused instead. Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/smsc/smc911x.c: In function ‘smc911x_phy_configure’: drivers/net/ethernet/smsc/smc911x.c:882:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] drivers/net/ethernet/smsc/smc911x.c: In function ‘smc911x_phy_interrupt’: drivers/net/ethernet/smsc/smc911x.c:976:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] drivers/net/ethernet/smsc/smc911x.c: In function ‘smc911x_timeout’: drivers/net/ethernet/smsc/smc911x.c:1251:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Dustin McIntire Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones --- drivers/net/ethernet/smsc/smc911x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/smsc/smc911x.c b/drivers/net/ethernet/smsc/smc911x.c index 01069dfaf75c9..552953c376fe3 100644 --- a/drivers/net/ethernet/smsc/smc911x.c +++ b/drivers/net/ethernet/smsc/smc911x.c @@ -879,7 +879,7 @@ static void smc911x_phy_configure(struct work_struct *work) int phyaddr = lp->mii.phy_id; int my_phy_caps; /* My PHY capabilities */ int my_ad_caps; /* My Advertised capabilities */ - int status; + int __maybe_unused status; unsigned long flags; DBG(SMC_DEBUG_FUNC, dev, "--> %s()\n", __func__); @@ -973,7 +973,7 @@ static void smc911x_phy_interrupt(struct net_device *dev) { struct smc911x_local *lp = netdev_priv(dev); int phyaddr = lp->mii.phy_id; - int status; + int __maybe_unused status; DBG(SMC_DEBUG_FUNC, dev, "--> %s\n", __func__); @@ -1248,7 +1248,7 @@ static void smc911x_poll_controller(struct net_device *dev) static void smc911x_timeout(struct net_device *dev, unsigned int txqueue) { struct smc911x_local *lp = netdev_priv(dev); - int status, mask; + int __maybe_unused status, mask; unsigned long flags; DBG(SMC_DEBUG_FUNC, dev, "--> %s\n", __func__);