netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Thorsten Blum <thorsten.blum@linux.dev>
Cc: Jacob Keller <jacob.e.keller@intel.com>,
	Saeed Mahameed <saeedm@nvidia.com>,
	Tariq Toukan <tariqt@nvidia.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Yevgeny Kliteynik <kliteyn@nvidia.com>,
	Mark Bloch <mbloch@nvidia.com>,
	Itamar Gozlan <igozlan@nvidia.com>,
	netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net/mlx5: Use secs_to_jiffies() instead of msecs_to_jiffies()
Date: Thu, 20 Feb 2025 14:07:54 +0200	[thread overview]
Message-ID: <20250220120754.GQ53094@unreal> (raw)
In-Reply-To: <9694B455-87B0-4A70-93C0-93FE77E3CD17@linux.dev>

On Thu, Feb 20, 2025 at 12:08:07PM +0100, Thorsten Blum wrote:
> On 20. Feb 2025, at 08:13, Leon Romanovsky wrote:
> > On Wed, Feb 19, 2025 at 03:45:02PM -0800, Jacob Keller wrote:
> >> On 2/19/2025 12:49 PM, Thorsten Blum wrote:
> >>> Use secs_to_jiffies() and simplify the code.
> >>> 
> >>> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> >> 
> >> nit: this is a cleanup which should have the net-next prefix applied,
> >> since this doesn't fix any user visible behavior.
> >> 
> >> Otherwise, seems like an ok change.
> > 
> > IMHO, completely useless change for old code. I can see a value in new
> > secs_to_jiffies() function for new code, but not for old code. I want
> > to believe that people who write kernel patches aware that 1000 msec
> > equal to 1 sec.
> 
> Using secs_to_jiffies() is shorter and requires less cognitive load to
> read imo. Plus, it now fits within the preferred 80 columns limit.

Unfortunately, I see this change as a churn and not an improvement.

> 
> This "old code" was added in d74ee6e197a2c ("net/mlx5: HWS, set timeout
> on polling for completion") in January 2025.

I got same conversion patches for RDMA.
https://lore.kernel.org/all/20250219-rdma-secs-to-jiffies-v1-0-b506746561a9@linux.microsoft.com

Thanks

> 
> Thanks,
> Thorsten
> 

  reply	other threads:[~2025-02-20 12:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-19 20:49 [PATCH] net/mlx5: Use secs_to_jiffies() instead of msecs_to_jiffies() Thorsten Blum
2025-02-19 23:45 ` Jacob Keller
2025-02-20  7:13   ` Leon Romanovsky
2025-02-20 11:08     ` Thorsten Blum
2025-02-20 12:07       ` Leon Romanovsky [this message]
2025-02-20 21:56         ` Saeed Mahameed

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=20250220120754.GQ53094@unreal \
    --to=leon@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=igozlan@nvidia.com \
    --cc=jacob.e.keller@intel.com \
    --cc=kliteyn@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mbloch@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saeedm@nvidia.com \
    --cc=tariqt@nvidia.com \
    --cc=thorsten.blum@linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).