From: Erick Karanja <karanja99erick@gmail.com>
To: gregkh@linuxfoundation.org, outreachy@lists.linux.dev
Cc: karanja99erick@gmail.com, philipp.g.hortmann@gmail.com,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH 0/3] staging: rtl8723bs: Code cleanup patches
Date: Wed, 2 Apr 2025 15:47:40 +0300 [thread overview]
Message-ID: <cover.1743596287.git.karanja99erick@gmail.com> (raw)
This patchset refactors the rtl8723bs driver by replacing
integer literals (1 and 0) with true and false,
improving code readability and consistency with standard kernel practices.
The transformation was performed using Coccinelle.
below is the coccinelle script used:
@initialize:ocaml@
@@
let same_function p q =
(List.hd p).Coccilib.current_element = (List.hd q).Coccilib.current_element
@r@
expression e;
position p;
symbol true,false;
@@
e =@p \(true\|false\)
@@
expression r.e;
position q : script:ocaml(r.p) { same_function p q };
@@
e =@q
(
- 1
+ true
|
- 0
+ false
)
@s@
type T;
T e;
identifier fld;
symbol true,false;
@@
e.fld = \(true\|false\)
@@
type s.T;
T e;
identifier s.fld;
@@
e.fld =
(
- 1
+ true
|
- 0
+ false
)
Erick Karanja (3):
staging: rtl8723bs: Use true/false instead of 1/0
staging: rtl8723bs: Use true/false instead of 1/0
staging: rtl8723bs: Use true/false instead of 1/0
drivers/staging/rtl8723bs/core/rtw_ap.c | 12 ++++++------
drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 4 ++--
drivers/staging/rtl8723bs/core/rtw_recv.c | 2 +-
3 files changed, 9 insertions(+), 9 deletions(-)
--
2.43.0
next reply other threads:[~2025-04-02 12:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-02 12:47 Erick Karanja [this message]
2025-04-02 12:47 ` [PATCH 1/3] staging: rtl8723bs: Use true/false instead of 1/0 Erick Karanja
2025-04-02 12:54 ` Julia Lawall
2025-04-02 12:47 ` [PATCH 2/3] " Erick Karanja
2025-04-02 12:54 ` Julia Lawall
2025-04-02 12:47 ` [PATCH 3/3] " Erick Karanja
2025-04-02 12:55 ` Julia Lawall
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=cover.1743596287.git.karanja99erick@gmail.com \
--to=karanja99erick@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=outreachy@lists.linux.dev \
--cc=philipp.g.hortmann@gmail.com \
/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