Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1888236lqe; Tue, 9 Apr 2024 03:39:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVPcqOrODtNKaumV6TDu9xSoC3heSfGXt77X+YU1lLId0EzOun1lwLGiMQX8/ga7uReXgguDrrRIcjA9TP9yATQf8TD2P4fwSPodxa4bQ== X-Google-Smtp-Source: AGHT+IGtWNNpcX5SaB0Fk6dHEs9mL6a5LD36LKbStjC4f99YTD67WrfS+iq3jY21d9cLQ71XqgrA X-Received: by 2002:ad4:5c46:0:b0:69b:2fb3:d16a with SMTP id a6-20020ad45c46000000b0069b2fb3d16amr1002105qva.33.1712659176067; Tue, 09 Apr 2024 03:39:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712659176; cv=pass; d=google.com; s=arc-20160816; b=IKiTuCmxWI/5+eb1XZPPDnKYEBjOe17zwzt2hQDdYDYqeuEAjNYuBH4w51jzrjb9GY eETfB6lYO+kfR1TpUaw5KJ4/z3eCiI1bvoU2SGCbFPOjeyMW7fm9GynhTy8Ea78f3RzS Q543Xaa91ztZJfQ6lI0jWlEy0oADx+ytbLfKtM/p5TBABzvjyCrjmlOeeHjFXZoLTCHt Ef2at5yVOouBNb71d6xEdoGVyDsVYdOOCcjwZiRF7sNBWVBst4N0hYyJJVWm5yW4AYMt 3Z2uD6oUWH/XKBrLfb6i3UR9eDQ6kY7e1BpBCyVXegXUtgAXhd+9IFGJS14CjsXNzCaM DeQw== 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=clwi8IrO6Il7fl8uan2j18C9A+SXakAKvz9lbcjWPjo=; fh=VY6pSElAL2zn9OKBctSVEJpNi1pmpd+9TmZG5rPl2ag=; b=RUYHZFeguT1Wm+1Mv7SmSxIEqGvd80/sIkQy5dhVRwTBW2oE3NYjlvUBoPeP+nINvu fslNyLE45qORImGIZuW5m1adAMijYlj4RNxAeOTBRqjNBctm1MrEUpTNzbRnocdnYbvw ZkpbUU0GDxrBjg1iLgOUF2pGEicwgVfM1i/I6taRhl+Dn34eAqOOv8vSicK7Fg6NVkFC F2xpYuNEp96/RdE4vkqRUKbahm0S/a/SA/3uQyQq/cl01WzpEMc3GnV8nlbVzkOw5wF2 kdl/lr/Lpl8wfso3RXkGQ36+e1F2aDhXG1Qnzt7HnFdIjslzKmIFM66MwnSU0wMF2p9R VUgw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=cWNZsluN; 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-136688-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136688-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id f6-20020a056214164600b006914cd7a8b3si10035695qvw.379.2024.04.09.03.39.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 03:39:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-136688-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=cWNZsluN; 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-136688-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136688-linux.lists.archive=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id C99351C22048 for ; Tue, 9 Apr 2024 10:39:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2075684A38; Tue, 9 Apr 2024 10:39:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="cWNZsluN"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="/AAafD2E" 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 C165180BFC; Tue, 9 Apr 2024 10:39:23 +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=1712659165; cv=none; b=nqq0W81H143HEoTTqXhtn+2ma8BkwrLMyE460fpWpDQYvjmxQmI3PWMTV3Ijz0KINPV/SeTxRkTC707KottS0mvkrDXu3RcI4+K8k+Q2j8HMYAB2aWzB9jCoU6H36rixyK+si60+nzYX3Cw5wD0Y98awcsimXyAPA89VYjfhTvU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712659165; c=relaxed/simple; bh=oWUms48iRpTcDjY65dniJSBp/h2h6e7psB5H9E/kH1U=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=m3iea7ZNacz5D5vHaGoaYswOztvs6bz0oaDL5/ha1BKIEaPHT2Y/jhoGTelU6xP6rKSW47K9aSc58HDrFB6vgW/X/9hQxteC2au9vYRtwZnDDU1R9nODwfLrXdsdJ/004/96q6zHyz4rwHE7xn2WaEBKAzlxqIw8FGS2MVHvv58= 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=cWNZsluN; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=/AAafD2E; 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: Tue, 09 Apr 2024 10:39:21 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1712659162; 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=clwi8IrO6Il7fl8uan2j18C9A+SXakAKvz9lbcjWPjo=; b=cWNZsluN9ySCgECOfAP2hkdewtoa/86aHgFwVCxw2G44gVXg8eTXTlB8Zk7b2YZYpRQKx5 EOJFlVqRh7/JEURVDA8OFL8DCdrcYp8ibiWC51ylhv3/xi39rJTbuilOYHJDofCSC71Td7 Hx3EhomtykpnqXvTOvsS89JE6E8Nk/fjB7V/4ujgKLLbx2b3zKH2XSpGG/deazX/R7Vzfr J8utXKww5XA6M/0jhio8lorJhzMyukeMT6qNV8Tcw1u+cKDj0C/wG8yIGSykcKkg6sKut3 2xvUI1TGLejT2gY63JUPyFpgpr+rnPMITz3I1wykqlh6+x9vIYR0/hQBzQd5HA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1712659162; 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=clwi8IrO6Il7fl8uan2j18C9A+SXakAKvz9lbcjWPjo=; b=/AAafD2EpZjOrJH9GyeH/9BRZ14CD45Kng0i8nUw8+4fRBYkbnEn52kMDARQlgl5Q1Qgx0 CERfJGP2Qh4ifTBg== From: "tip-bot2 for Li Zhijian" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] clockevents: Convert s[n]printf() to sysfs_emit() Cc: Li Zhijian , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240314100402.1326582-2-lizhijian@fujitsu.com> References: <20240314100402.1326582-2-lizhijian@fujitsu.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <171265916135.10875.2299933674711064349.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The following commit has been merged into the timers/core branch of tip: Commit-ID: 98fe0fcb326a923740cb8900aa7ed7fe538c984a Gitweb: https://git.kernel.org/tip/98fe0fcb326a923740cb8900aa7ed7fe538c984a Author: Li Zhijian AuthorDate: Thu, 14 Mar 2024 18:04:02 +08:00 Committer: Thomas Gleixner CommitterDate: Tue, 09 Apr 2024 12:32:37 +02:00 clockevents: Convert s[n]printf() to sysfs_emit() Per filesystems/sysfs.rst, show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. coccinelle complains that there are still a couple of functions that use snprintf(). Convert them to sysfs_emit(). Signed-off-by: Li Zhijian Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240314100402.1326582-2-lizhijian@fujitsu.com --- kernel/time/clockevents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c index a7ca458..60a6484 100644 --- a/kernel/time/clockevents.c +++ b/kernel/time/clockevents.c @@ -677,7 +677,7 @@ static ssize_t current_device_show(struct device *dev, raw_spin_lock_irq(&clockevents_lock); td = tick_get_tick_dev(dev); if (td && td->evtdev) - count = snprintf(buf, PAGE_SIZE, "%s\n", td->evtdev->name); + count = sysfs_emit(buf, "%s\n", td->evtdev->name); raw_spin_unlock_irq(&clockevents_lock); return count; }