Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5541458rwd; Sun, 18 Jun 2023 13:54:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6w9//B3ITZxZzaqjqTjGBd8O0DmAqCsLlo/54OVmSUVbjvoJzabj+yU++JC9x7KCQ5On3Q X-Received: by 2002:a5e:a918:0:b0:76c:785f:8f82 with SMTP id c24-20020a5ea918000000b0076c785f8f82mr6425506iod.6.1687121666741; Sun, 18 Jun 2023 13:54:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687121666; cv=none; d=google.com; s=arc-20160816; b=C3JNu7Xg8zMn3ff8G5yr+tyjuj0L1Jz4DlFnV4uD8A0ofaJ3YxN7FJdiBeany9OARX HVl3wFZ+ieoWoEtnjyjLkfzqlf4jHVYo3loAPhE3jRT3orVxDhbHjxi+xVERM+D2x/F/ 8Sw05xj1EJvLz26+edtGqjpnPUEpH+cdDrUlkW0eRNbYwXQtRJhxZnwNA4QAHAM7dhKY y21FRZJyhbM25va8SDKZPGuRFcxJr/mX7Ovl/+BJfxIORsE09XnfQ+74ynL8NKQuRYuS EzVnOBrdfVIiZUI1ln5qcgnBwvueH+hLlUcGvRQFBfT4vNnmvsS4IClf4Zm0+S+Kd0V4 +dag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=YBEj6VkAH/D4hqIs7iqVKsxQ7SH0fj/oEfwr9IuBVco=; b=BJrBWLfovSx+p08/Qh6ldUGYa8MUZ/8Udcms7m1J/MVl4GLWkHOK87iE7qJXa6Ylls /tDuS1sepXw3xIyistyXOhVy1MFlG5kK1AKQ2tCYTme28MjqJp4W/xL9B5s06LbfF/nB QQ+AZAmbJsMWjoNpkyKvfLm4/Iytr6MfVR1X/5KI4qOiLcuCiC1Fao3kkO62lIhJ6+Dh ba984jFzyuxHQD4k5lHoMeFKyA/cg47lWIghsw5xZlNZa3EvJ+xgM8fc9/gWaCmKZzaS A9p0z9T4AW8DYNXg8bLBoqPOWeA6vZ0XesCZPcbEMTk8DZVgA4xGbvy/cXiYb8uulQ9e ML8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=hN1DWkZS; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s1-20020a170902ea0100b001b3b93609c6si6505016plg.538.2023.06.18.13.54.13; Sun, 18 Jun 2023 13:54:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=hN1DWkZS; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229692AbjFRUuP (ORCPT + 99 others); Sun, 18 Jun 2023 16:50:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229575AbjFRUt6 (ORCPT ); Sun, 18 Jun 2023 16:49:58 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2AFDE49; Sun, 18 Jun 2023 13:49:57 -0700 (PDT) Date: Sun, 18 Jun 2023 20:49:55 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1687121396; 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=YBEj6VkAH/D4hqIs7iqVKsxQ7SH0fj/oEfwr9IuBVco=; b=hN1DWkZSeQTH8NEDrw9ZsYtLx61v/33Cgc6fV7tEy+vaL6zCJ6uaf9JXdSHzXPkPXS0sZJ BNue1YYJ9JYSsb5nn95hiAHgB6oG0DWbrJmYtNkpFb2INqg7n/p2+ZBIF9jH/QSk7of7P+ Lwu3P2ecBN2U1Jhy0md3spftiQXWfaa5A7Seka9w8BQjVRDqu6UAQohrgCVTN1bU8/aErz duIQpLBzh98Jqd08Sk1OX9LAWF6q+cXlEl21G+nTDUBipAmuYMprMUdhQS6exXrKIokFok CvhyWslfQ62Wu2sX8HbWt+lq42uswgthZBHbCU+AQMf+FB4VraxujBRliIVAuA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1687121396; 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=YBEj6VkAH/D4hqIs7iqVKsxQ7SH0fj/oEfwr9IuBVco=; b=YJIsOO6HkndDo+6pu8J23JFFhDMIZd/6afXMOsC0fcJtzHsLcQKhhECihLGBW6LWDOzgX8 H0fBrd0Ups6eY7CA== 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: <168712139591.404.2457121241673171316.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: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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: b96ce4931fcd13d73e32c62c2df3fa8f9f467e33 Gitweb: https://git.kernel.org/tip/b96ce4931fcd13d73e32c62c2df3fa8f9f467e33 Author: Thomas Gleixner AuthorDate: Tue, 25 Apr 2023 20:49:27 +02:00 Committer: Thomas Gleixner CommitterDate: Sun, 18 Jun 2023 22:41:53 +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 d357728..e3cddd5 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_private) */ static enum hrtimer_restart posix_timer_fn(struct hrtimer *timer) { + enum hrtimer_restart ret = HRTIMER_NORESTART; struct k_itimer *timr; unsigned long flags; int si_private = 0; - enum hrtimer_restart ret = HRTIMER_NORESTART; timr = 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) static struct k_itimer * alloc_posix_timer(void) { - struct k_itimer *tmr; - tmr = kmem_cache_zalloc(posix_timers_cache, GFP_KERNEL); + struct k_itimer *tmr = kmem_cache_zalloc(posix_timers_cache, GFP_KERNEL); + if (!tmr) return tmr; if (unlikely(!(tmr->sigq = sigqueue_alloc()))) { @@ -695,8 +695,8 @@ void common_timer_get(struct k_itimer *timr, struct itimerspec64 *cur_setting) static int do_timer_gettime(timer_t timer_id, struct itimerspec64 *setting) { - struct k_itimer *timr; const struct k_clock *kc; + struct k_itimer *timr; unsigned long flags; int ret = 0; @@ -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; timr = 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 = old_setting ? &old_spec : NULL; + struct itimerspec64 new_spec, old_spec, *rtn; int error = 0; 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; + rtn = old_setting ? &old_spec : NULL; error = do_timer_settime(timer_id, flags, &new_spec, rtn); if (!error && old_setting) { if (put_itimerspec64(&old_spec, old_setting))