Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp4995666rwb; Wed, 21 Sep 2022 01:25:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7lRlHcdpMVpBZTySv6w7ldC8ljiOJhz+zqz2rPDGxr5MBSZj9cZa5llWkKuFJG1PvP1YQQ X-Received: by 2002:a17:902:ea0b:b0:178:336f:eaec with SMTP id s11-20020a170902ea0b00b00178336feaecmr3752492plg.53.1663748753978; Wed, 21 Sep 2022 01:25:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663748753; cv=none; d=google.com; s=arc-20160816; b=gUQnE3wZgPzl8GJnhjsZ1a1eEr46LC8A7YuoLQo1LjVMISbYZntyswZu5F9cNEUUjT +DFtoEyvDojFavOHp6x+l/DkzFudpOWRdDerrmX2qFz2jl61YX+mBK7Lf99mpi2/IFbr vDaWnd2GX2xiH3843mBIJ63ax+Zice4J1AxF4yQKrPoHkdV5tbOZ9QikHx7h3n0TgCFg wQNn9epRnBZm1bAY+E84EzUY1/7DosEF9hFVbUhodqUrIBoSEyjhStvfrIPhYzSWWBER HlsewiDHl5+OSUFeNoNWGLmeYEaRXB9kgKc091tK60IXUpueObqtkw0QAPOXNlbvybv0 ovCw== 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:cc:subject:to:reply-to:sender:from :dkim-signature:dkim-signature:date; bh=zPza9GfvfCzuDa1HTfIXTm9tWsA3CcYZ82dbV7tKWcg=; b=LgAjlqBgbDwd/n950QJDG6QR8YvPnkOIeOcbYJQEEJ+NazguVz1/TWGOotPCK5xfS7 tsK8DgOy7uf+95/rdoyiD77PZ6bxZeUVwjtBb8l35lUsVl/by6S6X/FlXD+1pzTQ2BYc Qws1wLnhrGpm6EF/R+/g0xs8Yw6WJ8wglJQjr1zqRIbclSoBMmhv0EXoexT2rpLQfW1G j7Jf+Tfu81QaU0A+/FRZhxwoZ+PTOzX/5iVpKrExbwCIn8tLUuMJMB5zSWdTTVebOUxz KwBt3Q1yuVdBs2mqm2Y+RP/okFDIPNo6CBIGxwNYPfdac8JJ+NIWQcpNZIdk4x7Sevib e43w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=1NJ1AVQc; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=2whLIOsF; 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 w123-20020a636281000000b0042b77aa55fdsi2157474pgb.464.2022.09.21.01.25.42; Wed, 21 Sep 2022 01:25:53 -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=1NJ1AVQc; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=2whLIOsF; 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 S229993AbiIUIJA (ORCPT + 99 others); Wed, 21 Sep 2022 04:09:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229918AbiIUII7 (ORCPT ); Wed, 21 Sep 2022 04:08:59 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9A1B80EA3; Wed, 21 Sep 2022 01:08:58 -0700 (PDT) Date: Wed, 21 Sep 2022 08:08:55 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1663747737; 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; bh=zPza9GfvfCzuDa1HTfIXTm9tWsA3CcYZ82dbV7tKWcg=; b=1NJ1AVQcZNVQd2+Kk+92P/AiFXqq+LfXiCbDgRU6xRDygNhy0Tvl4l54e++P6Glg+ba6W1 FMb8qklPaWXLtTm1+GXbpqJlwok3/mpuAKjcgw+Z/JmqtJniVwLF2l7G+cHNNptoqgboiR ghpRcpDJjPAV51ILeQbaS3onVtTSVvyAt5Yd9FTXEHa+SU5IeouP00e7cNoeLfQWIcJ+Ma fUDpa7DoSMLkl/tOaYuebywuU3Z6xfqIBc7Tu1kQiTSh9fkTsjrEdH0gYNbnrahtQbaTa+ TMCnTbOY+jl71AiYmnlWOiAtMI0opGtG7A7ss85mDd04nndqyrI+AcMNGgi8dw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1663747737; 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; bh=zPza9GfvfCzuDa1HTfIXTm9tWsA3CcYZ82dbV7tKWcg=; b=2whLIOsFLsxkUsWwJIR6CzYh1mid1NLsDhBofl1QBizqs/+tH5/L8z/DZyGsH9ZQC46Qi6 zYfLoUSyMHDhkLDw== From: "tip-bot2 for Jules Irenge" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: perf/core] perf/core: Convert snprintf() to scnprintf() Cc: Jules Irenge , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-ID: <166374773592.401.16831946846027095231.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 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 perf/core branch of tip: Commit-ID: 678739d622ae7b75b62d550858b6bf104c43e2df Gitweb: https://git.kernel.org/tip/678739d622ae7b75b62d550858b6bf104c43e2df Author: Jules Irenge AuthorDate: Sun, 18 Sep 2022 00:41:08 +01:00 Committer: Ingo Molnar CommitterDate: Wed, 21 Sep 2022 10:01:20 +02:00 perf/core: Convert snprintf() to scnprintf() Coccinelle reports a warning: WARNING: use scnprintf or sprintf Adding to that, there has also been some slow migration from snprintf to scnprintf. This LWN article explains the rationale for this change: https: //lwn.net/Articles/69419/ No change in behavior. [ mingo: Improved the changelog. ] Signed-off-by: Jules Irenge Signed-off-by: Ingo Molnar --- kernel/events/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index 7da5515..c07e9a3 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -10952,7 +10952,7 @@ static ssize_t nr_addr_filters_show(struct device *dev, { struct pmu *pmu = dev_get_drvdata(dev); - return snprintf(page, PAGE_SIZE - 1, "%d\n", pmu->nr_addr_filters); + return scnprintf(page, PAGE_SIZE - 1, "%d\n", pmu->nr_addr_filters); } DEVICE_ATTR_RO(nr_addr_filters); @@ -10963,7 +10963,7 @@ type_show(struct device *dev, struct device_attribute *attr, char *page) { struct pmu *pmu = dev_get_drvdata(dev); - return snprintf(page, PAGE_SIZE-1, "%d\n", pmu->type); + return scnprintf(page, PAGE_SIZE - 1, "%d\n", pmu->type); } static DEVICE_ATTR_RO(type); @@ -10974,7 +10974,7 @@ perf_event_mux_interval_ms_show(struct device *dev, { struct pmu *pmu = dev_get_drvdata(dev); - return snprintf(page, PAGE_SIZE-1, "%d\n", pmu->hrtimer_interval_ms); + return scnprintf(page, PAGE_SIZE - 1, "%d\n", pmu->hrtimer_interval_ms); } static DEFINE_MUTEX(mux_interval_mutex);