[OpenWrt-Devel] [PATCH 1/3] ramips: Fix whitespace in the switch driver.
Vittorio G (VittGam)
openwrt at vittgam.net
Fri Dec 11 09:18:45 EST 2015
On 11/12/2015 15:12:32 CET, Arjen de Korte wrote:
>> Because there are two __be32's used to fetch data from the device
>> tree; one is used only once for the portmap, while the other is
>> used three times, for the two registers and for the led_polarity.
>> Maybe the name should be tmp instead, but I think that the variable
>> should be just one here.
> You're trying to outsmart the compiler in order to save space? Any compiler from the last decade will take notice of the scope in which variables are used and will reuse stack (or register) space if the value they hold is no longer needed/used. I'm with John here, clarity in the naming of variables is much more important.
Well, if the single "tmp" approach is not good, the current approach
that uses reg_init even for the led_polarity is not good either...
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
More information about the openwrt-devel