From: Mashiro Chen <mashiro.chen@mailbox.org>
To: gregkh@linuxfoundation.org
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Mashiro Chen <mashiro.chen@mailbox.org>
Subject: [PATCH 3/4] staging: rtl8723bs: remove unnecessary do-while for macros
Date: Sat, 28 Mar 2026 22:27:08 +0800 [thread overview]
Message-ID: <20260328142709.330401-4-mashiro.chen@mailbox.org> (raw)
In-Reply-To: <20260328142709.330401-1-mashiro.chen@mailbox.org>
Remove unnecessary do-while loops and trailing semicolons
for single statement macros to comply with Linux kernel
coding style.
Signed-off-by: Mashiro Chen <mashiro.chen@mailbox.org>
---
drivers/staging/rtl8723bs/include/basic_types.h | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/rtl8723bs/include/basic_types.h b/drivers/staging/rtl8723bs/include/basic_types.h
index edd64bcf2..02965403e 100644
--- a/drivers/staging/rtl8723bs/include/basic_types.h
+++ b/drivers/staging/rtl8723bs/include/basic_types.h
@@ -53,19 +53,14 @@
/* Write data to memory */
#define WRITEEF1BYTE(_ptr, _val) \
- do { \
- (*((u8 *)(_ptr))) = EF1BYTE(_val); \
- } while (0)
+ ((*((u8 *)(_ptr))) = EF1BYTE(_val))
+
/* Write le data to memory in host ordering */
#define WRITEEF2BYTE(_ptr, _val) \
- do { \
- (*((u16 *)(_ptr))) = EF2BYTE(_val); \
- } while (0)
+ ((*((u16 *)(_ptr))) = EF2BYTE(_val))
#define WRITEEF4BYTE(_ptr, _val) \
- do { \
- (*((u32 *)(_ptr))) = EF4BYTE(_val); \
- } while (0)
+ ((*((u32 *)(_ptr))) = EF4BYTE(_val))
/*
* Create a bit mask
--
2.53.0
next prev parent reply other threads:[~2026-03-28 14:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-28 14:27 [PATCH 0/4] staging: rtl8723bs: macro fixes in basic_types.h Mashiro Chen
2026-03-28 14:27 ` [PATCH 1/4] staging: rtl8723bs: fix logic bug in WRITEEF4BYTE macro Mashiro Chen
2026-03-30 9:35 ` Dan Carpenter
2026-03-30 11:32 ` Mashiro Chen
2026-03-28 14:27 ` [PATCH 2/4] staging: rtl8723bs: wrap complex macros with parentheses Mashiro Chen
2026-03-28 14:27 ` Mashiro Chen [this message]
2026-03-28 14:27 ` [PATCH 4/4] staging: rtl8723bs: remove redundant blank lines in basic_types.h Mashiro Chen
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=20260328142709.330401-4-mashiro.chen@mailbox.org \
--to=mashiro.chen@mailbox.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox