thunderbolt: Use str_enabled_disabled() helper
Subsystems (2)
PATCH 1/1 thunderbolt: Use str_enabled_disabled() helper
Use str_enabled_disabled() helper instead of open coding the same.
Signed-off-by Andy Shevchenko <[email protected]>
--- drivers/thunderbolt/switch.c | 5 +++-- drivers/thunderbolt/xdomain.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-)
drivers/thunderbolt/switch.c +3 -2
@@ -8,12 +8,13 @@#include <linux/delay.h> #include <linux/idr.h> +#include <linux/module.h> #include <linux/nvmem-provider.h> #include <linux/pm_runtime.h> #include <linux/sched/signal.h> #include <linux/sizes.h> #include <linux/slab.h> -#include <linux/module.h> +#include <linux/string_helpers.h> #include "tb.h"
@@ -644,7 +645,7 @@ static int __tb_port_enable(struct tb_port *port, bool enable)if (ret)return ret; -tb_port_dbg (port,"lane %sabled\n" , enable ?"en" :"dis" ); +tb_port_dbg (port,"lane %s\n" ,str_enabled_disabled (enable));return 0 ; }
drivers/thunderbolt/xdomain.c +2 -1
@@ -13,6 +13,7 @@#include <linux/module.h> #include <linux/pm_runtime.h> #include <linux/prandom.h> +#include <linux/string_helpers.h> #include <linux/utsname.h> #include <linux/uuid.h> #include <linux/workqueue.h>
@@ -1344,7 +1345,7 @@ static int tb_xdomain_bond_lanes_uuid_high(struct tb_xdomain *xd)tb_port_update_credits (port);tb_xdomain_update_link_attributes (xd); -dev_dbg (&xd->dev,"lane bonding %sabled\n" , width ==2 ?"en" :"dis" ); +dev_dbg (&xd->dev,"lane bonding %s\n" ,str_enabled_disabled (width ==2 ));return 0 ; }
Signature · 1 line
2.35.1
Mika Westerberg
AppliedQuoted 3 lines · Andy Shevchenko
Use
str_enabled_disabled()helper instead of open coding the same.Signed-off-by Andy Shevchenko <[email protected]>
Applied to thunderbolt.git/next, thanks!