Message ID | 20190903011813.13946-2-Larry.Finger@lwfinger.net (mailing list archive) |
---|---|
State | Accepted |
Commit | 3bf404b470f9295135b7c93cddc78d7a5888e6d5 |
Delegated to: | Kalle Valo |
Headers | show |
Series | rtlwifi: Fix some errors in recent patches | expand |
Larry Finger <Larry.Finger@lwfinger.net> wrote: > In commit bd421dab7515 ("rtlwifi: rtl8821ae: Convert macros that set > descriptor"), all the routines that get fields from a descriptor > were changed to return signed integer values. This is incorrect for the > routines that get the entire 32-bit word. In this case, an unsigned > quantity is required. > > Fixes: bd421dab7515 ("rtlwifi: rtl8821ae: Convert macros that set descriptor") > Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> 3 patches applied to wireless-drivers-next.git, thanks. 3bf404b470f9 rtlwifi: rtl8821ae: Fix incorrect returned values 38fcdcbd3def rtlwifi: rtl8188ee: Fix incorrect returned values fe025ef7d066 rtlwifi: rtl8192ce: Fix incorrect returned values
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.h b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.h index 81951f0c80b6..a9ed6fd41089 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.h +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.h @@ -214,7 +214,7 @@ static inline void set_tx_desc_tx_buffer_address(__le32 *__pdesc, u32 __val) *(__pdesc + 10) = cpu_to_le32(__val); } -static inline int get_tx_desc_tx_buffer_address(__le32 *__pdesc) +static inline u32 get_tx_desc_tx_buffer_address(__le32 *__pdesc) { return le32_to_cpu(*(__pdesc + 10)); } @@ -324,12 +324,12 @@ static inline int get_rx_desc_bw(__le32 *__pdesc) return le32_get_bits(*(__pdesc + 4), GENMASK(5, 4)); } -static inline int get_rx_desc_tsfl(__le32 *__pdesc) +static inline u32 get_rx_desc_tsfl(__le32 *__pdesc) { return le32_to_cpu(*(__pdesc + 5)); } -static inline int get_rx_desc_buff_addr(__le32 *__pdesc) +static inline u32 get_rx_desc_buff_addr(__le32 *__pdesc) { return le32_to_cpu(*(__pdesc + 6)); } @@ -341,12 +341,12 @@ static inline void set_rx_desc_buff_addr(__le32 *__pdesc, u32 __val) /* TX report 2 format in Rx desc*/ -static inline int get_rx_rpt2_desc_macid_valid_1(__le32 *__status) +static inline u32 get_rx_rpt2_desc_macid_valid_1(__le32 *__status) { return le32_to_cpu(*(__status + 4)); } -static inline int get_rx_rpt2_desc_macid_valid_2(__le32 *__status) +static inline u32 get_rx_rpt2_desc_macid_valid_2(__le32 *__status) { return le32_to_cpu(*(__status + 5)); }
In commit bd421dab7515 ("rtlwifi: rtl8821ae: Convert macros that set descriptor"), all the routines that get fields from a descriptor were changed to return signed integer values. This is incorrect for the routines that get the entire 32-bit word. In this case, an unsigned quantity is required. Fixes: bd421dab7515 ("rtlwifi: rtl8821ae: Convert macros that set descriptor") Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> --- drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)