All of lore.kernel.org
 help / color / mirror / Atom feed
From: R Sundar <prosunofficial@gmail.com>
To: Przemek Kitszel <przemyslaw.kitszel@intel.com>,
	Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: Eric Dumazet <edumazet@google.com>,
	netdev@vger.kernel.org,
	Richard Cochran <richardcochran@gmail.com>,
	linux-kernel@vger.kernel.org, arkadiusz.kubalewski@intel.com,
	Julia Lawall <julia.lawall@inria.fr>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	karol.kolacinski@intel.com, intel-wired-lan@lists.osuosl.org,
	jacob.e.keller@intel.com, Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	davem@davemloft.net
Subject: Re: [Intel-wired-lan] [PATCH linux-next] ice: use string choice helpers
Date: Tue, 29 Oct 2024 22:07:58 +0530	[thread overview]
Message-ID: <e9a89d87-d1a7-44cb-aab5-07a61d578c3c@gmail.com> (raw)
In-Reply-To: <ca4f7990-16c4-42ef-b0ae-12e64a100f5e@intel.com>

On 28/10/24 15:24, Przemek Kitszel wrote:
> On 10/27/24 15:19, R Sundar wrote:
>> 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>
>> ---
> 
> thanks, this indeed covers all "enabled/disabled" cases, so:
> Acked-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> 
Hi,

Thanks for comments.

> for future submissions for Intel Ethernet drivers please use the
> iwl-next (or iwl-net) target trees.
> 

Sure. Noted.

> There are also other cases that we could cover ON/OFF etc
> 
>>
>> Reported in linux repository.
>>
>> tree:   
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>>
>> cocci warnings: (new ones prefixed by >>)
>>>> drivers/net/ethernet/intel/ice/ice_ptp_hw.c:396:4-22: opportunity 
>>>> for str_enabled_disabled(dw24 . ts_pll_enable)
>>     drivers/net/ethernet/intel/ice/ice_ptp_hw.c:474:4-22: opportunity 
>> for str_enabled_disabled(dw24 . ts_pll_enable)
>>
>> vim +396 drivers/net/ethernet/intel/ice/ice_ptp_hw.c
>>
>>
>>   drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 8 ++++----
>>   1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/intel/ice/ice_ptp_hw.c 
>> b/drivers/net/ethernet/intel/ice/ice_ptp_hw.c
>> index da88c6ccfaeb..d8d3395e49c3 100644
>> --- a/drivers/net/ethernet/intel/ice/ice_ptp_hw.c
>> +++ b/drivers/net/ethernet/intel/ice/ice_ptp_hw.c
>> @@ -393,7 +393,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");
> 
> perhaps locked/unlocked could be added into string_choices.h
> 

Sure, Can I add locked/unlocked changes in linux-next repository and use 
suggested-by Tag?


>> @@ -471,7 +471,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");
>> @@ -548,7 +548,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");
>> @@ -653,7 +653,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");
> 


WARNING: multiple messages have this Message-ID (diff)
From: R Sundar <prosunofficial@gmail.com>
To: Przemek Kitszel <przemyslaw.kitszel@intel.com>,
	Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, karol.kolacinski@intel.com,
	arkadiusz.kubalewski@intel.com, jacob.e.keller@intel.com,
	kernel test robot <lkp@intel.com>,
	Julia Lawall <julia.lawall@inria.fr>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	davem@davemloft.net, Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Richard Cochran <richardcochran@gmail.com>
Subject: Re: [PATCH linux-next] ice: use string choice helpers
Date: Tue, 29 Oct 2024 22:07:58 +0530	[thread overview]
Message-ID: <e9a89d87-d1a7-44cb-aab5-07a61d578c3c@gmail.com> (raw)
In-Reply-To: <ca4f7990-16c4-42ef-b0ae-12e64a100f5e@intel.com>

On 28/10/24 15:24, Przemek Kitszel wrote:
> On 10/27/24 15:19, R Sundar wrote:
>> 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>
>> ---
> 
> thanks, this indeed covers all "enabled/disabled" cases, so:
> Acked-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
> 
Hi,

Thanks for comments.

> for future submissions for Intel Ethernet drivers please use the
> iwl-next (or iwl-net) target trees.
> 

Sure. Noted.

> There are also other cases that we could cover ON/OFF etc
> 
>>
>> Reported in linux repository.
>>
>> tree:   
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>>
>> cocci warnings: (new ones prefixed by >>)
>>>> drivers/net/ethernet/intel/ice/ice_ptp_hw.c:396:4-22: opportunity 
>>>> for str_enabled_disabled(dw24 . ts_pll_enable)
>>     drivers/net/ethernet/intel/ice/ice_ptp_hw.c:474:4-22: opportunity 
>> for str_enabled_disabled(dw24 . ts_pll_enable)
>>
>> vim +396 drivers/net/ethernet/intel/ice/ice_ptp_hw.c
>>
>>
>>   drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 8 ++++----
>>   1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/intel/ice/ice_ptp_hw.c 
>> b/drivers/net/ethernet/intel/ice/ice_ptp_hw.c
>> index da88c6ccfaeb..d8d3395e49c3 100644
>> --- a/drivers/net/ethernet/intel/ice/ice_ptp_hw.c
>> +++ b/drivers/net/ethernet/intel/ice/ice_ptp_hw.c
>> @@ -393,7 +393,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");
> 
> perhaps locked/unlocked could be added into string_choices.h
> 

Sure, Can I add locked/unlocked changes in linux-next repository and use 
suggested-by Tag?


>> @@ -471,7 +471,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");
>> @@ -548,7 +548,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");
>> @@ -653,7 +653,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");
> 


  reply	other threads:[~2024-10-29 16:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-27 14:19 [Intel-wired-lan] [PATCH linux-next] ice: use string choice helpers R Sundar
2024-10-27 14:19 ` R Sundar
2024-10-28  9:54 ` [Intel-wired-lan] " Przemek Kitszel
2024-10-28  9:54   ` Przemek Kitszel
2024-10-29 16:37   ` R Sundar [this message]
2024-10-29 16:37     ` R Sundar
2024-10-30  7:19     ` [Intel-wired-lan] " Przemek Kitszel
2024-10-30  7:19       ` Przemek Kitszel
2024-10-30 10:08   ` [Intel-wired-lan] " Julia Lawall
2024-10-30 10:08     ` 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=e9a89d87-d1a7-44cb-aab5-07a61d578c3c@gmail.com \
    --to=prosunofficial@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=arkadiusz.kubalewski@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jacob.e.keller@intel.com \
    --cc=julia.lawall@inria.fr \
    --cc=karol.kolacinski@intel.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=richardcochran@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.