]> git.baikalelectronics.ru Git - kernel.git/commit
ath9k: simplify ATH_EP_RND
authorBob Copeland <me@bobcopeland.com>
Tue, 26 Feb 2013 18:41:52 +0000 (13:41 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 6 Mar 2013 21:25:47 +0000 (16:25 -0500)
commit3e4f9dc0f0ce4c49041f355275da2ed2bd6ed1e7
tree1ac23c4863bf90934bc6e0b087012861d078e19b
parent6181926f56cc6a25c9c2b686d52fa15c87072910
ath9k: simplify ATH_EP_RND

Remove the embedded branch to make the ATH_EP_RND macro a little
clearer.  The new version also generates better code, saving 24
bytes of text:

   text    data     bss     dec     hex filename
  87858    1641      24   89523   15db3 ath9k_orig.ko
  87834    1641      24   89499   15d9b ath9k_new.ko

Although neither version handles negative values particularly well,
the lone caller clamps all negative values to zero anyway.  I have
verified that the results are the same for the range of possible
positive rssi values.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/common.h