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] [thread-next>] [day] [month] [year] [list]
Date: Sun, 9 Jun 2024 13:22:56 +0200
From: Hans-Frieder Vogt <hfdevel@....net>
To: FUJITA Tomonori <fujita.tomonori@...il.com>, netdev@...r.kernel.org
Cc: andrew@...n.ch, horms@...nel.org, kuba@...nel.org, jiri@...nulli.us,
 pabeni@...hat.com, linux@...linux.org.uk, naveenm@...vell.com,
 jdamato@...tly.com
Subject: Re: [PATCH net-next v9 5/6] net: tn40xx: add mdio bus support

On 06.06.2024 01.26, FUJITA Tomonori wrote:
> +
> +static void tn40_mdio_set_speed(struct tn40_priv *priv, u32 speed)
> +{
> +	void __iomem *regs = priv->regs;
> +	int mdio_cfg;
> +
> +	mdio_cfg = readl(regs + TN40_REG_MDIO_CMD_STAT);
the result of the readl is nowhere used. And as far as I have seen it is
not needed to trigger anything. Therefore I suggest you delete this read
operation.
> +	if (speed == 1)
why not use the defined value TN40_MDIO_SPEED_1MHZ here? It would make
the logic of the function even clearer.
> +		mdio_cfg = (0x7d << 7) | 0x08;	/* 1MHz */
> +	else
> +		mdio_cfg = 0xA08;	/* 6MHz */
> +	mdio_cfg |= (1 << 6);
> +	writel(mdio_cfg, regs + TN40_REG_MDIO_CMD_STAT);
> +	msleep(100);
> +}
> +

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ