[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <df65d515-7a04-22d6-d99d-55f119a9116d@hisilicon.com>
Date: Tue, 5 Mar 2019 08:57:53 +0800
From: Zhangshaokun <zhangshaokun@...ilicon.com>
To: Andrew Lunn <andrew@...n.ch>
CC: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Heiner Kallweit <hkallweit1@...il.com>,
Vivien Didelot <vivien.didelot@...il.com>,
"Florian Fainelli" <f.fainelli@...il.com>,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH -next] net: dsa: mv88e6xxx: Fix build warning when
CONFIG_NET_DSA_LEGACY is n
Hi Andrew,
On 2019/3/4 22: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.
>
Ok, I didn't check it carefully.
> [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 :-(
>
Hmm, I am not familiar wit it, please feel free to fix it.
Thanks,
Shaokun
> Andrew
>
>
>
>
> .
>
Powered by blists - more mailing lists