lkml.org 
[lkml]   [2026]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFT PATCH v3 3/5] staging: rtl8723bs: simplify boolean return in IsFrameTypeCtrl()
On April 5, 2026 1:41:30 PM GMT+02:00, Prithvi Tambewagh <activprithvi@gmail.com> wrote:
>Replace the simple if-else statement which checked value of
>GetFrameType(pframe), if equal to WIFI_CTRL_TYPE, function
>IsFrameTypeCtrl() returned true else false, with a single return
>statement returning true only if GetFrameType(pframe) == WIFI_CTRL_TYPE
>otherwise returns false.
>
>Signed-off-by: Prithvi Tambewagh <activprithvi@gmail.com>
>---
> drivers/staging/rtl8723bs/include/wifi.h | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
>diff --git a/drivers/staging/rtl8723bs/include/wifi.h b/drivers/staging/rtl8723bs/include/wifi.h
>index 230b2c4ffd3b..2876f15f13d1 100644
>--- a/drivers/staging/rtl8723bs/include/wifi.h
>+++ b/drivers/staging/rtl8723bs/include/wifi.h
>@@ -275,10 +275,7 @@ static inline unsigned char *get_hdr_bssid(unsigned char *pframe)
>
> static inline int IsFrameTypeCtrl(unsigned char *pframe)
> {
>- if (WIFI_CTRL_TYPE == GetFrameType(pframe))
>- return true;
>- else
>- return false;
>+ return GetFrameType(pframe) == WIFI_CTRL_TYPE;
> }
> /*-----------------------------------------------------------------------------
> Below is for the security related definition

LGTM,
Reviewed-by: Luka Gejak <luka.gejak@linux.dev>

\
 
 \ /
  Last update: 2026-04-05 14:58    [W:0.223 / U:25.777 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog