Message ID | 20230710130113.14563-10-tzimmermann@suse.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | fbdev: Remove FBINFO_DEFAULT and FBINFO_FLAG_DEFAULT flags | expand |
On Mon, Jul 10, 2023 at 3:01 PM Thomas Zimmermann <tzimmermann@suse.de> 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
Hi Am 10.07.23 um 16:24 schrieb Miguel Ojeda: > On Mon, Jul 10, 2023 at 3:01 PM Thomas Zimmermann <tzimmermann@suse.de> 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
On Mon, Jul 10, 2023 at 5:22 PM Thomas Zimmermann <tzimmermann@suse.de> 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 <ojeda@kernel.org> Otherwise, I can take it into the `auxdisplay` tree. Cheers, Miguel
Hi Am 10.07.23 um 18:25 schrieb Miguel Ojeda: > On Mon, Jul 10, 2023 at 5:22 PM Thomas Zimmermann <tzimmermann@suse.de> 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 <ojeda@kernel.org> 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
On Tue, Jul 11, 2023 at 8:10 AM Thomas Zimmermann <tzimmermann@suse.de> 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
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);
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 <tzimmermann@suse.de> Cc: Miguel Ojeda <ojeda@kernel.org> Cc: Robin van der Gracht <robin@protonic.nl> --- drivers/auxdisplay/cfag12864bfb.c | 1 - drivers/auxdisplay/ht16k33.c | 1 - 2 files changed, 2 deletions(-)