diff mbox series

[v2,19/28] video: fbdev: sstfb: Updated logging to fix set but not used warnings

Message ID 20201128224114.1033617-20-sam@ravnborg.org (mailing list archive)
State New, archived
Headers show
Series drivers/video: W=1 warning fixes | expand

Commit Message

Sam Ravnborg Nov. 28, 2020, 10:41 p.m. UTC
Fix set but not used warnings by introducing no_printk variants
for the internal logging system for this driver.

Fix a new warning that popped up now that logging was checked for
correct printf format strings.

A more invasive fix had been to replace all the internal logging with
standard logging primitives - thats for another day.

v2:
  - Update subject (Lee)

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Alex Dewar <alex.dewar90@gmail.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: linux-fbdev@vger.kernel.org
Cc: Lee Jones <lee.jones@linaro.org>
---
 drivers/video/fbdev/sstfb.c | 2 +-
 include/video/sstfb.h       | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Thomas Zimmermann Nov. 30, 2020, 2:25 p.m. UTC | #1
Am 28.11.20 um 23:41 schrieb Sam Ravnborg:
> Fix set but not used warnings by introducing no_printk variants
> for the internal logging system for this driver.
> 
> Fix a new warning that popped up now that logging was checked for
> correct printf format strings.
> 
> A more invasive fix had been to replace all the internal logging with
> standard logging primitives - thats for another day.
> 
> v2:
>    - Update subject (Lee)
> 
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> Cc: Alex Dewar <alex.dewar90@gmail.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: linux-fbdev@vger.kernel.org
> Cc: Lee Jones <lee.jones@linaro.org>

Acked-by: Thomas Zimmermann <tzimmermann@suse.de>

> ---
>   drivers/video/fbdev/sstfb.c | 2 +-
>   include/video/sstfb.h       | 4 ++--
>   2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/video/fbdev/sstfb.c b/drivers/video/fbdev/sstfb.c
> index c05cdabeb11c..27d4b0ace2d6 100644
> --- a/drivers/video/fbdev/sstfb.c
> +++ b/drivers/video/fbdev/sstfb.c
> @@ -1390,7 +1390,7 @@ static int sstfb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
>   	        fix->smem_start, info->screen_base,
>   	        fix->smem_len >> 20);
>   
> -	f_ddprintk("regbase_virt: %#lx\n", par->mmio_vbase);
> +	f_ddprintk("regbase_virt: %p\n", par->mmio_vbase);
>   	f_ddprintk("membase_phys: %#lx\n", fix->smem_start);
>   	f_ddprintk("fbbase_virt: %p\n", info->screen_base);
>   
> diff --git a/include/video/sstfb.h b/include/video/sstfb.h
> index 28384f354773..d4a5e41d1173 100644
> --- a/include/video/sstfb.h
> +++ b/include/video/sstfb.h
> @@ -23,7 +23,7 @@
>   #  define SST_DEBUG_FUNC 1
>   #  define SST_DEBUG_VAR  1
>   #else
> -#  define dprintk(X...)
> +#  define dprintk(X...)		no_printk(X)
>   #  define SST_DEBUG_REG  0
>   #  define SST_DEBUG_FUNC 0
>   #  define SST_DEBUG_VAR  0
> @@ -48,7 +48,7 @@
>   #if (SST_DEBUG_FUNC > 1)
>   #  define f_ddprintk(X...)	dprintk(" " X)
>   #else
> -#  define f_ddprintk(X...)
> +#  define f_ddprintk(X...)	no_printk(X)
>   #endif
>   #if (SST_DEBUG_FUNC > 2)
>   #  define f_dddprintk(X...)	dprintk(" " X)
>
diff mbox series

Patch

diff --git a/drivers/video/fbdev/sstfb.c b/drivers/video/fbdev/sstfb.c
index c05cdabeb11c..27d4b0ace2d6 100644
--- a/drivers/video/fbdev/sstfb.c
+++ b/drivers/video/fbdev/sstfb.c
@@ -1390,7 +1390,7 @@  static int sstfb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	        fix->smem_start, info->screen_base,
 	        fix->smem_len >> 20);
 
-	f_ddprintk("regbase_virt: %#lx\n", par->mmio_vbase);
+	f_ddprintk("regbase_virt: %p\n", par->mmio_vbase);
 	f_ddprintk("membase_phys: %#lx\n", fix->smem_start);
 	f_ddprintk("fbbase_virt: %p\n", info->screen_base);
 
diff --git a/include/video/sstfb.h b/include/video/sstfb.h
index 28384f354773..d4a5e41d1173 100644
--- a/include/video/sstfb.h
+++ b/include/video/sstfb.h
@@ -23,7 +23,7 @@ 
 #  define SST_DEBUG_FUNC 1
 #  define SST_DEBUG_VAR  1
 #else
-#  define dprintk(X...)
+#  define dprintk(X...)		no_printk(X)
 #  define SST_DEBUG_REG  0
 #  define SST_DEBUG_FUNC 0
 #  define SST_DEBUG_VAR  0
@@ -48,7 +48,7 @@ 
 #if (SST_DEBUG_FUNC > 1)
 #  define f_ddprintk(X...)	dprintk(" " X)
 #else
-#  define f_ddprintk(X...)
+#  define f_ddprintk(X...)	no_printk(X)
 #endif
 #if (SST_DEBUG_FUNC > 2)
 #  define f_dddprintk(X...)	dprintk(" " X)