From nobody Mon Nov 25 12:45:23 2024 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 05A9C1FCF55 for ; Mon, 28 Oct 2024 07:35:46 +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=1730100949; cv=none; b=I+RDnGDIJIoC43OZl2Fh+QFwj8QGpUQp/FhcsDzzd8vkHlsWGXE3s4m6z8wLEQuqUvsETlAsY/hQIghSUcyqzAm+rl/r4z7h+CeuvyT/I8ya+L8trqnQ+QfzA1iF19gYH5Z+Zj1S2U2iMoi41Q+bkv0wU9Q1lYAC/fbwwys/LjA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730100949; c=relaxed/simple; bh=AWSVZQgoP9kXrcbFkBzuEvgcEPi19n6xXY+bsGa07ko=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qdeInhTIRLkoKT8gw2JpFBEcQjtGKfEo+2ycg/upxeTuiRj32OpxOY9NYihNl0vlgohAYLxQRMeBU02s2OJmpycUzn1Vow8Wl+X9SeoaNkx4oh2v83F5mB/y+cFTE+Kfx/4NCjKnHSPGj7pFGomv/pu6rp7pJHYQ2V7NGW6aoWI= 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=KDybhfYW; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=COKvd61i; 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="KDybhfYW"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="COKvd61i" From: Nam Cao DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1730100945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=C4TIKGEqD8IhbwKVaKp0wp1yEQXuyYuEtg9Rh1iAhiY=; b=KDybhfYWFKzyoKS4XKrRCwwZyqU1m1ORvHB8Yi+PUD5aOTxGDhppMfqdFeD6N9Y1a6cIwh ULj5hPj6GGzzzGCokBoMBt6dHZqJ+ZgY7HGO4RflVuxXI8s5qIfA8zxNbC8pr86WepJViz w8Jnlr8E5yozq+wUPJn22Awwe+KHubwP67aS2cptSdCa6Shz+RgnABWZLVCK0UVCANrxjW zFT4/imkZ6w5YxHSgtqCJBfHAFggsjmOH5ncc+3s8aGgBJCcjH88BPdJxiNLvhdNbufcPR RVBcCf8WjTqRrKjJ0sCMT0z2QpVfRpU6nnK/oBGEeSjjnFcwyYi4AaDPiH9LGw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1730100945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=C4TIKGEqD8IhbwKVaKp0wp1yEQXuyYuEtg9Rh1iAhiY=; b=COKvd61iF9L7Jqv6ZyiLW1GPXwCXRGwQrdzuXxGNUNhv1kNmvXZF+W/KIHucqPyXjf6JGl CO9k1Q6X9FQojRAg== To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Andreas Hindborg , Alice Ryhl , Miguel Ojeda , Kees Cook , linux-kernel@vger.kernel.org Cc: Nam Cao , Jani Nikula Subject: [PATCH 33/44] drm/i915/pmu: Switch to use hrtimer_setup() Date: Mon, 28 Oct 2024 08:35:09 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" There is a newly introduced hrtimer_setup() which will replace hrtimer_init(). This new function is similar to the old one, except that it also sanity-checks and initializes the timer's callback function. Switch to use this new function. Patch was created by using Coccinelle. Signed-off-by: Nam Cao --- Cc: Jani Nikula --- drivers/gpu/drm/i915/i915_pmu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pm= u.c index 21eb0c5b320d..5f5210a8f58b 100644 --- a/drivers/gpu/drm/i915/i915_pmu.c +++ b/drivers/gpu/drm/i915/i915_pmu.c @@ -1261,8 +1261,7 @@ void i915_pmu_register(struct drm_i915_private *i915) } =20 spin_lock_init(&pmu->lock); - hrtimer_init(&pmu->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); - pmu->timer.function =3D i915_sample; + hrtimer_setup(&pmu->timer, i915_sample, CLOCK_MONOTONIC, HRTIMER_MODE_REL= ); pmu->cpuhp.cpu =3D -1; init_rc6(pmu); =20 --=20 2.39.5