]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: rtw89: 8852bt: Use standard helper for string choice
authorAkhilesh Patil <akhilesh@ee.iitb.ac.in>
Fri, 8 Aug 2025 05:39:18 +0000 (11:09 +0530)
committerPing-Ke Shih <pkshih@realtek.com>
Tue, 12 Aug 2025 08:21:20 +0000 (16:21 +0800)
Use standard helper str_on_off() defined at string_choices.h in
_dpk_information() to improve code reusability. Reduce hardcoding
of repeated use of the same strings to save code space.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/r/202507282341.drTGfLWA-lkp@intel.com/
Signed-off-by: Akhilesh Patil <akhilesh@ee.iitb.ac.in>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/aJWNhu9bAkcjEyb4@bhairav-test.ee.iitb.ac.in
drivers/net/wireless/realtek/rtw89/rtw8852bt_rfk.c

index d0e299803225a29793b4b2d13ce12e06ff555710..b01f921b4224b4473e6d21efb3640908ae98dd3e 100644 (file)
@@ -1883,8 +1883,8 @@ static void _dpk_information(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy,
        rtw89_debug(rtwdev, RTW89_DBG_RFK,
                    "[DPK] S%d[%d] (PHY%d): TSSI %s/ DBCC %s/ %s/ CH%d/ %s\n",
                    path, dpk->cur_idx[path], phy,
-                   rtwdev->is_tssi_mode[path] ? "on" : "off",
-                   rtwdev->dbcc_en ? "on" : "off",
+                   str_on_off(rtwdev->is_tssi_mode[path]),
+                   str_on_off(rtwdev->dbcc_en),
                    dpk->bp[path][kidx].band == 0 ? "2G" :
                    dpk->bp[path][kidx].band == 1 ? "5G" : "6G",
                    dpk->bp[path][kidx].ch,