From patchwork Sun Nov 27 13:01:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: KaiLong Wang X-Patchwork-Id: 26356 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp5107555wrr; Sun, 27 Nov 2022 05:11:50 -0800 (PST) X-Google-Smtp-Source: AA0mqf4yA+YXbfkz196Z1lu8tVH12fLfWsopVW0X5t4Q2iTVvOCaEvsGuF+wieSg3SMi9XSkXi85 X-Received: by 2002:a17:90a:a082:b0:218:a7c3:e760 with SMTP id r2-20020a17090aa08200b00218a7c3e760mr35517701pjp.127.1669554710143; Sun, 27 Nov 2022 05:11:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669554710; cv=none; d=google.com; s=arc-20160816; b=uSq1X+yP9cBOk76xz3gazJ6w+1ngoHrjlKH5Al/0C9W70W8xzOg8pi++UyvT8RSdT1 Xjff9tZvU47J1RbxX6L7C3gBOVLR5WX0SUEAhunJwezVn56FuBybH9uaFYONwH6Z7Wp0 xlS9ppjjtaT4+apoTzwE2DwaVIAZYvPOLHw8xt//Bk3l71daVxK6hmXEz2yeBbGNPtHw a5rLm3bKLX/lN/Uavr0hspmlDlJM6GRe8W/Jex37o0Q62mQyF90cVUUEALysnC1+hNrN fYfFPxf7zahAMx+5nYFjLhNr6di/mWya7CtFEnfxgZJASwSPqukk7GKXM5YlpOeBKTn7 qX3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:mime-version :content-transfer-encoding:subject:cc:to:from:date; bh=NTu1IRV8KzWO1wneFhlvuqO+JwM0Fya0rdpToAowagc=; b=cvRjmcudWsCJRyLAX8vG5Xl1cj5keQEU8yrzMKA2P9HBDTx5751gi7ZNBfEthuHW+6 3MirGcw7mwV4WEVwJPsle2gSekhd4f9FfqdKOytTIwonobYD3v+SRPbepSbXhYiUz/j3 9iujesuq3UYInau5RBCId5Oy9RFdUd9dJfqd5Ibp+SFf+URhDTSAZUuYIHbJ/r4daBIS TO48HdY4KqX6VSQip6XJWtinTtUSflPQRUA6KA+0etS+9sc4ZT7Eht30uTUwQDN+vcdr rw7hFOR+BW/Jtw04c/uw6Pt481IoQGThj8wzvRxWsG7Rfj9/7iITOh5yYTlPswvuUaD0 yOXw== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c22-20020a63d156000000b004752f807266si9106549pgj.693.2022.11.27.05.11.37; Sun, 27 Nov 2022 05:11:50 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229674AbiK0NB4 (ORCPT + 99 others); Sun, 27 Nov 2022 08:01:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229660AbiK0NBy (ORCPT ); Sun, 27 Nov 2022 08:01:54 -0500 Received: from jari.cn (unknown [218.92.28.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D839EBE27 for ; Sun, 27 Nov 2022 05:01:53 -0800 (PST) Received: by ajax-webmail-localhost.localdomain (Coremail) ; Sun, 27 Nov 2022 21:01:45 +0800 (GMT+08:00) X-Originating-IP: [182.148.15.36] Date: Sun, 27 Nov 2022 21:01:45 +0800 (GMT+08:00) X-CM-HeaderCharset: UTF-8 From: "KaiLong Wang" To: linux@armlinux.org.uk Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] arch/arm: convert sysfs snprintf to sysfs_emit X-Priority: 3 X-Mailer: Coremail Webmail Server Version XT6.0.1 build 20210329(c53f3fee) Copyright (c) 2002-2022 www.mailtech.cn mispb-4e503810-ca60-4ec8-a188-7102c18937cf-zhkzyfz.cn MIME-Version: 1.0 Message-ID: <75c9d8ca.1d6.184b92ded9c.Coremail.wangkailong@jari.cn> X-Coremail-Locale: zh_CN X-CM-TRANSID: AQAAfwCXn+C5X4Njp3IFAA--.102W X-CM-SenderInfo: 5zdqwypdlo00nj6mt2flof0/1tbiAQADB2FEYx0G1gAJsH X-Coremail-Antispam: 1Ur529EdanIXcx71UUUUU7IcSsGvfJ3iIAIbVAYjsxI4VWxJw CS07vEb4IE77IF4wCS07vE1I0E4x80FVAKz4kxMIAIbVAFxVCaYxvI4VCIwcAKzIAtYxBI daVFxhVjvjDU= X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00,RCVD_IN_PBL,RDNS_NONE, T_SPF_HELO_PERMERROR,T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750655000134572966?= X-GMAIL-MSGID: =?utf-8?q?1750655000134572966?= Fix the following coccicheck warning: arch/arm/mm/cache-l2x0-pmu.c:346:8-16: WARNING: use scnprintf or sprintf Signed-off-by: KaiLong Wang --- arch/arm/mm/cache-l2x0-pmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mm/cache-l2x0-pmu.c b/arch/arm/mm/cache-l2x0-pmu.c index 993fefdc167a..a9bd05b82003 100644 --- a/arch/arm/mm/cache-l2x0-pmu.c +++ b/arch/arm/mm/cache-l2x0-pmu.c @@ -343,7 +343,7 @@ static ssize_t l2x0_pmu_event_show(struct device *dev, struct l2x0_event_attribute *lattr; lattr = container_of(attr, typeof(*lattr), attr); - return snprintf(buf, PAGE_SIZE, "config=0x%x\n", lattr->config); + return sysfs_emit(buf, "config=0x%x\n", lattr->config); } static umode_t l2x0_pmu_event_attr_is_visible(struct kobject *kobj,