Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2461596imb; Mon, 4 Mar 2019 05:53:41 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia4MyyytEW4lJR1itSgEaDPgAwL8m6LFE5iEfOrvahnrRiJjm3aodgktifi8tIsjJzei5RF X-Received: by 2002:aa7:928d:: with SMTP id j13mr20276798pfa.112.1551707621077; Mon, 04 Mar 2019 05:53:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551707621; cv=none; d=google.com; s=arc-20160816; b=RTGfogCai2FVV38aYQJWiP4D8d85F68OxrxpYopdOPQY1/1bTQ5+OHpVuD5RYq8JZi 8QBvOdaQBAiCy47i6Ril0jtA2ZYd0T0MwFvnmUDLMF36SHHTTH2lgXe0NSt221+bu/xL HIAiOpWA6A3gJaylrnd4kbSPi+7ekVS9HfvCO0/BmXUIZsr3GRWmvlrynE6DEuqUqH2M 8OzBOCmm+3q1WFgZkAlB5UwHdCd+ZxlqEeOmvvh6n7MHJWv2HTtOBem7MlbnkYIKmjeG W8Y9nYVp/4RilmiFAY4T16Lux7iv5qqxDfmvtMMTUVA7OEb9YqBlIhHjMKPDopHJ6YK8 tvpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=CcXkJR0K8l/JwAJGw4v3ASDsnbQebYOnLOqsHHLjaiI=; b=mUnOxtLEH19LiUKkRCvW8CKRJpRUJXmCjSyxvxJhIbY3+YWJjp7PxctcLRrkVZNdOC j1pSjC1qITusetQXqLn8EUievWFGkTkLt2+7pUoYkW7vDkYPC+UaWBTsDu1ut6E6B9kd BTnAtgDphP7aFcD5YZnRAbNj+6seqGoBshPpaSjcoEddfC+NHGNeXDRQ5YnjYwvzL/oX dcb+zOsqB25euGUDX6/oJKy87XniwiuqvLn0Sz8eNGb6YSPVDFE28ia0pNkAyzdxtnnr MWerSP3PjbzvQdQH8IJklJzmOliJQ+sd7muhHSpIZGPM0qLYeZ5VmRIoASIxA35vur7J rVXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=tehbl+iL; 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 d72si5410687pfm.284.2019.03.04.05.53.26; Mon, 04 Mar 2019 05:53:41 -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; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=tehbl+iL; 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 S1726861AbfCDN0W (ORCPT + 99 others); Mon, 4 Mar 2019 08:26:22 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:45722 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726414AbfCDN0W (ORCPT ); Mon, 4 Mar 2019 08:26:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Transfer-Encoding:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=CcXkJR0K8l/JwAJGw4v3ASDsnbQebYOnLOqsHHLjaiI=; b=tehbl+iLMJB3JfWwwemPk7aWg5 TLRqMwglUE3NT2TymvldtVkt5jGV5Y6vIAwk/g1qLlKIjhkIIrdG5XL0SledJHV8u2mjF64UWFF7g sx30RQAziaeNU4ZSDpwE6OINWCg/DN5xxU00SIbRw4p5TuIVN+QeQltozwVn50JA1dD4=; Received: from andrew by vps0.lunn.ch with local (Exim 4.89) (envelope-from ) id 1h0nbl-0003WB-LL; Mon, 04 Mar 2019 14:26:17 +0100 Date: Mon, 4 Mar 2019 14:26:17 +0100 From: Andrew Lunn To: Shaokun Zhang Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Heiner Kallweit , Vivien Didelot , Florian Fainelli , "David S. Miller" Subject: Re: [PATCH -next] net: dsa: mv88e6xxx: Fix build warning when CONFIG_NET_DSA_LEGACY is n Message-ID: <20190304132617.GB26378@lunn.ch> References: <1551703381-52115-1-git-send-email-zhangshaokun@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1551703381-52115-1-git-send-email-zhangshaokun@hisilicon.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 04, 2019 at 08:43:01PM +0800, Shaokun Zhang wrote: > 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. Hi Shaokun, Heiner Although this fixes the warning, i suspect there i something wrong with the original patch adding mv88e6390x_port_set_cmode(). It should also be used without CONFIG_NET_DSA_LEGACY. Andrew > > 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 >