Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2415973imb; Mon, 4 Mar 2019 04:45:15 -0800 (PST) X-Google-Smtp-Source: APXvYqwnGhc0XNWZG6QcorjMXPaNqGixvUDt/89WAtFxmd5D7pIeN+qi7Udx6pkF1mwGRfi4GuaZ X-Received: by 2002:a17:902:8b83:: with SMTP id ay3mr19241244plb.1.1551703515414; Mon, 04 Mar 2019 04:45:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551703515; cv=none; d=google.com; s=arc-20160816; b=g7mw/NWdCIHI6ESpXU74KOz6MXEHjueYZ3Hoh88xqf9V3sOnqks8eAM4QJC7z62a6P QvCAoCt6P1rrdLPvxbbSt8L8KUPH7eUK4x2UyBkWCw9LS1Ps5us0Sbx8Uc24GI0fVutI zCsCiEJYoBWFDe0bN/hmY86JonJ2IGthTEAVHthqa9c/eK+G6gucxuDNYbYhqJtnhQjX LJke2SDromkyyGG5XIKwrvmT2G1/z/TnpAzkFcjhb2lDynFBI/+fh77gAmVT+VzQlUuO YL++Ku2mF2ZJQKaTaukeRMcR3rf/Tqp+/F9KONS2V9CVCQV3TUy1YLXn46guxIKEexb+ GGEg== 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=lpmKGi04Ja3JEHsdUjDTpyqBPVTW+pADP4VEfd/5UUw=; b=jE3+SgrKL3ay1vha2DzZSIcpfjhw8r+bK6j+j3DzlFJXpdtCuzL2TjbTPNbL0Bs4yK zyVT+3iCgbta0asXCL6xjDqxOOpztM/EdXPAsbmRVauXXAp4l1dQKaUcdxOlp72rC9Qg GnYlrfyYUCFdegnpsQ0jioZVRXN+tKbB7575vKjYiXHwl+V1q+/uAQhUEAc34kgzZjD8 KZMuO//YrIshhVELAcH0kPWOkXcWPS1i99UiN7vB725GhzDEgjMDdWPfekeagn/8XYNx oAH0TZU3/HvXyZRpjocg0urPVGXqF4Bcbb6+EZHIPzN8A0BTNg0sZK10LyRlFtkEkkvv SE9w== 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 ct12si5651309plb.422.2019.03.04.04.45.00; Mon, 04 Mar 2019 04:45:15 -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 S1726601AbfCDMog (ORCPT + 99 others); Mon, 4 Mar 2019 07:44:36 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:49126 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726181AbfCDMog (ORCPT ); Mon, 4 Mar 2019 07:44:36 -0500 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 78023256B567BF8FCE3C; Mon, 4 Mar 2019 20:44:33 +0800 (CST) Received: from localhost.localdomain (10.67.212.132) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.408.0; Mon, 4 Mar 2019 20:44:23 +0800 From: Shaokun Zhang To: , CC: Shaokun Zhang , Heiner Kallweit , Andrew Lunn , Vivien Didelot , Florian Fainelli , "David S. Miller" Subject: [PATCH -next] net: dsa: mv88e6xxx: Fix build warning when CONFIG_NET_DSA_LEGACY is n Date: Mon, 4 Mar 2019 20:43:01 +0800 Message-ID: <1551703381-52115-1-git-send-email-zhangshaokun@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset="y" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.212.132] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When CONFIG_NET_DSA_LEGACY is n, there is a GCC bulid warning: drivers/net/dsa/mv88e6xxx/chip.c:4623:13: warning: ‘mv88e6xxx_ports_cmode_init’ defined but not used [-Wunused-function] static void mv88e6xxx_ports_cmode_init(struct mv88e6xxx_chip *chip) Let's fix it. Fixes: ed8fe20205ac ("net: dsa: mv88e6xxx: prevent interrupt storm caused by mv88e6390x_port_set_cmode") Cc: Heiner Kallweit Cc: Andrew Lunn Cc: Vivien Didelot Cc: Florian Fainelli Cc: "David S. Miller" Signed-off-by: Shaokun Zhang --- drivers/net/dsa/mv88e6xxx/chip.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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) -- 2.7.4