All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rtlwifi: rtl8821ae: Make sure loop counter is signed on all architectures
@ 2016-04-14 12:48 David Müller
  2016-04-14 15:42 ` Larry Finger
  0 siblings, 1 reply; 6+ messages in thread
From: David Müller @ 2016-04-14 12:48 UTC (permalink / raw)
  To: linux-wireless; +Cc: Larry Finger

The for-loop condition does not work correctly on architectures where "char"
is unsigned. Fix it by using an "int", which may also result in more
efficient code.

Signed-off-by: David Müller <d.mueller@elsoft.ch>
---
 drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
index 74165b3..fcd84d1 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c
@@ -959,7 +959,7 @@ static void _rtl8821ae_phy_store_txpower_by_rate_base(struct ieee80211_hw *hw)
 static void _phy_convert_txpower_dbm_to_relative_value(u32 *data, u8 start,
 						u8 end, u8 base_val)
 {
-	char i = 0;
+	int i = 0;
 	u8 temp_value = 0;
 	u32 temp_data = 0;
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-04-26  9:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-14 12:48 [PATCH] rtlwifi: rtl8821ae: Make sure loop counter is signed on all architectures David Müller
2016-04-14 15:42 ` Larry Finger
2016-04-15  6:50   ` [PATCH v2] " David Müller
2016-04-15 15:34     ` Larry Finger
2016-04-26  9:11     ` [v2] rtlwifi: rtl8821ae: Make sure loop counter is signed on allarchitectures Kalle Valo
2016-04-26  9:39       ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.