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:	Thu, 1 Dec 2011 19:53:29 +0100
From:	Francois Romieu <romieu@...zoreil.com>
To:	Patrick Kelle <patrick.kelle81@...il.com>
Cc:	netdev@...r.kernel.org, davem@...emloft.net, sorbica@...lus.com.tw
Subject: Re: [PATCH v2] icplus: mdio_write(), remove unnecessary for loop

Patrick Kelle <patrick.kelle81@...il.com> :
[...]
> As suggested by David Miller:
> "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."

Acked-by: Francois Romieu <romieu@...zoreil.com>

However you can:
- shorten p[] as p[7] is never used
- use read_phy_bit() to avoid the last three lines
- ARRAY_SIZE(p) the first loop (so the first limit - 7 - appears)

-- 
Ueimor
--
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