Received: by 2002:a05:7412:8d09:b0:fa:4c10:6cad with SMTP id bj9csp246217rdb; Mon, 15 Jan 2024 21:05:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IFXxciScy9nto340P3+XgnIW5TQZKH6cNji6Sxjz+IJPZriFQn4nNHwP7aWSpUci7Hm8cnr X-Received: by 2002:a05:6512:922:b0:50e:8ece:1058 with SMTP id f2-20020a056512092200b0050e8ece1058mr2479559lft.137.1705381555133; Mon, 15 Jan 2024 21:05:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705381555; cv=none; d=google.com; s=arc-20160816; b=MLiyViUaLCs9zuUoYto2PeQagBOqjleofyBrcPZGRwj4bwfnU7zWccRmm3SkxtUnWu LCi5TTNuXtdf9DmXyRQVq70D2G24ZjFPlLPAkDKbbKFMfmCCuEC5MhQ7xx1aZcB91sA2 sR0eddAJwgqgGAQn3cDVvydNmneA7JRsbBjeF4aJTyqZgfejxwe2TSC7t8DDWa/+fzr6 v9TKxXGiUtfR6eHfQqHZsXrfaSGYGmmu+deFtYlLao8e/Ai6Dqus2TMrF/Bx7mnWZjBl pBITnZ+W/ZOBdedLmYSwVCy5koxsgu72oD4wztLf9O6H9+40VDWrpTUPLtnALKeVBNj1 MbNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=OKnH/78SPVv6RZAd8oqdQ2AsU29T3ZeOVfBwrCiB/uA=; fh=BZJehnNNzIXihoKd75n36mh6LU3zq6ZX91OJo/KFXyI=; b=EArdIyP3KGUIyh+3nJTgOR+kYj+8RUmWakoX3NoCooexVkU3uAiodk/VuhSnXL/BID F+uXkW49M9osyo71yVRjuqCxGe5N6JZseRg81NiCmCfFrrABLtBzN7xI/omm0sXKWspt V/RRHUVlPnR2DGCIOEOV4fVCbohIEVj+Yg29cSWj4b/yDCUj9d6GR1Sf65cZrHCv/MFV W1jbLvAN2LZ9W7NMuKAYsuCVyz2PWl0A6A+Os/T2ZNZCwjw3MccAGks/KrF4237aLVae O1H1WcF78PWgPZ8/F6nu2vBpYaDPkjsiJLHlFarrikhi2QD7I2yGv3uNln+ZMJD3T9ff vdfQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-27002-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-27002-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fujitsu.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id t9-20020a17090616c900b00a2c86ebe164si4135228ejd.954.2024.01.15.21.05.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 21:05:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-27002-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-27002-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-27002-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fujitsu.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D7ABB1F23AB1 for ; Tue, 16 Jan 2024 05:05:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 010761F933; Tue, 16 Jan 2024 04:53:39 +0000 (UTC) Received: from esa10.hc1455-7.c3s2.iphmx.com (esa10.hc1455-7.c3s2.iphmx.com [139.138.36.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6C09912B90; Tue, 16 Jan 2024 04:53:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fujitsu.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fujitsu.com X-IronPort-AV: E=McAfee;i="6600,9927,10954"; a="133883827" X-IronPort-AV: E=Sophos;i="6.04,198,1695654000"; d="scan'208";a="133883827" Received: from unknown (HELO yto-r1.gw.nic.fujitsu.com) ([218.44.52.217]) by esa10.hc1455-7.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2024 13:52:30 +0900 Received: from yto-m2.gw.nic.fujitsu.com (yto-nat-yto-m2.gw.nic.fujitsu.com [192.168.83.65]) by yto-r1.gw.nic.fujitsu.com (Postfix) with ESMTP id 36282D9DA5; Tue, 16 Jan 2024 13:52:28 +0900 (JST) Received: from kws-ab3.gw.nic.fujitsu.com (kws-ab3.gw.nic.fujitsu.com [192.51.206.21]) by yto-m2.gw.nic.fujitsu.com (Postfix) with ESMTP id 812D9D67B3; Tue, 16 Jan 2024 13:52:27 +0900 (JST) Received: from edo.cn.fujitsu.com (edo.cn.fujitsu.com [10.167.33.5]) by kws-ab3.gw.nic.fujitsu.com (Postfix) with ESMTP id 19148200A571F; Tue, 16 Jan 2024 13:52:27 +0900 (JST) Received: from localhost.localdomain (unknown [10.167.226.45]) by edo.cn.fujitsu.com (Postfix) with ESMTP id 97D7B1A015F; Tue, 16 Jan 2024 12:52:26 +0800 (CST) From: Li Zhijian To: linux-kernel@vger.kernel.org Cc: Li Zhijian , Helge Deller , linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH 41/42] drivers/video/fbdev/uvesafb: Convert snprintf to sysfs_emit Date: Tue, 16 Jan 2024 12:51:50 +0800 Message-Id: <20240116045151.3940401-39-lizhijian@fujitsu.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20240116045151.3940401-1-lizhijian@fujitsu.com> References: <20240116041129.3937800-1-lizhijian@fujitsu.com> <20240116045151.3940401-1-lizhijian@fujitsu.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-TM-AS-Product-Ver: IMSS-9.1.0.1417-9.0.0.1002-28122.004 X-TM-AS-User-Approved-Sender: Yes X-TMASE-Version: IMSS-9.1.0.1417-9.0.1002-28122.004 X-TMASE-Result: 10--9.874000-10.000000 X-TMASE-MatchedRID: i5zBIT546Mc4ibokZ3+Q0CoiRKlBVkYIBXngI6jFvpfvd49YGReckE1N J2MN+nPkgxCMf8A0YpR5sRK06wHV4TBF7stuNMMx7pujb8urdzbBOVz0Jwcxl6vCrG0TnfVUg9x e4gtUJtpqw4mhfH/Cj7xaYlLIzqlbxrdsXS7GN2R85pjA/x1xfh+KaaVwAG43myiLZetSf8nyb6 HMFK1qe11j5mhaIsibIAcCikR3vq/kMPXp0aB3ELYviMHenHfbKLjGgcED+8Cce8i7phl3Cch2t Yr3dvi2 X-TMASE-SNAP-Result: 1.821001.0001-0-1-22:0,33:0,34:0-0 Per filesystems/sysfs.rst, show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. coccinelle complains that there are still a couple of functions that use snprintf(). Convert them to sysfs_emit(). > ./drivers/video/fbdev/uvesafb.c:1549:8-16: WARNING: please use sysfs_emit No functional change intended CC: Helge Deller CC: linux-fbdev@vger.kernel.org CC: dri-devel@lists.freedesktop.org Signed-off-by: Li Zhijian --- drivers/video/fbdev/uvesafb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/uvesafb.c b/drivers/video/fbdev/uvesafb.c index e1f421e91b4f..73f00c079a94 100644 --- a/drivers/video/fbdev/uvesafb.c +++ b/drivers/video/fbdev/uvesafb.c @@ -1546,7 +1546,7 @@ static ssize_t uvesafb_show_vbe_ver(struct device *dev, struct fb_info *info = dev_get_drvdata(dev); struct uvesafb_par *par = info->par; - return snprintf(buf, PAGE_SIZE, "%.4x\n", par->vbe_ib.vbe_version); + return sysfs_emit(buf, "%.4x\n", par->vbe_ib.vbe_version); } static DEVICE_ATTR(vbe_version, S_IRUGO, uvesafb_show_vbe_ver, NULL); -- 2.29.2