All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Linux ACPI <linux-acpi@vger.kernel.org>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-rtc@vger.kernel.org, Linux PM <linux-pm@vger.kernel.org>
Subject: [PATCH v1 5/7] ACPI: TAD: Clear unused RT data in acpi_tad_set_real_time()
Date: Wed, 04 Mar 2026 19:15:21 +0100	[thread overview]
Message-ID: <8660506.T7Z3S40VBb@rafael.j.wysocki> (raw)
In-Reply-To: <5092662.31r3eYUQgx@rafael.j.wysocki>

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Move the clearing of the fields in struct acpi_tad_rt that are not used
on the real time setting side to acpi_tad_set_real_time().

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/acpi/acpi_tad.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/drivers/acpi/acpi_tad.c
+++ b/drivers/acpi/acpi_tad.c
@@ -96,6 +96,10 @@ static int acpi_tad_set_real_time(struct
 	if (acpi_tad_rt_is_invalid(rt))
 		return -EINVAL;
 
+	rt->valid = 0;
+	rt->msec = 0;
+	memset(rt->padding, 0, 3);
+
 	args[0].buffer.pointer = (u8 *)rt;
 	args[0].buffer.length = sizeof(*rt);
 
@@ -233,10 +237,6 @@ static ssize_t time_store(struct device
 
 	rt.daylight = val;
 
-	rt.valid = 0;
-	rt.msec = 0;
-	memset(rt.padding, 0, 3);
-
 	ret = acpi_tad_set_real_time(dev, &rt);
 	if (ret)
 		return ret;




  parent reply	other threads:[~2026-03-04 18:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-04 18:11 [PATCH v1 0/7] ACPI: TAD: Assorted improvements and RTC class device interface Rafael J. Wysocki
2026-03-04 18:12 ` [PATCH v1 1/7] ACPI: TAD: Create one attribute group Rafael J. Wysocki
2026-03-04 18:13 ` [PATCH v1 2/7] ACPI: TAD: Support RTC without wakeup Rafael J. Wysocki
2026-03-04 18:14 ` [PATCH v1 3/7] ACPI: TAD: Use __free() for cleanup in time_store() Rafael J. Wysocki
2026-03-04 18:14 ` [PATCH v1 4/7] ACPI: TAD: Rearrange RT data validation checking Rafael J. Wysocki
2026-03-04 18:15 ` Rafael J. Wysocki [this message]
2026-03-04 18:16 ` [PATCH v1 6/7] ACPI: TAD: Add RTC class device interface Rafael J. Wysocki
2026-03-05  7:48   ` Alexandre Belloni
2026-03-04 18:16 ` [PATCH v1 7/7] ACPI: TAD: Update the driver description comment Rafael J. Wysocki

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=8660506.T7Z3S40VBb@rafael.j.wysocki \
    --to=rafael@kernel.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-rtc@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 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.