mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Su Hui <suhui@nfschina.com>
Cc: jstultz@google.com, tglx@linutronix.de, sboyd@kernel.org,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 3/3] alarmtimer: switch spin_{lock,unlock}_irqsave() to guard()
Date: Fri, 25 Apr 2025 16:04:47 +0300	[thread overview]
Message-ID: <1ec38ba3-000f-4e26-b18f-95ffb3583836@stanley.mountain> (raw)
In-Reply-To: <20250424144819.24884-4-suhui@nfschina.com>

On Thu, Apr 24, 2025 at 10:48:20PM +0800, Su Hui wrote:
> @@ -230,15 +226,15 @@ static int alarmtimer_suspend(struct device *dev)
>  	ktime_t min, now, expires;
>  	int i, ret, type;
>  	struct rtc_device *rtc;
> -	unsigned long flags;
>  	struct rtc_time tm;
>  
> -	spin_lock_irqsave(&freezer_delta_lock, flags);
> -	min = freezer_delta;
> -	expires = freezer_expires;
> -	type = freezer_alarmtype;
> -	freezer_delta = 0;
> -	spin_unlock_irqrestore(&freezer_delta_lock, flags);
> +	scoped_guard(spinlock_irqsave, &freezer_delta_lock) {
> +		min = freezer_delta;
> +		expires = freezer_expires;
> +		type = freezer_alarmtype;
> +		freezer_delta = 0;
> +	}
> +
>  

Don't add the extra blank line here.

>  	rtc = alarmtimer_get_rtcdev();
>  	/* If we have no rtcdev, just return */

regards,
dan carpenter

  parent reply	other threads:[~2025-04-25 13:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-24 14:48 [PATCH 0/3] time: some cleanup for jiffies and alarmtimer Su Hui
2025-04-24 14:48 ` [PATCH 1/3] time/jiffies: change register_refined_jiffies() to void __init Su Hui
2025-04-24 14:48 ` [PATCH 2/3] alarmtimer: remove dead return value in clock2alarm() Su Hui
2025-04-24 14:48 ` [PATCH 3/3] alarmtimer: switch spin_{lock,unlock}_irqsave() to guard() Su Hui
2025-04-24 23:59   ` John Stultz
2025-04-25  2:59     ` Su Hui
2025-04-30  6:58     ` Thomas Gleixner
2025-04-25 13:04   ` Dan Carpenter [this message]
2025-04-27  2:15     ` Su Hui

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=1ec38ba3-000f-4e26-b18f-95ffb3583836@stanley.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=jstultz@google.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sboyd@kernel.org \
    --cc=suhui@nfschina.com \
    --cc=tglx@linutronix.de \
    /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®