From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A213C433B4 for ; Thu, 29 Apr 2021 21:32:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C4F0D61463 for ; Thu, 29 Apr 2021 21:32:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237385AbhD2Vdb (ORCPT ); Thu, 29 Apr 2021 17:33:31 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:46830 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233293AbhD2Vda (ORCPT ); Thu, 29 Apr 2021 17:33:30 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lcEGv-001iO4-7z; Thu, 29 Apr 2021 23:32:33 +0200 Date: Thu, 29 Apr 2021 23:32:33 +0200 From: Andrew Lunn To: Joakim Zhang Cc: "peppe.cavallaro@st.com" , "alexandre.torgue@st.com" , "joabreu@synopsys.com" , "davem@davemloft.net" , "kuba@kernel.org" , "f.fainelli@gmail.com" , "Jisheng.Zhang@synaptics.com" , "netdev@vger.kernel.org" , dl-linux-imx Subject: Re: [PATCH V3 net] net: stmmac: fix MAC WoL unwork if PHY doesn't support WoL Message-ID: References: <20210428074107.2378-1-qiangqing.zhang@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > > > - if (!priv->plat->pmt) { > > > + /* First check if can WoL from PHY */ > > > + phylink_ethtool_get_wol(priv->phylink, &wol_phy); > > > > This could return an error. In which case, you probably should not trust > > wol_phy. > phylink_ethtool_get_wol() is a void function Upps. Yes, you are correct. Ignore what i said! Andre