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]
Date:	Tue, 29 Nov 2011 18:47:58 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	patrick.kelle81@...il.com
Cc:	netdev@...r.kernel.org, romieu@...zoreil.com, sorbica@...lus.com.tw
Subject: Re: [PATCH] icplus: mdio_write(), remove unnecessary for loop

From: Patrick Kelle <patrick.kelle81@...il.com>
Date: Thu, 24 Nov 2011 16:39:05 +0100

> At this point the variable j is always set to 7 and the code within
> the loop has to run only once anyway.
> 
> Signed-off-by: Patrick Kelle <patrick.kelle81@...il.com>

You can simply this even further since p[7] is what is used here,
and this means len is one, the inner loop therefore executes only
once, and the p[7].field value is not used (it's zero in the table)
and the write to it is completely thrown away.

It all reduces to something like:

	ipg_write_phy_ctl(ioaddr, IPG_PC_MGMTCLK_LO | polarity);
	ipg_r8(PHY_CTRL);
	ipg_write_phy_ctl(ioaddr, IPG_PC_MGMTCLK_HI | polarity);

Which is just asserting the management clock low, then high, and
doing a PHY_CTRL read in between to force the write out, the read
data is not used at all.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ