The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 1/3] staging: rtl8723bs: remove redundant ternary operators from return
@ 2026-08-03 19:39 Ashmit Kumar
  2026-08-04  7:18 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Ashmit Kumar @ 2026-08-03 19:39 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, Ashmit Kumar

The Linux kernel coding style specifies that boolean expressions
do not need a redundant `? true : false` ternary operator.
Additionally, return is not a function and therefore parentheses
are not required.

Signed-off-by: Ashmit Kumar <work.ashmitkumar@gmail.com>
---
 drivers/staging/rtl8723bs/os_dep/osdep_service.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/osdep_service.c b/drivers/staging/rtl8723bs/os_dep/osdep_service.c
index 4cfdf7c6234..214c1fd9b3e 100644
--- a/drivers/staging/rtl8723bs/os_dep/osdep_service.c
+++ b/drivers/staging/rtl8723bs/os_dep/osdep_service.c
@@ -130,7 +130,7 @@ void rtw_buf_update(u8 **buf, u32 *buf_len, u8 *src, u32 src_len)
  */
 inline bool rtw_cbuf_full(struct rtw_cbuf *cbuf)
 {
-	return (cbuf->write == cbuf->read - 1) ? true : false;
+	return cbuf->write == cbuf->read - 1;
 }
 
 /**
@@ -141,7 +141,7 @@ inline bool rtw_cbuf_full(struct rtw_cbuf *cbuf)
  */
 inline bool rtw_cbuf_empty(struct rtw_cbuf *cbuf)
 {
-	return (cbuf->write == cbuf->read) ? true : false;
+	return cbuf->write == cbuf->read;
 }
 
 /**
-- 
2.43.0


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

end of thread, other threads:[~2026-08-04  7:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-03 19:39 [PATCH 1/3] staging: rtl8723bs: remove redundant ternary operators from return Ashmit Kumar
2026-08-04  7:18 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox