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 Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 546ECC433F5 for ; Mon, 2 May 2022 07:03:44 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7D4CB83F2B; Mon, 2 May 2022 09:03:38 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1651475018; bh=KU0ykbwrveDzRmQ4ettl4fjzClSY5ECdeNLyDTk07rU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=RldU2/tCkGDSEi5Nh7N51unvUm8p6XXl4/Cg1Zl+5iTjk5eRBkVPzL/CyqSqHbmaN xoKFxRouqClxFUo+pVJpb/HpeF6d+TOlzV03B6rWqDtDZ5dLTruls/MD312AjXbU+Z fjPZYizwPptE4X06rm69ikBPiW9i/08mzUghzfq7K1vw7kVWTWL/JbAeqC8pKMWP7N W02CQCBvBkYKpTDfW4PeQl4UEGxyEwuzfFluhMjb1x9v3kZSP3u4PbO+iygH7LIBol MYdFKYwShwBvlpCPmuxkynLJ1iZCwyDTONyd3sqDHd5c+zVGRVyi7aAADJ7t3YNnv2 jHnEZ3EzHkpZw== Received: by phobos.denx.de (Postfix, from userid 109) id 2012283F2F; Mon, 2 May 2022 09:03:36 +0200 (CEST) Received: from mout-u-107.mailbox.org (mout-u-107.mailbox.org [IPv6:2001:67c:2050:101:465::107]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6734683F40 for ; Mon, 2 May 2022 09:03:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp2.mailbox.org (unknown [91.198.250.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-107.mailbox.org (Postfix) with ESMTPS id 4KsDZm45xkz9sW2; Mon, 2 May 2022 09:03:28 +0200 (CEST) Message-ID: <2a48d521-6dc3-e4bd-0ab9-53e8e34431f5@denx.de> Date: Mon, 2 May 2022 09:03:14 +0200 MIME-Version: 1.0 Subject: Re: [PATCH u-boot-marvell 17/19] net: mvneta: Drop fixed_link member from private struct Content-Language: en-US To: =?UTF-8?Q?Marek_Beh=c3=ban?= Cc: Robert Marko , =?UTF-8?Q?Pali_Roh=c3=a1r?= , U-Boot-Denx , Ramon Fried , Joe Hershberger , =?UTF-8?Q?Marek_Beh=c3=ban?= References: <20220427104202.1205-1-kabel@kernel.org> <20220427104202.1205-18-kabel@kernel.org> From: Stefan Roese In-Reply-To: <20220427104202.1205-18-kabel@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean On 27.04.22 12:42, Marek Behún wrote: > From: Marek Behún > > Since this member is checked only at two places drop it and inline it's > usage. > > Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Thanks, Stefan > --- > drivers/net/mvneta.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/drivers/net/mvneta.c b/drivers/net/mvneta.c > index 4917857681..378789b632 100644 > --- a/drivers/net/mvneta.c > +++ b/drivers/net/mvneta.c > @@ -273,7 +273,6 @@ struct mvneta_port { > u16 rx_ring_size; > > phy_interface_t phy_interface; > - bool fixed_link; > unsigned int link; > unsigned int duplex; > unsigned int speed; > @@ -813,7 +812,7 @@ static void mvneta_defaults_set(struct mvneta_port *pp) > mvreg_write(pp, MVNETA_SDMA_CONFIG, val); > > /* Enable PHY polling in hardware if not in fixed-link mode */ > - if (!pp->fixed_link) { > + if (pp->phydev->phy_id != PHY_FIXED_ID) { > mvreg_write(pp, MVNETA_PHY_ADDR, pp->phydev->addr); > > val = mvreg_read(pp, MVNETA_UNIT_CONTROL); > @@ -1173,7 +1172,7 @@ static void mvneta_adjust_link(struct udevice *dev) > * be added). Also, why is ADVERT_FC enabled if we don't enable > * inband AN at all? > */ > - if (pp->fixed_link) > + if (pp->phydev->phy_id == PHY_FIXED_ID) > val = MVNETA_GMAC_FORCE_LINK_UP | > MVNETA_GMAC_IB_BYPASS_AN_EN | > MVNETA_GMAC_SET_FC_EN | > @@ -1431,8 +1430,6 @@ static int mvneta_start(struct udevice *dev) > return -ENODEV; > } > > - pp->fixed_link = phydev->phy_id == PHY_FIXED_ID; > - > pp->phydev = phydev; > phy_config(phydev); > phy_startup(phydev); Viele Grüße, Stefan Roese -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de