Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1516226pxb; Thu, 4 Feb 2021 15:24:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJyept1ZxpsnbShM60MUdVIu5b3ymu+RgvXubwGGESZlhfm79rCKDl+uzkynv2KrDbgw+npY X-Received: by 2002:aa7:d912:: with SMTP id a18mr898668edr.73.1612481043004; Thu, 04 Feb 2021 15:24:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612481042; cv=none; d=google.com; s=arc-20160816; b=MizHJRjaw/W8xdyiXTCopW2czW2ixuaECwNjhBQcpj1fBU5GN946FuQRh8LRNU3TK8 bVPELwesfAKy29rPI9TbX7KTrLXZBTlAl0TW8aNB8vku8oEroqtHR1iOUOpUMrvSAZxy 4oW1dco1riFu6WtB4xENeoy0jnqLwbUrnOlKu7JcJla/8oajNbTNen0CZiT92kqTcQdc ijnZ3HRm+DehQTSWLZEmNaj9ET+8p6j2iW184nYpOT4XMAudflg+qnJFeV7qBbQpDEzL Rbn0fWs4Zlxf7f+LFnJf2nDDfDCIKbZbnMRrlCKKePI5hHyE8Vzaj2Z+I5q1zVO5Iqlb wweQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=1y0uddCQ3jg3h/441ZKR1Hp6cfe8v0yrOt0F7NV2dgI=; b=v8aBBQnixLDw43hEpVJHBqtgXrSqw1xnSqUvT5vzLdpkwCufBeWQM3kBXLqFpujxJZ aaYhN9iWj/a74iUWM73q2AyHCWGSwo16GFK/s9GroQSwZwhF+GGETA8pThTt/+71P/NQ uglBvV5KNwSnedaxixnuWdJ38d6JODMxVUVzdIdZEit8eSfMgu5bko5VOckAV2L/wDe0 7yraHsITI2gIjv+IueqBcWPaGrMJKeTc3F3vSkF8DZqjlzMGykfy/gHTrNLeT/p0slni 2mQjRo2XNRfJK02t92O22YcUntO4MLjlFJ35QKMpvLJPVjtvehNebCYASgfOhMLx8Ed8 rRtg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x7si1979058eje.585.2021.02.04.15.23.37; Thu, 04 Feb 2021 15:24:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232109AbhBDGjS (ORCPT + 99 others); Thu, 4 Feb 2021 01:39:18 -0500 Received: from out30-56.freemail.mail.aliyun.com ([115.124.30.56]:52396 "EHLO out30-56.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231592AbhBDGjR (ORCPT ); Thu, 4 Feb 2021 01:39:17 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R171e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04394;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0UNpw7Hg_1612420709; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0UNpw7Hg_1612420709) by smtp.aliyun-inc.com(127.0.0.1); Thu, 04 Feb 2021 14:38:34 +0800 From: Jiapeng Chong To: james.qian.wang@arm.com Cc: liviu.dudau@arm.com, mihail.atanassov@arm.com, brian.starkey@arm.com, airlied@linux.ie, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] drm/komeda: convert sysfs sprintf/snprintf family to sysfs_emit Date: Thu, 4 Feb 2021 14:38:28 +0800 Message-Id: <1612420708-25297-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccicheck warning: ./drivers/gpu/drm/arm/display/komeda/komeda_dev.c:97:8-16: WARNING: use scnprintf or sprintf. ./drivers/gpu/drm/arm/display/komeda/komeda_dev.c:88:8-16: WARNING: use scnprintf or sprintf. ./drivers/gpu/drm/arm/display/komeda/komeda_dev.c:65:8-16: WARNING: use scnprintf or sprintf. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c index ca891ae..cc7664c 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c @@ -62,7 +62,7 @@ static void komeda_debugfs_init(struct komeda_dev *mdev) { struct komeda_dev *mdev = dev_to_mdev(dev); - return snprintf(buf, PAGE_SIZE, "0x%08x\n", mdev->chip.core_id); + return sysfs_emit(buf, "0x%08x\n", mdev->chip.core_id); } static DEVICE_ATTR_RO(core_id); @@ -85,7 +85,7 @@ static void komeda_debugfs_init(struct komeda_dev *mdev) if (pipe->layers[i]->layer_type == KOMEDA_FMT_RICH_LAYER) config_id.n_richs++; } - return snprintf(buf, PAGE_SIZE, "0x%08x\n", config_id.value); + return sysfs_emit(buf, "0x%08x\n", config_id.value); } static DEVICE_ATTR_RO(config_id); @@ -94,7 +94,7 @@ static void komeda_debugfs_init(struct komeda_dev *mdev) { struct komeda_dev *mdev = dev_to_mdev(dev); - return snprintf(buf, PAGE_SIZE, "%lu\n", clk_get_rate(mdev->aclk)); + return sysfs_emit(buf, "%lu\n", clk_get_rate(mdev->aclk)); } static DEVICE_ATTR_RO(aclk_hz); -- 1.8.3.1