Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2915501pxb; Mon, 18 Apr 2022 10:58:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfVlDhn+tSJx5vvNuTkCznzAsTr2WFpu1h3n3f6uk8ghtJJ2C/POyRXZzp6BqJErc1P8zZ X-Received: by 2002:a17:902:b48a:b0:158:e38d:ca23 with SMTP id y10-20020a170902b48a00b00158e38dca23mr11824346plr.115.1650304709053; Mon, 18 Apr 2022 10:58:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650304709; cv=none; d=google.com; s=arc-20160816; b=jZrAsELHTg2CLVVAe0kNshbqwKAQe1zpLuQxbTcVf36i/EIo/FySpIRthxGvYXJCUA aUPjpIlWLb3qLNMTE4uKDldMWIhXdrKomm/95P/en8ZsM6zk3/qFZXmRslAqze0WbNfK HnjLNbl7NL/p3BgFNzA11otTPQquth5ueaQRijUHkASLUv4zbkZ4mFc6p9KX9hQNKCvl puJ179+8hMD7Em+I9eeCv/YqR0g5NIO3nhhDP5/LWrwytclmKkyeBor3rgcLs7eR8/Wi +0SPVctIHqVfXHZvQ42EYyDDE5C9+C/9LOI7YNfJtATMOtR/onT3bBnJJywW1Yt5Euaj HgDw== 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=x3RYxUrNEguZ/1MQdtJMLXsexhDGICHr2g2ZcCbafgQ=; b=OnyqVdQ3CgfCdft8CAodeSuTwdzDFZeJb5OkYJ7+zfWZwJL+EU9Xi1mqEirVxdOGlI rtDSYVHLQnyWzGQqS6Xna9ZoLRbuoEMNCNMpYm7BhLo4HK7IFcLrQTTsm4SS4AvcooG+ r07JbESny62drBe3zqLh/VE8FeSKKjB1HXmKT2GMOeNce4wEXiqMAvp2TJDbGtt3H00X hAIBoK/wMFtvN49Ul1Cf6oaqtn6OPRIgqYAjc+PwWgeD75JQs7M7Xhqhl3dB1Av7pJca W+TmauPDI2VI3esDmTHQHiqhS1NhEDkS6C+Scv2ig9sK9rHtQ+B3OIfeC5SZ43tQ+455 GCgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nkiLQDX2; 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 c11-20020a170902848b00b0015682b8c0b3si8310221plo.469.2022.04.18.10.58.13; Mon, 18 Apr 2022 10:58:29 -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=nkiLQDX2; 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 S243571AbiDRN5R (ORCPT + 99 others); Mon, 18 Apr 2022 09:57:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244898AbiDRNbA (ORCPT ); Mon, 18 Apr 2022 09:31:00 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD898E6A; Mon, 18 Apr 2022 05:57:21 -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 97832B80E4B; Mon, 18 Apr 2022 12:57:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E332FC385A1; Mon, 18 Apr 2022 12:57:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650286639; bh=d1WhqMnR0SZYGD78p5l5bAJASVYV7v2GXdl4z6axBfQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nkiLQDX2i33nj7//4xxaUKFSzGSEumti3sBiNq5A/npzLnkVLOenKDDXMJfrbD+SG wkB3aKD/vManvGNnYu/O89OEpTekfsVel5hntJ+dr3ckkcCgn7/KKviXYtnrTtrOlC Et85hv2tVs11drIZX0eCAwYBKckUkytEaJCpHdU8= 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 4.14 171/284] video: fbdev: omapfb: panel-dsi-cm: Use sysfs_emit() instead of snprintf() Date: Mon, 18 Apr 2022 14:12:32 +0200 Message-Id: <20220418121216.606058063@linuxfoundation.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220418121210.689577360@linuxfoundation.org> References: <20220418121210.689577360@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.7 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 f63658a59c3d439c8ad7b290f8ec270980e0f384 ] 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/omap2/omapfb/displays/panel-dsi-cm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c index bef431530090..25cc0bcdfe19 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c @@ -413,7 +413,7 @@ static ssize_t dsicm_num_errors_show(struct device *dev, if (r) return r; - return snprintf(buf, PAGE_SIZE, "%d\n", errors); + return sysfs_emit(buf, "%d\n", errors); } static ssize_t dsicm_hw_revision_show(struct device *dev, @@ -444,7 +444,7 @@ static ssize_t dsicm_hw_revision_show(struct device *dev, if (r) return r; - return snprintf(buf, PAGE_SIZE, "%02x.%02x.%02x\n", id1, id2, id3); + return sysfs_emit(buf, "%02x.%02x.%02x\n", id1, id2, id3); } static ssize_t dsicm_store_ulps(struct device *dev, @@ -494,7 +494,7 @@ static ssize_t dsicm_show_ulps(struct device *dev, t = ddata->ulps_enabled; mutex_unlock(&ddata->lock); - return snprintf(buf, PAGE_SIZE, "%u\n", t); + return sysfs_emit(buf, "%u\n", t); } static ssize_t dsicm_store_ulps_timeout(struct device *dev, @@ -541,7 +541,7 @@ static ssize_t dsicm_show_ulps_timeout(struct device *dev, t = ddata->ulps_timeout; mutex_unlock(&ddata->lock); - return snprintf(buf, PAGE_SIZE, "%u\n", t); + return sysfs_emit(buf, "%u\n", t); } static DEVICE_ATTR(num_dsi_errors, S_IRUGO, dsicm_num_errors_show, NULL); -- 2.34.1