lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <89c54319-82d0-4cb3-b3be-ccdf6dcf2742@lunn.ch>
Date: Tue, 27 Feb 2024 00:05:33 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Konrad Dybcio <konrad.dybcio@...aro.org>
Cc: Sarosh Hasan <quic_sarohasa@...cinc.com>, Vinod Koul <vkoul@...nel.org>,
	Bhupesh Sharma <bhupesh.sharma@...aro.org>,
	Andy Gross <agross@...nel.org>,
	Bjorn Andersson <andersson@...nel.org>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Rob Herring <robh+dt@...nel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Alexandre Torgue <alexandre.torgue@...s.st.com>,
	Jose Abreu <joabreu@...opsys.com>,
	Maxime Coquelin <mcoquelin.stm32@...il.com>, netdev@...r.kernel.org,
	linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	linux-stm32@...md-mailman.stormreply.com,
	Prasad Sodagudi <psodagud@...cinc.com>,
	Andrew Halaney <ahalaney@...hat.com>, Rob Herring <robh@...nel.org>,
	kernel@...cinc.com, Sneh Shah <quic_snehshah@...cinc.com>,
	Suraj Jaiswal <quic_jsuraj@...cinc.com>
Subject: Re: [PATCH net-next] net: stmmac: dwmac-qcom-ethqos: Update link
 clock rate only for RGMII

> >   static void
> >   ethqos_update_link_clk(struct qcom_ethqos *ethqos, unsigned int speed)
> >   {
> > -	switch (speed) {
> > -	case SPEED_1000:
> > -		ethqos->link_clk_rate =  RGMII_1000_NOM_CLK_FREQ;
> > -		break;
> > +	if (phy_interface_mode_is_rgmii(ethqos->phy_mode)) {
> > +		switch (speed) {
> > +		case SPEED_1000:
> > +			ethqos->link_clk_rate =  RGMII_1000_NOM_CLK_FREQ;
> > +			break;
> > -	case SPEED_100:
> > -		ethqos->link_clk_rate =  RGMII_ID_MODE_100_LOW_SVS_CLK_FREQ;
> > -		break;
> > +		case SPEED_100:
> > +			ethqos->link_clk_rate =  RGMII_ID_MODE_100_LOW_SVS_CLK_FREQ;
> > +			break;
> > -	case SPEED_10:
> > -		ethqos->link_clk_rate =  RGMII_ID_MODE_10_LOW_SVS_CLK_FREQ;
> > -		break;
> > -	}
> > +		case SPEED_10:
> > +			ethqos->link_clk_rate =  RGMII_ID_MODE_10_LOW_SVS_CLK_FREQ;
> > +			break;
> > +		}
> > -	clk_set_rate(ethqos->link_clk, ethqos->link_clk_rate);
> > +		clk_set_rate(ethqos->link_clk, ethqos->link_clk_rate);
> > +	}
> >   }
> 
> if (!phy_interface_mode_is_rgmii(ethqos->phy_mode))
> 	return 0;

It is a void function, so no 0, but otherwise this does look less
invasive.

   Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ