]> www.infradead.org Git - users/hch/misc.git/commitdiff
ice: use string choice helpers
authorR Sundar <prosunofficial@gmail.com>
Sun, 27 Oct 2024 14:19:07 +0000 (19:49 +0530)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 14 Jan 2025 22:37:34 +0000 (14:37 -0800)
Use string choice helpers for better readability.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@inria.fr>
Closes: https://lore.kernel.org/r/202410121553.SRNFzc2M-lkp@intel.com/
Signed-off-by: R Sundar <prosunofficial@gmail.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_ptp_hw.c

index 518893f23372bf6c50c171a96d198c2c41961b2a..6f9d4dc82997d973b7f78f811bdaabc3caff1718 100644 (file)
@@ -391,7 +391,7 @@ static int ice_cfg_cgu_pll_e82x(struct ice_hw *hw,
 
        /* Log the current clock configuration */
        ice_debug(hw, ICE_DBG_PTP, "Current CGU configuration -- %s, clk_src %s, clk_freq %s, PLL %s\n",
-                 dw24.ts_pll_enable ? "enabled" : "disabled",
+                 str_enabled_disabled(dw24.ts_pll_enable),
                  ice_clk_src_str(dw24.time_ref_sel),
                  ice_clk_freq_str(dw9.time_ref_freq_sel),
                  bwm_lf.plllock_true_lock_cri ? "locked" : "unlocked");
@@ -469,7 +469,7 @@ static int ice_cfg_cgu_pll_e82x(struct ice_hw *hw,
 
        /* Log the current clock configuration */
        ice_debug(hw, ICE_DBG_PTP, "New CGU configuration -- %s, clk_src %s, clk_freq %s, PLL %s\n",
-                 dw24.ts_pll_enable ? "enabled" : "disabled",
+                 str_enabled_disabled(dw24.ts_pll_enable),
                  ice_clk_src_str(dw24.time_ref_sel),
                  ice_clk_freq_str(dw9.time_ref_freq_sel),
                  bwm_lf.plllock_true_lock_cri ? "locked" : "unlocked");
@@ -546,7 +546,7 @@ static int ice_cfg_cgu_pll_e825c(struct ice_hw *hw,
 
        /* Log the current clock configuration */
        ice_debug(hw, ICE_DBG_PTP, "Current CGU configuration -- %s, clk_src %s, clk_freq %s, PLL %s\n",
-                 dw24.ts_pll_enable ? "enabled" : "disabled",
+                 str_enabled_disabled(dw24.ts_pll_enable),
                  ice_clk_src_str(dw23.time_ref_sel),
                  ice_clk_freq_str(dw9.time_ref_freq_sel),
                  ro_lock.plllock_true_lock_cri ? "locked" : "unlocked");
@@ -651,7 +651,7 @@ static int ice_cfg_cgu_pll_e825c(struct ice_hw *hw,
 
        /* Log the current clock configuration */
        ice_debug(hw, ICE_DBG_PTP, "New CGU configuration -- %s, clk_src %s, clk_freq %s, PLL %s\n",
-                 dw24.ts_pll_enable ? "enabled" : "disabled",
+                 str_enabled_disabled(dw24.ts_pll_enable),
                  ice_clk_src_str(dw23.time_ref_sel),
                  ice_clk_freq_str(dw9.time_ref_freq_sel),
                  ro_lock.plllock_true_lock_cri ? "locked" : "unlocked");