From: Su Hui <suhui@nfschina.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
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: Sun, 27 Apr 2025 10:15:59 +0800 [thread overview]
Message-ID: <d306f10c-457e-493e-8d06-6d9bd90485ea@nfschina.com> (raw)
In-Reply-To: <1ec38ba3-000f-4e26-b18f-95ffb3583836@stanley.mountain>
On 2025/4/25 21:04, Dan Carpenter wrote:
> 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.
Will update in v2 patch, thanks for the suggestion.
Su Hui
prev parent reply other threads:[~2025-04-27 2:16 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
2025-04-27 2:15 ` Su Hui [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=d306f10c-457e-493e-8d06-6d9bd90485ea@nfschina.com \
--to=suhui@nfschina.com \
--cc=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=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®