From: Ashmit Kumar <work.ashmitkumar@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Ashmit Kumar <work.ashmitkumar@gmail.com>
Subject: [PATCH 1/3] staging: rtl8723bs: remove redundant ternary operators from return
Date: Mon, 3 Aug 2026 19:39:22 +0000 [thread overview]
Message-ID: <20260803193922.11111-1-work.ashmitkumar@gmail.com> (raw)
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
next reply other threads:[~2026-08-03 19:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-03 19:39 Ashmit Kumar [this message]
2026-08-04 7:18 ` [PATCH 1/3] staging: rtl8723bs: remove redundant ternary operators from return Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260803193922.11111-1-work.ashmitkumar@gmail.com \
--to=work.ashmitkumar@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.