diff mbox series

[net-next] ieee802154: Replace BOOL_TO_STR() with str_true_false()

Message ID 20241020112313.53174-2-thorsten.blum@linux.dev (mailing list archive)
State New
Delegated to: Netdev Maintainers
Headers show
Series [net-next] ieee802154: Replace BOOL_TO_STR() with str_true_false() | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 5 this patch: 5
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 8 of 8 maintainers
netdev/build_clang success Errors and warnings before: 3 this patch: 3
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 4 this patch: 4
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 24 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-10-20--12-00 (tests: 765)

Commit Message

Thorsten Blum Oct. 20, 2024, 11:23 a.m. UTC
Replace the custom BOOL_TO_STR() macro with the str_true_false() helper
function and remove the macro.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 net/ieee802154/trace.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Miquel Raynal Oct. 21, 2024, 7:27 a.m. UTC | #1
Hi Thorsten,

thorsten.blum@linux.dev wrote on Sun, 20 Oct 2024 13:23:13 +0200:

> Replace the custom BOOL_TO_STR() macro with the str_true_false() helper
> function and remove the macro.
> 
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>

Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>

Thanks,
Miquèl
diff mbox series

Patch

diff --git a/net/ieee802154/trace.h b/net/ieee802154/trace.h
index 591ce0a16fc0..284b63a0834e 100644
--- a/net/ieee802154/trace.h
+++ b/net/ieee802154/trace.h
@@ -35,8 +35,6 @@ 
 #define WPAN_CCA_PR_FMT	"cca_mode: %d, cca_opt: %d"
 #define WPAN_CCA_PR_ARG __entry->cca_mode, __entry->cca_opt
 
-#define BOOL_TO_STR(bo) (bo) ? "true" : "false"
-
 /*************************************************************
  *			rdev->ops traces		     *
  *************************************************************/
@@ -273,7 +271,7 @@  TRACE_EVENT(802154_rdev_set_lbt_mode,
 	),
 	TP_printk(WPAN_PHY_PR_FMT ", " WPAN_DEV_PR_FMT
 		", lbt mode: %s", WPAN_PHY_PR_ARG,
-		WPAN_DEV_PR_ARG, BOOL_TO_STR(__entry->mode))
+		WPAN_DEV_PR_ARG, str_true_false(__entry->mode))
 );
 
 TRACE_EVENT(802154_rdev_set_ackreq_default,
@@ -292,7 +290,7 @@  TRACE_EVENT(802154_rdev_set_ackreq_default,
 	),
 	TP_printk(WPAN_PHY_PR_FMT ", " WPAN_DEV_PR_FMT
 		", ackreq default: %s", WPAN_PHY_PR_ARG,
-		WPAN_DEV_PR_ARG, BOOL_TO_STR(__entry->ackreq))
+		WPAN_DEV_PR_ARG, str_true_false(__entry->ackreq))
 );
 
 TRACE_EVENT(802154_rdev_trigger_scan,