From nobody Sun Oct 5 00:10:17 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E67132E370F; Tue, 12 Aug 2025 06:08:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754978897; cv=none; b=a3nA8E3N/PGIpgF3YWmjgczHb52qHzQ2vWcbf42hKr+XoSW92IyET2x8tpdxq5ZRJXhPY129JSBvKT0Z1cq3Cp5gQdsSoy3bpr7RexOjTPZ3WGgXJsHdKrzSvv9z+oVc5zWfrkoV/rxAaADHBvJCXH5C/TrCJUlpX9exddh4VrQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754978897; c=relaxed/simple; bh=tzlPDbI22bFVZnyx/aUubSg1nyN9LP7Z1nRVUBaVZrI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Pr33tH++Pc65mFS8KtNGpKlI4GEBKlSHwJcAS/6jd+IEK3lJ/cc4ah8I+7qOS3jE+ne61zQJBNRXKY2kwQ9j2LiG6T0a75Q4liw25R9L6+2doskQDeNlUTg/9mX7lq9ePqwBYK5NhbDJPrTpCFUJNN7Ma5kyy6gP4WKNpp2sqwc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=aqX/wyVW; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=6BMazsdy; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="aqX/wyVW"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="6BMazsdy" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1754978894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vaOYSQe8+r4ASI339nLTErW+Fc/xW8X676P1cpWtPUI=; b=aqX/wyVWMvyej+XbL6nxV+OMmQBVWeFr8v+c0GlCNErNPTQ+DcTwLCbrVXWmo8Qq5+0j+H eGyvqXziywNaj0DUa3Lv6uP5o0nWQk5xrYIj1lvem1RIZufjesFD7Q0Wj0ohYMwyc2Oud3 Z+/+4fu04z+KwA9mcFwn0NLEcVPR9E9p4Wa89kOyOxLR7HhpUZkQ6NkfTJA1wZYwWhdZ4y W3RZmBPZj4vzJqp8spO+TaOu9n9d20dUD9bFHcgBX7HaOiO+H2ZNQgSIH1bv/3ibQa3H1n HyB+ZAHhp6XPgqCbfEZvipl+GFHnR5Jmp4zKGkMHMnUVWz3FZRZQGG533YMgrQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1754978894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vaOYSQe8+r4ASI339nLTErW+Fc/xW8X676P1cpWtPUI=; b=6BMazsdyZAQN6IHtOnEl2iW4+56hBjTHd+SOOs6YeA9Pcv89FJ/WQPjgBS6Sc8aM6QxhaD 1y2ekj/I/jHZjYDw== Date: Tue, 12 Aug 2025 08:08:14 +0200 Subject: [PATCH 6/8] media: pwm-ir-tx: Avoid direct access to hrtimer clockbase Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250812-hrtimer-cleanup-get_time-v1-6-b962cd9d9385@linutronix.de> References: <20250812-hrtimer-cleanup-get_time-v1-0-b962cd9d9385@linutronix.de> In-Reply-To: <20250812-hrtimer-cleanup-get_time-v1-0-b962cd9d9385@linutronix.de> To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Matt Wu , Andrew Morton , Jaroslav Kysela , Takashi Iwai , Sean Young , Mauro Carvalho Chehab , Jan Kiszka , Kieran Bingham Cc: linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-media@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1754978890; l=1247; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=tzlPDbI22bFVZnyx/aUubSg1nyN9LP7Z1nRVUBaVZrI=; b=c+GawmMcaez6PbPORddUcVnsUEZyD+mp7mJap4RdqRRDGhN6JA4ZZm73rjeuA1LnjMJn0m51V aHFBJr4db9lB4NdOB0tLi1c2Lhc4+r+mCfwb1E/6KTuBAbP3/K0CZ4k X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= 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=C3=9Fschuh Acked-by: Sean Young --- 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 84533fdd61aa6ce3c0f8593aaefe5919fd05c7f9..047472dc9244afe0e56e505be20= f36fd7d9c449a 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, unsigne= d int *txbuf, static enum hrtimer_restart pwm_ir_timer(struct hrtimer *timer) { struct pwm_ir *pwm_ir =3D container_of(timer, struct pwm_ir, timer); - ktime_t now; =20 /* * 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); =20 pwm_ir->txbuf_index++; - - now =3D timer->base->get_time(); - } while (hrtimer_get_expires_tv64(timer) < now); + } while (hrtimer_expires_remaining(timer) > 0); =20 return HRTIMER_RESTART; } --=20 2.50.1