Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp673676pxb; Tue, 5 Apr 2022 18:13:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLkS7I7hBRF4clJ0bRpkkYpCh4TjyYNuxdVT68Oq898HRwnesOQf2C+e04OIuC7UiLXC/Y X-Received: by 2002:a17:902:c948:b0:156:c07d:8222 with SMTP id i8-20020a170902c94800b00156c07d8222mr6297724pla.30.1649207614814; Tue, 05 Apr 2022 18:13:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649207614; cv=none; d=google.com; s=arc-20160816; b=UEMV8VanVZOHb1Fnq2xfLjY5W+xDvQI3zOJIu99jNpXZXhVasigQPejZimzoQ3gLhp khzOUXhk35lzPwfuvToKFRQlUPw2fVyoKupDtbxqHJZGLb8YSa7W9ic14GZfxY8+uN52 kQmHcSbu57E3Rj4V2RnsqE2tj95tZa8qtoqUGK4PTteEUWdlwEIbtRrpEp3kOdwBHsJa iQvLRiwa++1usbKxZjLJeoRqOzD8oQtbRpHZu6h4a0DmgmTPXytV6MQXrQvDckHh+KRZ GK3SoCqtvdz2qYd3kBClVZJjzxSvLO5U0GKN2xWSaeMgfUnjjU+FnAaI5qDch4swKOEA trrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zECxJwsO2GS34erlQDicuJlY1V3q5oG58t3BBnQZALA=; b=j4li+o2STVaHp2DVqOTBaYApeliVlsHSaGcdhBe5DXKoDBlgHvEdK0MXf3XIgXlUs7 M1vPoXHz+xgKkPvkR632nzAbDzegE5ld3KGjWHnWJQubs8yZyKDg4okdcguXZ2EF6Po7 /awPFLn1+nHr1a25uQz+q5PtNcGlssfhMjUpPJ+00Th1v19zbsQazqZ94A9raWqAcxKs ZWpPrBLCjtpLSRjP6Zl14kA/tI7kOTQKrZNQBpdY0vBuePD9Ho7n0bFk8OhxT4oB/X/v wq1zqHRiQMAHTSKnWdH4lBS3CB3QfxmJnYWu8WjO4MBNTpPAh1biPDFvl44uguglaKQW rRgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sUtgAi1u; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pj9-20020a17090b4f4900b001ca996be6d9si3824123pjb.133.2022.04.05.18.13.20; Tue, 05 Apr 2022 18:13:34 -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=@linuxfoundation.org header.s=korg header.b=sUtgAi1u; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243859AbiDENj4 (ORCPT + 99 others); Tue, 5 Apr 2022 09:39:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345184AbiDEJWU (ORCPT ); Tue, 5 Apr 2022 05:22:20 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C68C29CA5; Tue, 5 Apr 2022 02:09:25 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5ADABB818F3; Tue, 5 Apr 2022 09:09:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4A83C385A2; Tue, 5 Apr 2022 09:09:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649149763; bh=hP7Ta8lHWxh6NeT9h5JeWb6KQ3S+wTrRwcg0WqNvRtc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sUtgAi1uE5MW2AaS5+YzUYWDMo4RBLk33K7AqCmRzDwxlt8XVM0STaOikSvmHyW7N r5HUic6ddH4Gnd7SK5XVlOndISJA7Bcbvk16+dWUfNBKvnTSX7zbENTklZc50ubKEi OSvDfDckAvZKETZtbMI0GvcJzkpZzODLh2p53C6g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zeal Robot , Jing Yao , Helge Deller , Sasha Levin Subject: [PATCH 5.16 0831/1017] video: fbdev: udlfb: replace snprintf in show functions with sysfs_emit Date: Tue, 5 Apr 2022 09:29:04 +0200 Message-Id: <20220405070418.911338931@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 From: Jing Yao [ Upstream commit 81a998288956d09d7a7a2303d47e4d60ad55c401 ] Use sysfs_emit instead of scnprintf, snprintf or sprintf. Reported-by: Zeal Robot Signed-off-by: Jing Yao Signed-off-by: Helge Deller Signed-off-by: Sasha Levin --- drivers/video/fbdev/udlfb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/udlfb.c b/drivers/video/fbdev/udlfb.c index b9cdd02c1000..90f48b71fd8f 100644 --- a/drivers/video/fbdev/udlfb.c +++ b/drivers/video/fbdev/udlfb.c @@ -1426,7 +1426,7 @@ static ssize_t metrics_bytes_rendered_show(struct device *fbdev, struct device_attribute *a, char *buf) { struct fb_info *fb_info = dev_get_drvdata(fbdev); struct dlfb_data *dlfb = fb_info->par; - return snprintf(buf, PAGE_SIZE, "%u\n", + return sysfs_emit(buf, "%u\n", atomic_read(&dlfb->bytes_rendered)); } @@ -1434,7 +1434,7 @@ static ssize_t metrics_bytes_identical_show(struct device *fbdev, struct device_attribute *a, char *buf) { struct fb_info *fb_info = dev_get_drvdata(fbdev); struct dlfb_data *dlfb = fb_info->par; - return snprintf(buf, PAGE_SIZE, "%u\n", + return sysfs_emit(buf, "%u\n", atomic_read(&dlfb->bytes_identical)); } @@ -1442,7 +1442,7 @@ static ssize_t metrics_bytes_sent_show(struct device *fbdev, struct device_attribute *a, char *buf) { struct fb_info *fb_info = dev_get_drvdata(fbdev); struct dlfb_data *dlfb = fb_info->par; - return snprintf(buf, PAGE_SIZE, "%u\n", + return sysfs_emit(buf, "%u\n", atomic_read(&dlfb->bytes_sent)); } @@ -1450,7 +1450,7 @@ static ssize_t metrics_cpu_kcycles_used_show(struct device *fbdev, struct device_attribute *a, char *buf) { struct fb_info *fb_info = dev_get_drvdata(fbdev); struct dlfb_data *dlfb = fb_info->par; - return snprintf(buf, PAGE_SIZE, "%u\n", + return sysfs_emit(buf, "%u\n", atomic_read(&dlfb->cpu_kcycles_used)); } -- 2.34.1