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: <aYMXb9ndJnisl-zP@stanley.mountain>
Date: Wed, 4 Feb 2026 12:54:55 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Artem Lytkin <iprintercanon@...il.com>
Cc: Sudip Mukherjee <sudipm.mukherjee@...il.com>,
	Teddy Wang <teddy.wang@...iconmotion.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-fbdev@...r.kernel.org, linux-staging@...ts.linux.dev,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/4] staging: sm750fb: convert pr_* to dev_* logging in
 sm750.c

On Tue, Feb 03, 2026 at 11:07:57PM +0000, Artem Lytkin wrote:
> Convert pr_info/pr_err/pr_debug/pr_warn calls to their dev_*
> equivalents in functions where device context is available via
> info->device or par->dev->pdev->dev. This adds device identification
> to log messages, improving debuggability in multi-device systems.
> 
> Signed-off-by: Artem Lytkin <iprintercanon@...il.com>
> ---
>  drivers/staging/sm750fb/sm750.c | 107 ++++++++++++++++----------------
>  1 file changed, 54 insertions(+), 53 deletions(-)
> 
> diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
> index bd2d4a290..247c58556 100644
> --- a/drivers/staging/sm750fb/sm750.c
> +++ b/drivers/staging/sm750fb/sm750.c
> @@ -375,7 +375,7 @@ static int lynxfb_ops_set_par(struct fb_info *info)
>  	line_length = var->xres_virtual * var->bits_per_pixel / 8;
>  	line_length = ALIGN(line_length, crtc->line_pad);
>  	fix->line_length = line_length;
> -	pr_info("fix->line_length = %d\n", fix->line_length);
> +	dev_info(info->device, "fix->line_length = %d\n", fix->line_length);

Just delete this sort of thing.

>  
>  	/*
>  	 * var->red,green,blue,transp are need to be set by driver
> @@ -389,7 +389,8 @@ static int lynxfb_ops_set_par(struct fb_info *info)
>  	var->accel_flags = 0;/*FB_ACCELF_TEXT;*/
>  
>  	if (ret) {
> -		pr_err("bpp %d not supported\n", var->bits_per_pixel);
> +		dev_err(info->device, "bpp %d not supported\n",
> +			var->bits_per_pixel);
>  		return ret;
>  	}
>  	ret = hw_sm750_crtc_set_mode(crtc, var, fix);
> @@ -485,15 +486,16 @@ static int lynxfb_ops_check_var(struct fb_var_screeninfo *var,
>  	par = info->par;
>  	crtc = &par->crtc;
>  
> -	pr_debug("check var:%dx%d-%d\n",
> -		 var->xres,
> -		 var->yres,
> -		 var->bits_per_pixel);
> +	dev_dbg(info->device, "check var:%dx%d-%d\n",
> +		var->xres,
> +		var->yres,
> +		var->bits_per_pixel);
>  
>  	ret = lynxfb_set_color_offsets(info);
>  
>  	if (ret) {
> -		pr_err("bpp %d not supported\n", var->bits_per_pixel);
> +		dev_err(info->device, "bpp %d not supported\n",
> +			var->bits_per_pixel);
>  		return ret;
>  	}
>  
> @@ -508,7 +510,7 @@ static int lynxfb_ops_check_var(struct fb_var_screeninfo *var,
>  	request = ALIGN(request, crtc->line_pad);
>  	request = request * var->yres_virtual;
>  	if (crtc->vidmem_size < request) {
> -		pr_err("not enough video memory for mode\n");
> +		dev_err(info->device, "not enough video memory for mode\n");
>  		return -ENOMEM;
>  	}
>  
> @@ -533,7 +535,7 @@ static int lynxfb_ops_setcolreg(unsigned int regno,
>  	ret = 0;
>  
>  	if (regno > 256) {
> -		pr_err("regno = %d\n", regno);
> +		dev_err(info->device, "regno = %d\n", regno);
>  		return -EINVAL;
>  	}
>  
> @@ -580,10 +582,10 @@ static int lynxfb_ops_blank(int blank, struct fb_info *info)
>  	struct lynxfb_par *par;
>  	struct lynxfb_output *output;
>  
> -	pr_debug("blank = %d.\n", blank);
>  	par = info->par;
>  	output = &par->output;
>  	sm750_dev = par->dev;
> +	dev_dbg(info->device, "blank = %d.\n", blank);
>  
>  	if (sm750_dev->revid == SM750LE_REVISION_ID)
>  		return hw_sm750le_set_blank(output, blank);
> @@ -625,7 +627,7 @@ static int sm750fb_set_drv(struct lynxfb_par *par)
>  		crtc->channel = sm750_primary;
>  		crtc->o_screen = 0;
>  		crtc->v_screen = sm750_dev->pvMem;
> -		pr_info("use simul primary mode\n");
> +		dev_info(&par->dev->pdev->dev, "use simul primary mode\n");

Is this useful?

>  		break;
>  	case sm750_simul_sec:
>  		output->paths = sm750_pnc;
> @@ -767,7 +769,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)
>  	crtc->cursor.mmio = sm750_dev->pvReg +
>  		0x800f0 + (int)crtc->channel * 0x140;
>  
> -	pr_info("crtc->cursor.mmio = %p\n", crtc->cursor.mmio);
> +	dev_info(info->device, "crtc->cursor.mmio = %p\n", crtc->cursor.mmio);

Delete.  Okay, follow the same pattern and delete the debug
code which is printed as _info.

regards,
dan carpenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ