lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6ea07a1e-39ca-42d8-85fe-a03f388a8d2e@fujitsu.com>
Date: Tue, 19 Mar 2024 04:00:30 +0000
From: "Zhijian Li (Fujitsu)" <lizhijian@...itsu.com>
To: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: Neil Armstrong <neil.armstrong@...aro.org>, Jessica Zhang
	<quic_jesszhan@...cinc.com>, Sam Ravnborg <sam@...nborg.org>, Maarten
 Lankhorst <maarten.lankhorst@...ux.intel.com>, Maxime Ripard
	<mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>, David Airlie
	<airlied@...il.com>, Daniel Vetter <daniel@...ll.ch>, Helge Deller
	<deller@....de>, "linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>,
	"linux-fbdev@...r.kernel.org" <linux-fbdev@...r.kernel.org>,
	"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>
Subject: Re: [PATCH] drm,fbdev: td043mtea1: Convert sprintf() family to
 sysfs_emit() family



On 19/03/2024 11:43, Li Zhijian wrote:
> diff --git
> a/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c
> b/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c
> index 477789cff8e0..040a17a05baa 100644
> --- a/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c
> +++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-tpo-td043mtea1.c
> @@ -228,14 +228,10 @@ static ssize_t tpo_td043_gamma_show(struct device
> *dev,
>   	int ret;
>   	int i;
>   
> -	for (i = 0; i < ARRAY_SIZE(ddata->gamma); i++) {
> -		ret = snprintf(buf + len, PAGE_SIZE - len, "%u ",
> -				ddata->gamma[i]);
> -		if (ret < 0)
> -			return ret;
> -		len += ret;
> -	}
> -	buf[len - 1] = '\n';
> +	for (i = 0; i < ARRAY_SIZE(ddata->gamma); i++)
> +		len = sysfs_emit_at(buf, len, "%u ", ddata->gamma[i]);

It should be
		len += sysfs_emit_at(buf, len, "%u ", ddata->gamma[i]);

just posted V2 to fix this.


Thanks
Zhijian

> +	if (len)
> +		buf[len - 1] = '\n';
>   

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ