All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fbdev: ssd1307fb: Use bool for ssd1307fb_deviceinfo flags
@ 2023-08-31 12:05 ` Geert Uytterhoeven
  0 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2023-08-31 12:05 UTC (permalink / raw)
  To: Helge Deller, Javier Martinez Canillas
  Cc: linux-fbdev, dri-devel, Geert Uytterhoeven

The .need_pwm and .need_chargepump fields in struct ssd1307fb_deviceinfo
are flags that can have only two possible values: 0 and 1.
Reduce kernel size by changing their types from int to bool.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 drivers/video/fbdev/ssd1307fb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index 86dd24022871a843..5ae48e36fccb4e8d 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -52,8 +52,8 @@ struct ssd1307fb_deviceinfo {
 	u32 default_vcomh;
 	u32 default_dclk_div;
 	u32 default_dclk_frq;
-	int need_pwm;
-	int need_chargepump;
+	bool need_pwm;
+	bool need_chargepump;
 };
 
 struct ssd1307fb_par {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] fbdev: ssd1307fb: Use bool for ssd1307fb_deviceinfo flags
@ 2023-08-31 12:05 ` Geert Uytterhoeven
  0 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2023-08-31 12:05 UTC (permalink / raw)
  To: Helge Deller, Javier Martinez Canillas
  Cc: linux-fbdev, Geert Uytterhoeven, dri-devel

The .need_pwm and .need_chargepump fields in struct ssd1307fb_deviceinfo
are flags that can have only two possible values: 0 and 1.
Reduce kernel size by changing their types from int to bool.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 drivers/video/fbdev/ssd1307fb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index 86dd24022871a843..5ae48e36fccb4e8d 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -52,8 +52,8 @@ struct ssd1307fb_deviceinfo {
 	u32 default_vcomh;
 	u32 default_dclk_div;
 	u32 default_dclk_frq;
-	int need_pwm;
-	int need_chargepump;
+	bool need_pwm;
+	bool need_chargepump;
 };
 
 struct ssd1307fb_par {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] fbdev: ssd1307fb: Use bool for ssd1307fb_deviceinfo flags
  2023-08-31 12:05 ` Geert Uytterhoeven
@ 2023-08-31 17:39   ` Javier Martinez Canillas
  -1 siblings, 0 replies; 5+ messages in thread
From: Javier Martinez Canillas @ 2023-08-31 17:39 UTC (permalink / raw)
  To: Geert Uytterhoeven, Helge Deller
  Cc: linux-fbdev, dri-devel, Geert Uytterhoeven

Geert Uytterhoeven <geert@linux-m68k.org> writes:

> The .need_pwm and .need_chargepump fields in struct ssd1307fb_deviceinfo
> are flags that can have only two possible values: 0 and 1.
> Reduce kernel size by changing their types from int to bool.
>
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---

Acked-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] fbdev: ssd1307fb: Use bool for ssd1307fb_deviceinfo flags
@ 2023-08-31 17:39   ` Javier Martinez Canillas
  0 siblings, 0 replies; 5+ messages in thread
From: Javier Martinez Canillas @ 2023-08-31 17:39 UTC (permalink / raw)
  To: Geert Uytterhoeven, Helge Deller
  Cc: linux-fbdev, Geert Uytterhoeven, dri-devel

Geert Uytterhoeven <geert@linux-m68k.org> writes:

> The .need_pwm and .need_chargepump fields in struct ssd1307fb_deviceinfo
> are flags that can have only two possible values: 0 and 1.
> Reduce kernel size by changing their types from int to bool.
>
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---

Acked-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] fbdev: ssd1307fb: Use bool for ssd1307fb_deviceinfo flags
  2023-08-31 12:05 ` Geert Uytterhoeven
  (?)
  (?)
@ 2023-08-31 21:40 ` Helge Deller
  -1 siblings, 0 replies; 5+ messages in thread
From: Helge Deller @ 2023-08-31 21:40 UTC (permalink / raw)
  To: Geert Uytterhoeven, Javier Martinez Canillas; +Cc: linux-fbdev, dri-devel

On 8/31/23 14:05, Geert Uytterhoeven wrote:
> The .need_pwm and .need_chargepump fields in struct ssd1307fb_deviceinfo
> are flags that can have only two possible values: 0 and 1.
> Reduce kernel size by changing their types from int to bool.
>
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

applied to fbdev git tree.

Thanks!
Helge

> ---
>   drivers/video/fbdev/ssd1307fb.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
> index 86dd24022871a843..5ae48e36fccb4e8d 100644
> --- a/drivers/video/fbdev/ssd1307fb.c
> +++ b/drivers/video/fbdev/ssd1307fb.c
> @@ -52,8 +52,8 @@ struct ssd1307fb_deviceinfo {
>   	u32 default_vcomh;
>   	u32 default_dclk_div;
>   	u32 default_dclk_frq;
> -	int need_pwm;
> -	int need_chargepump;
> +	bool need_pwm;
> +	bool need_chargepump;
>   };
>
>   struct ssd1307fb_par {


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-31 21:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-31 12:05 [PATCH] fbdev: ssd1307fb: Use bool for ssd1307fb_deviceinfo flags Geert Uytterhoeven
2023-08-31 12:05 ` Geert Uytterhoeven
2023-08-31 17:39 ` Javier Martinez Canillas
2023-08-31 17:39   ` Javier Martinez Canillas
2023-08-31 21:40 ` Helge Deller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.