OSDN Git Service

staging: rtl8192e: Remove u16 cast for u16 return value
authorSolomon Tan <wjsota@gmail.com>
Sat, 23 Apr 2022 13:01:50 +0000 (21:01 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Apr 2022 09:35:19 +0000 (11:35 +0200)
Remove explicit u16 cast of the function Mk16 return value.
The variable hi does not need to be casted explicitly to u16 as it will
already be casted implicitly.

Signed-off-by: Solomon Tan <wjsota@gmail.com>
Link: https://lore.kernel.org/r/20220423130150.161903-8-wjsota@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtllib_crypt_tkip.c

index a305b79..8bc9565 100644 (file)
@@ -136,7 +136,7 @@ static inline u16 Hi16(u32 val)
 
 static inline u16 Mk16(u8 hi, u8 lo)
 {
-       return lo | (((u16)hi) << 8);
+       return lo | (hi << 8);
 }