# pm3fb.c: question

- List: linux-fbdev
- 2 messages, 1 author
- Page: https://ratatoskr.run/linux-fbdev/2020/03/13467017/t

## pm3fb.c: question

- From: Randy Dunlap \<rdunlap@infradead.org\>
- Date: 2020-03-14 07:35:17 
- Message: https://ratatoskr.run/linux-fbdev/2020/03/13467017.md

```text
In drivers/video/fbdev/pm3fb.c, if I change the definition of DPRINTK()
(in order to remove some gcc warnings if -Wextra is used), like this:

-#define DPRINTK(a, b...)
+#define DPRINTK(a, b...)	no_printk(a, ##b)

I get a build error here:
		default:
			DPRINTK("Unsupported depth %d\n",
				info->current_par->depth);
			break;

../drivers/video/fbdev/pm3fb.c: In function ‘pm3fb_init_engine’:
../drivers/video/fbdev/pm3fb.c:353:9: error: ‘struct fb_info’ has no member named ‘current_par’
     info->current_par->depth);
         ^

Is there a replacement (fix) for this field?
or should the entire DPRINTK() be deleted?
or somethine else?

thanks.
-- 
~Randy
```

## Re: pm3fb.c: question

- From: Randy Dunlap \<rdunlap@infradead.org\>
- Date: 2020-03-14 17:41:08 
- Message: https://ratatoskr.run/linux-fbdev/2020/03/13467018.md

```text
On 3/14/20 12:35 AM, Randy Dunlap wrote:
> In drivers/video/fbdev/pm3fb.c, if I change the definition of DPRINTK()
> (in order to remove some gcc warnings if -Wextra is used), like this:
> 
> -#define DPRINTK(a, b...)
> +#define DPRINTK(a, b...)	no_printk(a, ##b)
> 
> I get a build error here:
> 		default:
> 			DPRINTK("Unsupported depth %d\n",
> 				info->current_par->depth);
> 			break;
> 
> ../drivers/video/fbdev/pm3fb.c: In function ‘pm3fb_init_engine’:
> ../drivers/video/fbdev/pm3fb.c:353:9: error: ‘struct fb_info’ has no member named ‘current_par’
>      info->current_par->depth);
>          ^
> 
> Is there a replacement (fix) for this field?
> or should the entire DPRINTK() be deleted?
> or somethine else?

Got it.
I'll just change it to what is used in the switch statement above.

-- 
~Randy
```
