From nobody Sun Feb 8 10:49:15 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 625D4C7EE24 for ; Mon, 5 Jun 2023 15:08:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232741AbjFEPIl (ORCPT ); Mon, 5 Jun 2023 11:08:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231840AbjFEPI1 (ORCPT ); Mon, 5 Jun 2023 11:08:27 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD204EA; Mon, 5 Jun 2023 08:08:26 -0700 (PDT) Date: Mon, 05 Jun 2023 15:08:24 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1685977705; h=from:from:sender:sender:reply-to: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=Y8OW7mNLB3v0H4YFi6rliOeKhkABoAx15A5MO4MS50I=; b=E0xqgxC2VTZvipboSYI7RTh8oNURjcetGVs3OHTp6pELrxPJg5+UUsRjW9A453HYTN6wed Ba0h4rK7ftrGl73ObYCaV7S/n7aQxtNdKyDq8B2u848UilnF4RSfPzIyjcYVs75ncECfLF NWVyaS6OsxokwB/UZn11pF6v3o4G8kFRYXAOgL/p1/VmRaK6UeCu3LtT8EHucVibsOXWc9 wAtIZRRrdj9p2bu+UP9OqA0qUHocTHs6GA0MfP0zy4kBxmkKX9N12gpvzFMLgpDIjLrUev wOCnjoVVUNeZK0oyzugeyd5txqlGL/xwukByDnQROhVcJxOyuMqk4Q5rN2gN8Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1685977705; h=from:from:sender:sender:reply-to: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=Y8OW7mNLB3v0H4YFi6rliOeKhkABoAx15A5MO4MS50I=; b=Yjy2j4uy/w0xJYi1KC2hF6T32einOMYvyMef/djO0OYvzzLfcHMTy6qNcwDbUuZ3U3W+vP 5W1zb0l4QnPDolDQ== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] posix-timers: Polish coding style in a few places Cc: Thomas Gleixner , Frederic Weisbecker , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230425183313.888493625@linutronix.de> References: <20230425183313.888493625@linutronix.de> MIME-Version: 1.0 Message-ID: <168597770464.404.17603246020123754187.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the timers/core branch of tip: Commit-ID: 1263a2a9d71bac5ffabf9603c36e36cb6edbcdcf Gitweb: https://git.kernel.org/tip/1263a2a9d71bac5ffabf9603c36e36cb6= edbcdcf Author: Thomas Gleixner AuthorDate: Tue, 25 Apr 2023 20:49:27 +02:00 Committer: Thomas Gleixner CommitterDate: Mon, 05 Jun 2023 17:03:39 +02:00 posix-timers: Polish coding style in a few places Make it consistent with the TIP tree documentation. Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20230425183313.888493625@linutronix.de --- kernel/time/posix-timers.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c index fde1ca9..276f231 100644 --- a/kernel/time/posix-timers.c +++ b/kernel/time/posix-timers.c @@ -309,10 +309,10 @@ int posix_timer_event(struct k_itimer *timr, int si_p= rivate) */ static enum hrtimer_restart posix_timer_fn(struct hrtimer *timer) { + enum hrtimer_restart ret =3D HRTIMER_NORESTART; struct k_itimer *timr; unsigned long flags; int si_private =3D 0; - enum hrtimer_restart ret =3D HRTIMER_NORESTART; =20 timr =3D container_of(timer, struct k_itimer, it.real.timer); spin_lock_irqsave(&timr->it_lock, flags); @@ -400,8 +400,8 @@ static struct pid *good_sigevent(sigevent_t * event) =20 static struct k_itimer * alloc_posix_timer(void) { - struct k_itimer *tmr; - tmr =3D kmem_cache_zalloc(posix_timers_cache, GFP_KERNEL); + struct k_itimer *tmr =3D kmem_cache_zalloc(posix_timers_cache, GFP_KERNEL= ); + if (!tmr) return tmr; if (unlikely(!(tmr->sigq =3D sigqueue_alloc()))) { @@ -695,8 +695,8 @@ void common_timer_get(struct k_itimer *timr, struct iti= merspec64 *cur_setting) =20 static int do_timer_gettime(timer_t timer_id, struct itimerspec64 *settin= g) { - struct k_itimer *timr; const struct k_clock *kc; + struct k_itimer *timr; unsigned long flags; int ret =3D 0; =20 @@ -767,8 +767,8 @@ SYSCALL_DEFINE2(timer_gettime32, timer_t, timer_id, SYSCALL_DEFINE1(timer_getoverrun, timer_t, timer_id) { struct k_itimer *timr; - int overrun; unsigned long flags; + int overrun; =20 timr =3D lock_timer(timer_id, &flags); if (!timr) @@ -941,8 +941,7 @@ SYSCALL_DEFINE4(timer_settime, timer_t, timer_id, int, = flags, const struct __kernel_itimerspec __user *, new_setting, struct __kernel_itimerspec __user *, old_setting) { - struct itimerspec64 new_spec, old_spec; - struct itimerspec64 *rtn =3D old_setting ? &old_spec : NULL; + struct itimerspec64 new_spec, old_spec, *rtn; int error =3D 0; =20 if (!new_setting) @@ -951,6 +950,7 @@ SYSCALL_DEFINE4(timer_settime, timer_t, timer_id, int, = flags, if (get_itimerspec64(&new_spec, new_setting)) return -EFAULT; =20 + rtn =3D old_setting ? &old_spec : NULL; error =3D do_timer_settime(timer_id, flags, &new_spec, rtn); if (!error && old_setting) { if (put_itimerspec64(&old_spec, old_setting))