From patchwork Mon Mar 4 20:36:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 159616 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp4186877jad; Mon, 4 Mar 2019 12:36:56 -0800 (PST) X-Google-Smtp-Source: APXvYqwhN4uWB5ijBRwH6kYxv1+8usq/HdNeN6Mn4FyNZ03tL4epIHTmAG8mLgSFACv0f9sRpBHw X-Received: by 2002:a17:902:48c8:: with SMTP id u8mr22534840plh.87.1551731816050; Mon, 04 Mar 2019 12:36:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551731816; cv=none; d=google.com; s=arc-20160816; b=XoDjOOv6FyJplLVF46xkAPJTdLDbZW0g3e/w7ZfJPFbsuMee8TibeaRSpsINCMmWRq CVFJsW96a0MoorS5yqAwWhP/w1/huA09ihPEsfgRqD4wWEpozP6rymwh22ndU0gWH3u0 5rbEyN4WQ+rjTxRaG67gyPjzf/Vj55N6aHFTmPUrz2YnEq8WZQA6iu9L3dyJ+LGFEArL wKEuNSgNZoKwBYqLStIE1ecctFP2jFD50Pld3w3pnsqaSVaOA9QJmfYEPJMeeUGGlISR YFfxeP2b38C2WAD+jOZ0Ll8fY5wvW9WhtWpa49P6Ir7nki9EOinIOOSqYW2GtnnoiZu8 xgOg== 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:mime-version :message-id:date:subject:cc:to:from; bh=KFnV5tTxXhYIxcIxYX/Ui9o/F2wrLOoWJID7xbsFllI=; b=SJPeJabs6MubZQeHbRso3JfIAM+Jsr04h5XAGNM8OD0rkRNcRtxGvzEi8G1Lc/Iw8s dUvwRiWz1G6ZzLBtRHKMu4RLimhIpa6RCDx4+uDoM1S6xxajLVi1cuWKBXmkI3uy3GaU Jwt56zBKy3WiSs/rG+dKEhVe60GMJ4fWwU7raB92rXoY21pdrMqczHZBs3oI/EuXJJvL iIMk/XrN4DSzgvR6eS2/Wol03bCmSBoiKejWNy8Tr668EwMmupF9aRReAhtgbHEShliQ jbmf8ql4N2rjLhpmCv5nH2xBRa07iTjJGyssVwEcASCaGDXui3T2OuFofCiFWCZFAVJm OSCA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q130si6276201pfq.97.2019.03.04.12.36.55; Mon, 04 Mar 2019 12:36:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726788AbfCDUgy (ORCPT + 31 others); Mon, 4 Mar 2019 15:36:54 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:45251 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726414AbfCDUgy (ORCPT ); Mon, 4 Mar 2019 15:36:54 -0500 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.129]) with ESMTPA (Nemesis) id 1MaIrN-1gUqqs3zVN-00WFCV; Mon, 04 Mar 2019 21:36:44 +0100 From: Arnd Bergmann To: Andrew Lunn , Vivien Didelot , Florian Fainelli , "David S. Miller" Cc: Arnd Bergmann , =?utf-8?q?Marek_Beh=C3=BAn?= , Russell King , =?utf-8?q?Uwe_Klein?= =?utf-8?q?e-K=C3=B6nig?= , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net: dsa: mv88e6xxx: fix unused function warning Date: Mon, 4 Mar 2019 21:36:27 +0100 Message-Id: <20190304203641.2052975-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:8odyF2fgOP3y0vgr8dfi9ElArl05AUjmEv/a6068UKeYYnVIBOd dHlz7RwPGIdOmjW+FV+bUF9VfA0tYFae8jT2e5AHukfFrUZBkFnNl0NCM53C5MEkKf+c3hZ ejdQwJxc3x66lQ24X0o4+8TOkyQveZJIfRo7sh3sC1cDwu0GSdVWs5vHz8PMgLD8sPXukWR TqjtDu4/zDuiyDf91hdLg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:jXOqjUKwjrI=:py/9fkYLOmHVBrW377YO3n 8PexGYhocS9r/eGabBWp8BqdTFgZN22Nf7/hxXHgC1IRo9Qrk9qBV2zzZS7fM4RArTmspaXIH qFk5aaVuxXnwKCV7deNFA+nB6alEn171jPY5X3RNJQ+e0e2hVLzSvj5bSTCpCiRK9xMcC2rJ/ MPgBmTmn8Wj1hE0FoFjlGkpFgr4kC2fKXI/GJk7c7d6esAUTB+7men2CsDjB23gvJxW4sc528 qEK3g5EZPWgxjMFg/OQOCYquWhn7kY9ZCk8FPzAqsF65/w7+bJ5vaJxP3FWEDdB2IMOf51YsZ lWMpBsvu+Au3mCl+AOyFryaH99E8S0nd+xk6nPhTlE2muCsrb7MoFU+sYmLF313g7wu1bft3L egGBC/LABddbVafUACPXumZ4i0HDp+NLT6BmBVXvMamkQR9ePCo0jW6oLBTNyoWoU7lD7N9aE JqFR7RF+4pz5c07yiiQHYk6Ix+Yygswg7YcmDjcvvU3lJt45O0oUNQXGmrDqFQyIiRG43ODgs XS+evgeyvyUIM6bqXFTTnA1ZSu2zGN5HCL8rBgj6nKRGseFvBPy9nuv3TLoFcjPfsuw3SmzIX z+LRJM5VZa8iQISj7MWUR3mFu8+BbMNlLe7WJPutelbdiGRuM+SlAXuW0P0U4iNc5Xo4b09Co 8Mjv9OuX3ZHxui4EzXgtiDfH4jB+eLcP5hfd1ewxeq8biPzwJwLxcTbFm9pYzFHvEtWHeY/t6 62G+N7pNbiYF/qznJVgN94xN5BfR0q8nOXGlAw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The newly introduced function is only used inside of an #ifdef and causes a warning when that is disabled: drivers/net/dsa/mv88e6xxx/chip.c:4623:13: error: unused function 'mv88e6xxx_ports_cmode_init' [-Werror,-Wunused-function] Move it into the same #ifdef block to shut up the warning. Fixes: ed8fe20205ac ("net: dsa: mv88e6xxx: prevent interrupt storm caused by mv88e6390x_port_set_cmode") Signed-off-by: Arnd Bergmann --- drivers/net/dsa/mv88e6xxx/chip.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) -- 2.20.0 diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index e4ad16b2dc38..168d4898c36f 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -4620,14 +4620,6 @@ static int mv88e6xxx_smi_init(struct mv88e6xxx_chip *chip, return 0; } -static void mv88e6xxx_ports_cmode_init(struct mv88e6xxx_chip *chip) -{ - int i; - - for (i = 0; i < mv88e6xxx_num_ports(chip); i++) - chip->ports[i].cmode = MV88E6XXX_PORT_STS_CMODE_INVALID; -} - static enum dsa_tag_protocol mv88e6xxx_get_tag_protocol(struct dsa_switch *ds, int port) { @@ -4637,6 +4629,14 @@ static enum dsa_tag_protocol mv88e6xxx_get_tag_protocol(struct dsa_switch *ds, } #if IS_ENABLED(CONFIG_NET_DSA_LEGACY) +static void mv88e6xxx_ports_cmode_init(struct mv88e6xxx_chip *chip) +{ + int i; + + for (i = 0; i < mv88e6xxx_num_ports(chip); i++) + chip->ports[i].cmode = MV88E6XXX_PORT_STS_CMODE_INVALID; +} + static const char *mv88e6xxx_drv_probe(struct device *dsa_dev, struct device *host_dev, int sw_addr, void **priv)