From patchwork Mon Feb 19 08:45:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 202967 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp1156098dyc; Mon, 19 Feb 2024 00:47:12 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXAhwu3z+Cvn5agoB1C3EvD3WhpKSSkufbgE5RfQ0Do3r5vYEwgLeTPDf6Tec0gMdoqHq30H22nAgtbNQPnCV/QEXLHeA== X-Google-Smtp-Source: AGHT+IEKMLfvlbfd7J2TOrMp4vAFFohtbr0K3GeqDn6JQYIQ98xjS5Zlj7S8yc7w5186Wi6qxJFk X-Received: by 2002:a05:6a21:6315:b0:19c:8505:a232 with SMTP id wu21-20020a056a21631500b0019c8505a232mr13224158pzb.40.1708332432241; Mon, 19 Feb 2024 00:47:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708332432; cv=pass; d=google.com; s=arc-20160816; b=pf9lnJvMAB3ASR3wjXuBqK8o7+j7rAqTi9v/AhqQlh3Wycp3i8v0hF+U27q7Be2txi qXmJtBdO6xe2MyhPQwHoLRbXBqQrm36e7S6GoFKKN+E7I92DHM2oMTOkjh1oBcG740h4 dYtu9k1HwzfdFPmUUee+ycThfY2ZyVaTmwdSu/HYbxv9olMCf96m1DULWJngCsONvo2v i3380HtQfcv660EA5uoH51Ucik5AEMx6kaY5yAqBbRhVKvLTWZD+Y9HnipHhFyGcO4Em ScDEip272TLvWTpsBRa4JLv7JKpcf4rqxhtMUS50yFkq6zwe8XqJdRC7EmIuvdTq9qjW oAog== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=vp9FsdQZWj5mHPz6UeSAfVzwer8wwEB1a/Z98kYKpk8=; fh=9TzET5t9qt7/NzJ5Qjz3uc/2R2GVPigMRGq+4RapPhI=; b=eSbI3Ic7twdp7nKKfJzaQkJya6k+nmFl74fELkZcEvLaFPA1Mvx8jpNS6JdBeOFT17 NXjCkz4qSVtKAVItF3+XVIfKGE7zkhC7J4TQHINoR/B/1iuPpQ83gFheC2Z9F0nziXVa 3qfSnWn0j2qaiaubWczWxCPqXbjUXQN92XpdOdMdJwRDuTLXdpUzl024I189NmtcyVYT bz6gpXlmbjnMs+V7jpe4SDI3vQKqyCFg6lUr1eg61jNwTX+s9V6cKXCLdqv5017AZLhz uSZbgRTcp/6JBMkjNXbtBZj/AD/83lsc1W4F8ZhofwdKvzYvlbVZymSmekOZUQ8kinHp iRig==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=xh5Wz8xp; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-70954-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70954-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id hk12-20020a17090b224c00b002991fcf73acsi4192840pjb.95.2024.02.19.00.47.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 00:47:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-70954-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=xh5Wz8xp; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-70954-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-70954-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0CB2A28143F for ; Mon, 19 Feb 2024 08:47:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DD79625558; Mon, 19 Feb 2024 08:45:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="xh5Wz8xp"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="lMifWcvF" 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 2E60221A19; Mon, 19 Feb 2024 08:45:36 +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=1708332338; cv=none; b=H3ixzQhlrDIvE8pG3prXF7bZynLIatSWwJIZFvabzEIYRRMBcYqLkqSuOjF8Gg5f9QYPOsJxStjo/fAbfWROj7IRxXmArH5bA85QzDv7p8GY6ZWqNCKLqP3og8kiiBiew/vGvYFIv3haFy5YwfFJ1ZV61/SsR5DmA/pDoN9hskE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708332338; c=relaxed/simple; bh=dmzOTB6f156z4RFEWfYQvp1a3geU/pH8BC718iwJcvw=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=btYXk9MXP4O0aaeaURBIbGrVnI2ZtDCzYQyg+mESz8i7Pq3qqpCilnzbZqt3K5G95md11srAwtEq9jmbUW0LP0uEsjRxW11XpBTHtMAK7Rx3OcWeS2Y6EADUyLautVn+Lac5bb4ATRnv4h+JelrbJafBO2TYLdckI23JrN8/cBA= 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=xh5Wz8xp; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=lMifWcvF; 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 Date: Mon, 19 Feb 2024 08:45:34 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708332335; 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=vp9FsdQZWj5mHPz6UeSAfVzwer8wwEB1a/Z98kYKpk8=; b=xh5Wz8xp5wkOnU0i/ORG/Ft9bg7dHFLfK9ZmFw1/fGrutj5bqXBbomWsqPmSqFtoRn+7SX LSBkutUC5kPUgpzqqzjiot2rTnLu5MYsWESbUEwPlujBIDi4d5hcMf1nnia9HBEAlVFcwB EINKAxe934oWo2Eyp3+J66zuwlMyvGjvnaeMAfJINtRIBzwaA4CF7pPeptNBcd9X8tqQLb LNImrACj5yfGjEkf0yNrdST4VKBN2PSctT3uI3WbyV1Gsi/GHW/+u9dfedoryqnHOWJzb7 531PzXONW9p/i9dFRxgyFJyMD/S2jFzmBKOcw4WTjGmk6LNPO8xz0RIOFG8nRw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708332335; 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=vp9FsdQZWj5mHPz6UeSAfVzwer8wwEB1a/Z98kYKpk8=; b=lMifWcvFkPNNdQnp70+/7WC9mYt8U4eH/7ZFgBAvsO0slDeBqM6h7XR+oBP0EBvLiaZhkA YQZCaEalUEIQweCQ== From: "tip-bot2 for Anna-Maria Behnsen" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] hrtimers: Update formatting of documentation Cc: "Anna-Maria Behnsen" , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240123164702.55612-3-anna-maria@linutronix.de> References: <20240123164702.55612-3-anna-maria@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170833233427.398.8658313899755655344.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788902752973035969 X-GMAIL-MSGID: 1791316388202779218 The following commit has been merged into the timers/core branch of tip: Commit-ID: ca2768bbf5c48d8c048877dfbceafcebc3f06fa6 Gitweb: https://git.kernel.org/tip/ca2768bbf5c48d8c048877dfbceafcebc3f06fa6 Author: Anna-Maria Behnsen AuthorDate: Tue, 23 Jan 2024 17:46:56 +01:00 Committer: Thomas Gleixner CommitterDate: Mon, 19 Feb 2024 09:37:59 +01:00 hrtimers: Update formatting of documentation Documentation of functions lacks the annotations which are used by kernel-doc and *.rst to make appearance in rendered documents more user-friendly. Use those annotations to improve user-friendliness. While at it prevent duplication of comments and use a reference instead. Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240123164702.55612-3-anna-maria@linutronix.de --- include/linux/hrtimer.h | 14 +++----------- kernel/time/hrtimer.c | 18 ++++++++++-------- 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 792a0ac..aa1e65c 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h @@ -342,20 +342,12 @@ extern u64 hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval); /** - * hrtimer_forward_now - forward the timer expiry so it expires after now + * hrtimer_forward_now() - forward the timer expiry so it expires after now * @timer: hrtimer to forward * @interval: the interval to forward * - * Forward the timer expiry so it will expire after the current time - * of the hrtimer clock base. Returns the number of overruns. - * - * Can be safely called from the callback function of @timer. If - * called from other contexts @timer must neither be enqueued nor - * running the callback and the caller needs to take care of - * serialization. - * - * Note: This only updates the timer expiry value and does not requeue - * the timer. + * It is a variant of hrtimer_forward(). The timer will expire after the current + * time of the hrtimer clock base. See hrtimer_forward() for details. */ static inline u64 hrtimer_forward_now(struct hrtimer *timer, ktime_t interval) diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index 7607939..4c8dd63 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -1021,21 +1021,23 @@ void unlock_hrtimer_base(const struct hrtimer *timer, unsigned long *flags) } /** - * hrtimer_forward - forward the timer expiry + * hrtimer_forward() - forward the timer expiry * @timer: hrtimer to forward * @now: forward past this time * @interval: the interval to forward * * Forward the timer expiry so it will expire in the future. - * Returns the number of overruns. * - * Can be safely called from the callback function of @timer. If - * called from other contexts @timer must neither be enqueued nor - * running the callback and the caller needs to take care of - * serialization. + * .. note:: + * This only updates the timer expiry value and does not requeue the timer. * - * Note: This only updates the timer expiry value and does not requeue - * the timer. + * There is also a variant of the function hrtimer_forward_now(). + * + * Context: Can be safely called from the callback function of @timer. If called + * from other contexts @timer must neither be enqueued nor running the + * callback and the caller needs to take care of serialization. + * + * Return: The number of overruns are returned. */ u64 hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval) {