2023-07-10 13:09:09

by Thomas Zimmermann

[permalink] [raw]
Subject: [PATCH 09/17] auxdisplay: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers

The flag FBINFO_FLAG_DEFAULT is 0 and has no effect, as struct
fbinfo.flags has been allocated to zero by framebuffer_alloc(). So do
not set it.

Flags should signal differences from the default values. After cleaning
up all occurences of FBINFO_FLAG_DEFAULT, the token can be removed.

Signed-off-by: Thomas Zimmermann <[email protected]>
Cc: Miguel Ojeda <[email protected]>
Cc: Robin van der Gracht <[email protected]>
---
drivers/auxdisplay/cfag12864bfb.c | 1 -
drivers/auxdisplay/ht16k33.c | 1 -
2 files changed, 2 deletions(-)

diff --git a/drivers/auxdisplay/cfag12864bfb.c b/drivers/auxdisplay/cfag12864bfb.c
index c2cab7e2b126..729845bcc803 100644
--- a/drivers/auxdisplay/cfag12864bfb.c
+++ b/drivers/auxdisplay/cfag12864bfb.c
@@ -79,7 +79,6 @@ static int cfag12864bfb_probe(struct platform_device *device)
info->var = cfag12864bfb_var;
info->pseudo_palette = NULL;
info->par = NULL;
- info->flags = FBINFO_FLAG_DEFAULT;

if (register_framebuffer(info) < 0)
goto fballoced;
diff --git a/drivers/auxdisplay/ht16k33.c b/drivers/auxdisplay/ht16k33.c
index edaf92b7ea77..df3f37651e45 100644
--- a/drivers/auxdisplay/ht16k33.c
+++ b/drivers/auxdisplay/ht16k33.c
@@ -646,7 +646,6 @@ static int ht16k33_fbdev_probe(struct device *dev, struct ht16k33_priv *priv,
fbdev->info->var = ht16k33_fb_var;
fbdev->info->bl_dev = bl;
fbdev->info->pseudo_palette = NULL;
- fbdev->info->flags = FBINFO_FLAG_DEFAULT;
fbdev->info->par = priv;

err = register_framebuffer(fbdev->info);
--
2.41.0



2023-07-10 14:31:58

by Miguel Ojeda

[permalink] [raw]
Subject: Re: [PATCH 09/17] auxdisplay: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers

On Mon, Jul 10, 2023 at 3:01 PM Thomas Zimmermann <[email protected]> wrote:
>
> The flag FBINFO_FLAG_DEFAULT is 0 and has no effect, as struct
> fbinfo.flags has been allocated to zero by framebuffer_alloc(). So do
> not set it.

`framebuffer_alloc()` does indeed use `kzalloc()`, but the docs do not
mention the zeroing. Should that guarantee be documented?

> Flags should signal differences from the default values. After cleaning
> up all occurences of FBINFO_FLAG_DEFAULT, the token can be removed.

occurences -> occurrences

can -> will maybe? Since the intention of the patch series is to
remove it (them) altogether).

Thanks!

Cheers,
Miguel

2023-07-10 15:50:47

by Thomas Zimmermann

[permalink] [raw]
Subject: Re: [PATCH 09/17] auxdisplay: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers

Hi

Am 10.07.23 um 16:24 schrieb Miguel Ojeda:
> On Mon, Jul 10, 2023 at 3:01 PM Thomas Zimmermann <[email protected]> wrote:
>>
>> The flag FBINFO_FLAG_DEFAULT is 0 and has no effect, as struct
>> fbinfo.flags has been allocated to zero by framebuffer_alloc(). So do
>> not set it.
>
> `framebuffer_alloc()` does indeed use `kzalloc()`, but the docs do not
> mention the zeroing. Should that guarantee be documented?

I'll append a patch to the series that documents this.

>
>> Flags should signal differences from the default values. After cleaning
>> up all occurences of FBINFO_FLAG_DEFAULT, the token can be removed.
>
> occurences -> occurrences
>
> can -> will maybe? Since the intention of the patch series is to
> remove it (them) altogether).

Sure.

Best regards
Thomas

>
> Thanks!
>
> Cheers,
> Miguel

--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)


Attachments:
OpenPGP_signature (855.00 B)
OpenPGP digital signature

2023-07-10 16:38:43

by Miguel Ojeda

[permalink] [raw]
Subject: Re: [PATCH 09/17] auxdisplay: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers

On Mon, Jul 10, 2023 at 5:22 PM Thomas Zimmermann <[email protected]> wrote:
>
> I'll append a patch to the series that documents this.
>
> Sure.

Thanks!

If you are planning to take it into some other tree:

Acked-by: Miguel Ojeda <[email protected]>

Otherwise, I can take it into the `auxdisplay` tree.

Cheers,
Miguel

2023-07-11 07:01:56

by Thomas Zimmermann

[permalink] [raw]
Subject: Re: [PATCH 09/17] auxdisplay: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers

Hi

Am 10.07.23 um 18:25 schrieb Miguel Ojeda:
> On Mon, Jul 10, 2023 at 5:22 PM Thomas Zimmermann <[email protected]> wrote:
>>
>> I'll append a patch to the series that documents this.
>>
>> Sure.
>
> Thanks!
>
> If you are planning to take it into some other tree:
>
> Acked-by: Miguel Ojeda <[email protected]>

Thanks.

>
> Otherwise, I can take it into the `auxdisplay` tree.

I'd like to take the patchset into drm-misc. It's part of a larger
cleanup of the fbdev modules and its interfaces.

Best regards
Thomas

>
> Cheers,
> Miguel

--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)


Attachments:
OpenPGP_signature (855.00 B)
OpenPGP digital signature

2023-07-11 10:20:01

by Miguel Ojeda

[permalink] [raw]
Subject: Re: [PATCH 09/17] auxdisplay: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers

On Tue, Jul 11, 2023 at 8:10 AM Thomas Zimmermann <[email protected]> wrote:
>
> I'd like to take the patchset into drm-misc. It's part of a larger
> cleanup of the fbdev modules and its interfaces.

Sounds good, thanks!

Cheers,
Miguel