CC: [email protected]
BCC: [email protected]
CC: [email protected]
TO: Denis Efremov <[email protected]>
CC: Julia Lawall <[email protected]>
CC: [email protected]
CC: Kalle Valo <[email protected]>
CC: Jakub Kicinski <[email protected]>
CC: [email protected]
CC: [email protected]
CC: [email protected]

From: kernel test robot <[email protected]>

drivers/net/wireless/ath/ath9k/ar9003_phy.c:1829:19-21: WARNING opportunity for 
min()


 Check for opencoded min(), max() implementations.
 Generated patches sometimes require adding a cast to fix compile warning.
 Warnings/patches scope intentionally limited to a function body.

Generated by: scripts/coccinelle/misc/minmax.cocci

CC: Denis Efremov <[email protected]>
Reported-by: kernel test robot <[email protected]>
Signed-off-by: kernel test robot <[email protected]>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   3e732ebf7316ac83e8562db7e64cc68aec390a18
commit: 5f66f73b9ff4dcabd4e2405ba9c32e80e02f9408 coccinelle: misc: add minmax 
script
:::::: branch date: 15 hours ago
:::::: commit date: 11 months ago

Please take the patch only if it's a positive warning. Thanks!

 drivers/net/wireless/ath/ath9k/ar9003_phy.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
@@ -1826,7 +1826,7 @@ static void ar9003_hw_tx99_set_txpower(s
        static u8 p_pwr_array[ar9300RateSize] = { 0 };
        unsigned int i;
 
-       txpower = txpower <= MAX_RATE_POWER ? txpower : MAX_RATE_POWER;
+       txpower = min(txpower, MAX_RATE_POWER);
        for (i = 0; i < ar9300RateSize; i++)
                p_pwr_array[i] = txpower;
 
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to