Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp2686944imb; Mon, 4 Mar 2019 11:23:55 -0800 (PST) X-Google-Smtp-Source: APXvYqzGbZegs03ETVnI3e79uUmcTfMuUbRa00VqoucVJaV5sNta73+WY4iWdBErRPRzEBczAUYJ X-Received: by 2002:a62:1283:: with SMTP id 3mr21968182pfs.122.1551727435156; Mon, 04 Mar 2019 11:23:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551727435; cv=none; d=google.com; s=arc-20160816; b=K2UnChW/dHp75zIYHNd/EYM1Fbg3HcpE1uL8W3C94yCazz1tyAUSvRbxNb3xd0ftI+ 65Zn9X00ziI0Cywylfiuxg9s2nA+2o2gVSV7U21SBVgRhcBL6i9XhpK0WIDWDp8ih3y0 o3ni+FtqtUvIr81W86+5xSfb9ihV7HWfwbuepu5B9nI6NJDDVaHdezGq9oGkPPnhG3YA a5B4xdwpqnV8U0xgCHgfFtWcrL2nw5jv1BoFvETInTeQ1i7SVge+Q+K0Z6J31nH8pEBf WfHt0uCmklnq9Uwx64bhsS7FoH3s8xQksOQlbv3JW3a1R50h3hOqd1u7UigvJ3XeK593 9UTQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=0hEEszT+3r9bCgNko8jeuMMYLdhjFZw1N7jxEN81dbc=; b=wzH4MBF6kw/yeOZRnADJbU33N3RKCEdLPGugBymya3Sruric1aIVFsZ+hy69mT4gYi 1wjpQb1I06zLjibFjuMkGhCdvP6ezu/wbLoTVMr9mwhHSKZosnjZQ1nMYZqorsTgefug exUkWEc3yUsah+r4GOo5JyVdn1pRrPTZbtUOzlHMZ7JZftHF8YbdcEs+i+kUhL/BH1YI B9R3lTXCRRpopLbfjH/38gqnqU4WxCaZj9DyNctBFgrslm+8kQfWfNjdjaZf0CRbBZw+ wz0WPpG5vYKqs+Cft832gnwNsfKmsDikBV5EXzSd/KhfVY04jLoTPfq8XAEOcClfdEZT 6Y6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="WXUl/7RF"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a62si5767989pge.506.2019.03.04.11.23.39; Mon, 04 Mar 2019 11:23:55 -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=pass header.i=@gmail.com header.s=20161025 header.b="WXUl/7RF"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727866AbfCDSbi (ORCPT + 99 others); Mon, 4 Mar 2019 13:31:38 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:36936 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726063AbfCDSbg (ORCPT ); Mon, 4 Mar 2019 13:31:36 -0500 Received: by mail-wm1-f66.google.com with SMTP id x10so155361wmg.2; Mon, 04 Mar 2019 10:31:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=0hEEszT+3r9bCgNko8jeuMMYLdhjFZw1N7jxEN81dbc=; b=WXUl/7RFnQFJGGgRMi5ceL/NnHgWe+TqJiUCaQ/g7vBnLG444pUE+oSJAXd68lVHkJ LrVM0dirrEqG5cjnkMtiTzBXqS+s/fVs2QNfGdK2WqjDrThXXLtNKlDcaxiWt3DdFXrh IY360rtA45yQUz6UZpC7mQj8mFjdFfuT1HH1ojHr7YKkZPq9+qK/2dPoL0Mww5lfdAtN xHOt1ZXXjdxpgNm7FTkPWEX6U25N4V8Emqso244csFn/7+nTlmfn8cAP0H2uLlv1i4il /fe670X0aA1MQwIc7AvCrg6XQosLCRGBp3HjRmi2UuhOnfR8blKe/pP805B2Vhu8jt6w OKFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=0hEEszT+3r9bCgNko8jeuMMYLdhjFZw1N7jxEN81dbc=; b=g6YA+RP82/XKwTBg+cXQfjn/0sC83Qz050S2iFl9mRZUvAxD/BZ9GsMCMD+tWoQA6q mmiJBZZ5lvsHxrhd4zqItfSCkdd/v7R359fbM8CC/EbKeyTsFs+3o94y/GQBRC3VODsT /llIJ58NABakFnpxkgSu8Pd8H6AtBMAgJLNvJGhJ3sqFFZHGeQYGEDI0amhvoGXY9wsp E/V1F1vAxZxbf52ukC67ooa7xME88GgP0pm0GwIbbJe+Qz/mVlItmjwCRNLGtgDAagWh LqilYPBXcvfLHX7fMMW2oWF06I4WL7+7byhVh842r7hATl1oUiioQ2mqMLvNSOCPNUGP lZgg== X-Gm-Message-State: APjAAAWmEi0gSsm2kqDoLzk5xTVt9mQt9vrd79ZSSkTZoVhQzqKIB8RK DpVuCe/9pL5Frgj/BIH8DbM= X-Received: by 2002:a1c:2e85:: with SMTP id u127mr314628wmu.45.1551724295067; Mon, 04 Mar 2019 10:31:35 -0800 (PST) Received: from ?IPv6:2003:ea:8bf1:e200:d8e4:889a:5ed6:37cb? (p200300EA8BF1E200D8E4889A5ED637CB.dip0.t-ipconnect.de. [2003:ea:8bf1:e200:d8e4:889a:5ed6:37cb]) by smtp.googlemail.com with ESMTPSA id y20sm13304455wra.51.2019.03.04.10.31.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Mar 2019 10:31:34 -0800 (PST) Subject: Re: [PATCH -next] net: dsa: mv88e6xxx: Fix build warning when CONFIG_NET_DSA_LEGACY is n To: Florian Fainelli , Andrew Lunn , Zhangshaokun Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Vivien Didelot , "David S. Miller" References: <1551703381-52115-1-git-send-email-zhangshaokun@hisilicon.com> <20190304132617.GB26378@lunn.ch> <20190304145710.GA17097@lunn.ch> <74a6581e-f761-0fb0-3200-e82b7ac88e75@gmail.com> <04ec6023-7385-d4ad-0bae-2c23e691c6f5@gmail.com> From: Heiner Kallweit Message-ID: Date: Mon, 4 Mar 2019 19:31:26 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <04ec6023-7385-d4ad-0bae-2c23e691c6f5@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04.03.2019 19:24, Florian Fainelli wrote: > On 3/4/19 10:18 AM, Heiner Kallweit wrote: >> On 04.03.2019 15:57, Andrew Lunn wrote: >>> On Mon, Mar 04, 2019 at 10:16:08PM +0800, Zhangshaokun wrote: >>>> Hi Andrew, >>>> >>>> On 2019/3/4 21:26, Andrew Lunn wrote: >>>>> 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. >>>> >>>> I checked the commit-id 2a93c1a3651f ("net: dsa: Allow compiling out legacy support") by Florian. >>>> Do you mean that CONFIG_NET_DSA_LEGACY shall be removed completely? :-) >>> >>> No, i suspect mv88e6390x_ports_cmode_init() is being called from the >>> wrong place, or needs to be called from a second location. >>> >>> [Goes and looks at the code] >>> >>> Yes, it should also be called in mv88e6xxx_probe(). I would call it >>> just after the call to mv88e6xxx_detect(), so that it is the same as >>> in mv88e6xxx_drv_probe(). >>> >>> There are two ways DSA drivers can be probed. The legacy way, which is >>> optional, and is slowly getting removed, and the current way. Heiner >>> is new to DSA and probably missed that, and only handled the legacy >>> probe method. I also missed checking when i reviewed to patch :-( >>> >> Right, I missed that, will submit a fix. >> >> I just saw that the Kconfig entry comment for NET_DSA_LEGACY says: >> "This feature is scheduled for removal in 4.17." >> >> Was forgotten to remove it or did somebody scream loud enough >> "But I depend on it" ? > > The intent was to remove it by that kernel version but the 88e6060 > driver still depends on it, and there appears to be some active users > that Andrew worked with. > I see, thanks. And migrating this driver to the new DSA framework version isn't possible or not worth the effort?