From patchwork Sun Apr 17 13:29:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xuezhi Zhang X-Patchwork-Id: 12816073 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 170B1C433EF for ; Sun, 17 Apr 2022 18:40:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 084A310E108; Sun, 17 Apr 2022 18:40:15 +0000 (UTC) X-Greylist: delayed 908 seconds by postgrey-1.36 at gabe; Sun, 17 Apr 2022 13:44:51 UTC Received: from m12-13.163.com (m12-13.163.com [220.181.12.13]) by gabe.freedesktop.org (Postfix) with ESMTP id E22BC10E161 for ; Sun, 17 Apr 2022 13:44:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=8xdy1 otSXW1cwfTIsLN61K8o+NtLtYS2/7RspgGPkFc=; b=WaktQzaNvApyYYQ3HqeLE oJrH0VHDXzUSk9eqn4Sweu6M+/U73QAridWyhEm6N/T0iXbkI+sUQ8QSllnR4GQg E/Jeajtx7eTWfW2a870TFPqO9WUEvL11ILiolkVp6FO2c3OotRVKDIyffplOIUZg YGuspDxGJxTDLZyj84pgak= Received: from carlis (unknown [120.229.91.35]) by smtp9 (Coremail) with SMTP id DcCowABHu14vFlxikyJyBw--.4076S2; Sun, 17 Apr 2022 21:29:20 +0800 (CST) From: Xuezhi Zhang To: liviu.dudau@arm.com, brian.starkey@arm.com, airlied@linux.ie, daniel@ffwll.ch Subject: [PATCH] drm/malidp: convert sysfs snprintf to sysfs_emit Date: Sun, 17 Apr 2022 13:29:18 +0000 Message-Id: <20220417132918.135795-1-zhangxuezhi1@coolpad.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CM-TRANSID: DcCowABHu14vFlxikyJyBw--.4076S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7GrWfXF1UWrWfGr1xZw1kZrb_yoWfWFb_CF 10qrsrZrs2yF97uw1xCF4fZryIkayF9FZ5XrW8ta4fZrsFvrsrZ3s29ryvqryUJF47AF9r Aa1kuF15J3ZrCjkaLaAFLSUrUUUU1b8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUnpWlPUUUUU== X-Originating-IP: [120.229.91.35] X-CM-SenderInfo: xoo16iiqy6il2tof0z/1tbiQwjlhVc7Yte1mgABsc X-Mailman-Approved-At: Sun, 17 Apr 2022 18:40:14 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Xuezhi Zhang Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Fix the following coccicheck warning: drivers/gpu/drm/arm/malidp_drv.c:658:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Xuezhi Zhang Acked-by: Liviu Dudau --- drivers/gpu/drm/arm/malidp_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c index d5aef21426cf..b1ffd5ba27d9 100644 --- a/drivers/gpu/drm/arm/malidp_drv.c +++ b/drivers/gpu/drm/arm/malidp_drv.c @@ -655,7 +655,7 @@ static ssize_t core_id_show(struct device *dev, struct device_attribute *attr, struct drm_device *drm = dev_get_drvdata(dev); struct malidp_drm *malidp = drm->dev_private; - return snprintf(buf, PAGE_SIZE, "%08x\n", malidp->core_id); + return sysfs_emit(buf, "%08x\n", malidp->core_id); } static DEVICE_ATTR_RO(core_id);