mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Thomas Weißschuh" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: thomas.weissschuh@linutronix.de,
	Thomas Gleixner <tglx@linutronix.de>, Sean Young <sean@mess.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: timers/core] media: pwm-ir-tx: Avoid direct access to hrtimer clockbase
Date: Tue, 09 Sep 2025 08:56:41 -0000	[thread overview]
Message-ID: <175740820188.1920.3145976836403421541.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20250812-hrtimer-cleanup-get_time-v1-6-b962cd9d9385@linutronix.de>

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     12bbd35144939dbe9324b55fb1f50a0be2f0d6de
Gitweb:        https://git.kernel.org/tip/12bbd35144939dbe9324b55fb1f50a0be2f0d6de
Author:        Thomas Weißschuh <thomas.weissschuh@linutronix.de>
AuthorDate:    Tue, 12 Aug 2025 08:08:14 +02:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 09 Sep 2025 10:53:19 +02:00

media: pwm-ir-tx: Avoid direct access to hrtimer clockbase

The field timer->base->get_time is a private implementation detail and
should not be accessed outside of the hrtimer core.

Switch to an equivalent higher-level helper.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Sean Young <sean@mess.org>
Link: https://lore.kernel.org/all/20250812-hrtimer-cleanup-get_time-v1-6-b962cd9d9385@linutronix.de

---
 drivers/media/rc/pwm-ir-tx.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/media/rc/pwm-ir-tx.c b/drivers/media/rc/pwm-ir-tx.c
index 84533fd..047472d 100644
--- a/drivers/media/rc/pwm-ir-tx.c
+++ b/drivers/media/rc/pwm-ir-tx.c
@@ -117,7 +117,6 @@ static int pwm_ir_tx_atomic(struct rc_dev *dev, unsigned int *txbuf,
 static enum hrtimer_restart pwm_ir_timer(struct hrtimer *timer)
 {
 	struct pwm_ir *pwm_ir = container_of(timer, struct pwm_ir, timer);
-	ktime_t now;
 
 	/*
 	 * If we happen to hit an odd latency spike, loop through the
@@ -139,9 +138,7 @@ static enum hrtimer_restart pwm_ir_timer(struct hrtimer *timer)
 		hrtimer_add_expires_ns(timer, ns);
 
 		pwm_ir->txbuf_index++;
-
-		now = timer->base->get_time();
-	} while (hrtimer_get_expires_tv64(timer) < now);
+	} while (hrtimer_expires_remaining(timer) > 0);
 
 	return HRTIMER_RESTART;
 }

  parent reply	other threads:[~2025-09-09  8:56 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-12  6:08 [PATCH 0/8] hrtimer: Remove hrtimer_clock_base::get_time Thomas Weißschuh
2025-08-12  6:08 ` [PATCH 1/8] posix-timers: Avoid direct access to hrtimer clockbase Thomas Weißschuh
2025-09-09  8:56   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh
2025-08-12  6:08 ` [PATCH 2/8] timers/itimer: " Thomas Weißschuh
2025-09-09  8:56   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh
2025-08-12  6:08 ` [PATCH 3/8] sched/core: " Thomas Weißschuh
2025-09-09  8:56   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh
2025-08-12  6:08 ` [PATCH 4/8] lib: test_objpool: " Thomas Weißschuh
2025-09-09  8:56   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh
2025-08-12  6:08 ` [PATCH 5/8] ALSA: hrtimer: " Thomas Weißschuh
2025-08-12 11:07   ` Takashi Iwai
2025-09-09  8:56   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh
2025-08-12  6:08 ` [PATCH 6/8] media: pwm-ir-tx: " Thomas Weißschuh
2025-08-12 12:06   ` Sean Young
2025-09-09  8:56   ` tip-bot2 for Thomas Weißschuh [this message]
2025-08-12  6:08 ` [PATCH 7/8] hrtimer: Use hrtimer_cb_get_time() helper Thomas Weißschuh
2025-09-09  8:56   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh
2025-08-12  6:08 ` [PATCH 8/8] hrtimer: Remove hrtimer_clock_base::get_time Thomas Weißschuh
2025-08-12  7:42   ` Peter Zijlstra
2025-08-12  7:51     ` Thomas Weißschuh
2025-09-09  8:56   ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh
2025-08-12  7:43 ` [PATCH 0/8] " Peter Zijlstra
2025-08-21 13:28 [PATCH v2 6/9] media: pwm-ir-tx: Avoid direct access to hrtimer clockbase Thomas Weißschuh
2025-09-09 10:31 ` [tip: timers/core] " tip-bot2 for Thomas Weißschuh

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=175740820188.1920.3145976836403421541.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=sean@mess.org \
    --cc=tglx@linutronix.de \
    --cc=thomas.weissschuh@linutronix.de \
    --cc=x86@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®