Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp25158pxb; Wed, 30 Mar 2022 21:53:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwF7ere4vfLWqQV0VSQFRw4Rt3+R1bRbNYAH7td7k57r3NJVlfTstIOKkA4DCC1srH8QOhg X-Received: by 2002:a05:6a00:2485:b0:4f6:b5c5:ee8e with SMTP id c5-20020a056a00248500b004f6b5c5ee8emr3505534pfv.21.1648702381921; Wed, 30 Mar 2022 21:53:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648702381; cv=none; d=google.com; s=arc-20160816; b=XaPBCZ/V0zj+OKJpOJGfxfnl1wq5pxOMtDhIDVUDgqELyzbDnsYDeEiqwbfAgrFi30 IB/rZm2Z+fRPMDjUwMNpNav8Kov7EVEAYW/N59Gn7v9upqqE+bDdwKmT8yyJeG/fVu9J I5LvHfxdkJPUwe/qV0laUwOMOiCAoG4hv6Ku1wFd0YAzQ/aQlRVbZF6iFuZsYPGy00ij 1+UhWQmetxfDCnSxNSw1wU+uWlKoLIPldHw9eCF/iSWdC96UQmu3zTJ5eohlukYLYNgf HXEYYvq1zfy5maM4Usy4GK+Wh8OiRNZ5kAb85okiiwmRjWfi9A7ZUj/w/+eoEjHABjTD XFeQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bGgwRXwgdwelQZKff78kna6ugERkaudu4DO4MFNPU9E=; b=DZvNjC4oBcbXJL4BfQCnIrrsg8snL9KPIcslwvRG6MumTSqdXEuKsE2UpGfIO2Zyta K+tmeK3xsoFKZZiIplFJmUZONAjBKvRm00NFo5oaxPTd4t0X+gbrKzKJUT8EsQmygttf MnvnsZ2iqYqQBI57GGVMdaM5iYMLi/GvJfQnAvvwkwf3DvbPtsUf0OK8Tsk33YjDvRsv gqgke/o+tgzM53YanJOFdQ9Uo1DCJEbfQP5KkiGpjQSvPJdXQIqgbPrtYXdREUWyhJmf yk1QS0JTz8Lke+Gj19a0bhfJ7gKSLJffZ4Bt7BDNuNY4d4ZTAlkkN8MRUJNTpOlZlBX/ PE3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BeNvgZLu; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id mw1-20020a17090b4d0100b001c613fa106asi2323096pjb.163.2022.03.30.21.53.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 21:53:01 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BeNvgZLu; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7C0EA216F9E; Wed, 30 Mar 2022 20:32:50 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240526AbiC3L7b (ORCPT + 99 others); Wed, 30 Mar 2022 07:59:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344604AbiC3LxT (ORCPT ); Wed, 30 Mar 2022 07:53:19 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED80526899B; Wed, 30 Mar 2022 04:49:16 -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 7AB43B81C36; Wed, 30 Mar 2022 11:49:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51555C340F2; Wed, 30 Mar 2022 11:49:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648640955; bh=+wq173W039LLwt49okhsC1cU/Yg0EMixvemiQqA7vmw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BeNvgZLuBg76on0VnOC6kWDTlH3PCpC+GY3ONZfZiueFWDkzyOZ+RYgq2PNbJwWOG gDXyBYwMRa4+EzOIyIVZiyClYuZ9P5BJVreagJ312hSE2qMLlTrtPCSL9oLJbibf5b 0RSD2siU7gNIEpQK0gcZ+cZtbGtbzVgLXkQxEAiZehRCVgubvGRqlNiBC80cFStFxF DyTB9bgqk0VCj8AUmTmcl2/73ONRnMKGdVNx0r23a7AyVymxeTYCZIvA4L/y5dS3VL ip/gLF5uP4PyXMXiD9Cm5xRqODRV0i9XwcSJYOVr//GEZVFzKg+4Iz17zZj6jA3L/g +UxNlcdZR623A== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jing Yao , Zeal Robot , Helge Deller , Sasha Levin , tomi.valkeinen@ti.com, linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.16 27/59] video: fbdev: omapfb: panel-dsi-cm: Use sysfs_emit() instead of snprintf() Date: Wed, 30 Mar 2022 07:47:59 -0400 Message-Id: <20220330114831.1670235-27-sashal@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220330114831.1670235-1-sashal@kernel.org> References: <20220330114831.1670235-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 4b0793abdd84..a2c7c5cb1523 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c @@ -409,7 +409,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, @@ -439,7 +439,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, @@ -487,7 +487,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, @@ -532,7 +532,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