From: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
To: Easwar Hariharan <eahariha@linux.microsoft.com>,
Johannes Berg <johannes@sipsolutions.net>,
"open list:802.11 (including CFG80211/NL80211)"
<linux-wireless@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] wifi: cfg80211: convert timeouts to secs_to_jiffies()
Date: Fri, 21 Feb 2025 10:31:59 -0800 [thread overview]
Message-ID: <2e55eb5b-9df3-48e2-8e93-511249672b05@oss.qualcomm.com> (raw)
In-Reply-To: <20250219203240.141272-1-eahariha@linux.microsoft.com>
On 2/19/2025 12:32 PM, Easwar Hariharan wrote:
> Commit b35108a51cf7 ("jiffies: Define secs_to_jiffies()") introduced
> secs_to_jiffies(). As the value here is a multiple of 1000, use
> secs_to_jiffies() instead of msecs_to_jiffies to avoid the multiplication.
>
> This is converted using scripts/coccinelle/misc/secs_to_jiffies.cocci with
> the following Coccinelle rules:
>
> @depends on patch@
> expression E;
> @@
>
> -msecs_to_jiffies(E * 1000)
> +secs_to_jiffies(E)
>
> -msecs_to_jiffies(E * MSEC_PER_SEC)
> +secs_to_jiffies(E)
>
> Signed-off-by: Easwar Hariharan <eahariha@linux.microsoft.com>
> ---
> net/wireless/scan.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/wireless/scan.c b/net/wireless/scan.c
> index cd2124329521..1de25e9763cb 100644
> --- a/net/wireless/scan.c
> +++ b/net/wireless/scan.c
> @@ -1365,7 +1365,7 @@ void cfg80211_bss_age(struct cfg80211_registered_device *rdev,
> unsigned long age_secs)
> {
> struct cfg80211_internal_bss *bss;
> - unsigned long age_jiffies = msecs_to_jiffies(age_secs * MSEC_PER_SEC);
> + unsigned long age_jiffies = secs_to_jiffies(age_secs);
>
> spin_lock_bh(&rdev->bss_lock);
> list_for_each_entry(bss, &rdev->bss_list, list)
Reviewed-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
prev parent reply other threads:[~2025-02-21 18:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-19 20:32 Easwar Hariharan
2025-02-21 18:31 ` Jeff Johnson [this message]
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=2e55eb5b-9df3-48e2-8e93-511249672b05@oss.qualcomm.com \
--to=jeff.johnson@oss.qualcomm.com \
--cc=eahariha@linux.microsoft.com \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
/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
all inboxes | Powered by JetHome®