* [PATCH] drm/vboxvideo: Make structure vbox_fb_helper_funcs constant @ 2019-08-13 6:25 Nishka Dasgupta 2019-08-13 7:57 ` Hans de Goede 0 siblings, 1 reply; 8+ messages in thread From: Nishka Dasgupta @ 2019-08-13 6:25 UTC (permalink / raw) To: hdegoede, airlied, daniel, dri-devel; +Cc: Nishka Dasgupta The static structure vbox_fb_helper_funcs, of type drm_fb_helper_funcs, is used only when it is passed as the third argument to drm_fb_helper_fbdev_setup(), which does not modify it. Hence make it constant to protect it from unintended modifications. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> --- drivers/gpu/drm/vboxvideo/vbox_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vboxvideo/vbox_drv.c b/drivers/gpu/drm/vboxvideo/vbox_drv.c index 02537ab9cc08..2b57ea3195f2 100644 --- a/drivers/gpu/drm/vboxvideo/vbox_drv.c +++ b/drivers/gpu/drm/vboxvideo/vbox_drv.c @@ -32,7 +32,7 @@ static const struct pci_device_id pciidlist[] = { }; MODULE_DEVICE_TABLE(pci, pciidlist); -static struct drm_fb_helper_funcs vbox_fb_helper_funcs = { +static const struct drm_fb_helper_funcs vbox_fb_helper_funcs = { .fb_probe = vboxfb_create, }; -- 2.19.1 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/vboxvideo: Make structure vbox_fb_helper_funcs constant 2019-08-13 6:25 [PATCH] drm/vboxvideo: Make structure vbox_fb_helper_funcs constant Nishka Dasgupta @ 2019-08-13 7:57 ` Hans de Goede 2019-08-14 17:26 ` Daniel Vetter 0 siblings, 1 reply; 8+ messages in thread From: Hans de Goede @ 2019-08-13 7:57 UTC (permalink / raw) To: Nishka Dasgupta, airlied, daniel, dri-devel Hi, On 13-08-19 08:25, Nishka Dasgupta wrote: > The static structure vbox_fb_helper_funcs, of type drm_fb_helper_funcs, > is used only when it is passed as the third argument to > drm_fb_helper_fbdev_setup(), which does not modify it. Hence make it > constant to protect it from unintended modifications. > Issue found with Coccinelle. > > Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Thank you for the patch, this looks good to me: Reviewed-by: Hans de Goede <hdegoede@redhat.com> Regards, Hans > --- > drivers/gpu/drm/vboxvideo/vbox_drv.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/vboxvideo/vbox_drv.c b/drivers/gpu/drm/vboxvideo/vbox_drv.c > index 02537ab9cc08..2b57ea3195f2 100644 > --- a/drivers/gpu/drm/vboxvideo/vbox_drv.c > +++ b/drivers/gpu/drm/vboxvideo/vbox_drv.c > @@ -32,7 +32,7 @@ static const struct pci_device_id pciidlist[] = { > }; > MODULE_DEVICE_TABLE(pci, pciidlist); > > -static struct drm_fb_helper_funcs vbox_fb_helper_funcs = { > +static const struct drm_fb_helper_funcs vbox_fb_helper_funcs = { > .fb_probe = vboxfb_create, > }; > > _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/vboxvideo: Make structure vbox_fb_helper_funcs constant 2019-08-13 7:57 ` Hans de Goede @ 2019-08-14 17:26 ` Daniel Vetter 2019-08-14 17:36 ` Hans de Goede 0 siblings, 1 reply; 8+ messages in thread From: Daniel Vetter @ 2019-08-14 17:26 UTC (permalink / raw) To: Hans de Goede; +Cc: airlied, dri-devel, Nishka Dasgupta On Tue, Aug 13, 2019 at 09:57:19AM +0200, Hans de Goede wrote: > Hi, > > On 13-08-19 08:25, Nishka Dasgupta wrote: > > The static structure vbox_fb_helper_funcs, of type drm_fb_helper_funcs, > > is used only when it is passed as the third argument to > > drm_fb_helper_fbdev_setup(), which does not modify it. Hence make it > > constant to protect it from unintended modifications. > > Issue found with Coccinelle. > > > > Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> > > Thank you for the patch, this looks good to me: > > Reviewed-by: Hans de Goede <hdegoede@redhat.com> I'm assuming you'll apply this to drm-misc-next too? Good to state that, to avoid confusion and coordination issues. -Daniel > > Regards, > > Hans > > > > --- > > drivers/gpu/drm/vboxvideo/vbox_drv.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/gpu/drm/vboxvideo/vbox_drv.c b/drivers/gpu/drm/vboxvideo/vbox_drv.c > > index 02537ab9cc08..2b57ea3195f2 100644 > > --- a/drivers/gpu/drm/vboxvideo/vbox_drv.c > > +++ b/drivers/gpu/drm/vboxvideo/vbox_drv.c > > @@ -32,7 +32,7 @@ static const struct pci_device_id pciidlist[] = { > > }; > > MODULE_DEVICE_TABLE(pci, pciidlist); > > -static struct drm_fb_helper_funcs vbox_fb_helper_funcs = { > > +static const struct drm_fb_helper_funcs vbox_fb_helper_funcs = { > > .fb_probe = vboxfb_create, > > }; > > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/vboxvideo: Make structure vbox_fb_helper_funcs constant 2019-08-14 17:26 ` Daniel Vetter @ 2019-08-14 17:36 ` Hans de Goede 2019-08-14 17:51 ` Daniel Vetter 2019-08-18 10:56 ` Hans de Goede 0 siblings, 2 replies; 8+ messages in thread From: Hans de Goede @ 2019-08-14 17:36 UTC (permalink / raw) To: Daniel Vetter; +Cc: airlied, dri-devel, Nishka Dasgupta Hi, On 14-08-19 19:26, Daniel Vetter wrote: > On Tue, Aug 13, 2019 at 09:57:19AM +0200, Hans de Goede wrote: >> Hi, >> >> On 13-08-19 08:25, Nishka Dasgupta wrote: >>> The static structure vbox_fb_helper_funcs, of type drm_fb_helper_funcs, >>> is used only when it is passed as the third argument to >>> drm_fb_helper_fbdev_setup(), which does not modify it. Hence make it >>> constant to protect it from unintended modifications. >>> Issue found with Coccinelle. >>> >>> Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> >> >> Thank you for the patch, this looks good to me: >> >> Reviewed-by: Hans de Goede <hdegoede@redhat.com> > > I'm assuming you'll apply this to drm-misc-next too? Good to state that, > to avoid confusion and coordination issues. Actually I'm so used to the workflow in other subsystems I was expecting the subsys maintainer to pick it up. But I know that is not how it works for the drm subsys and since I'm the vboxvideo maintainer I guess it makes sense for me to pick this up and push it. So yes I will pick this up and push it to drm-misc-next, sorry for the confusion. Regards, Hans >>> --- >>> drivers/gpu/drm/vboxvideo/vbox_drv.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/drivers/gpu/drm/vboxvideo/vbox_drv.c b/drivers/gpu/drm/vboxvideo/vbox_drv.c >>> index 02537ab9cc08..2b57ea3195f2 100644 >>> --- a/drivers/gpu/drm/vboxvideo/vbox_drv.c >>> +++ b/drivers/gpu/drm/vboxvideo/vbox_drv.c >>> @@ -32,7 +32,7 @@ static const struct pci_device_id pciidlist[] = { >>> }; >>> MODULE_DEVICE_TABLE(pci, pciidlist); >>> -static struct drm_fb_helper_funcs vbox_fb_helper_funcs = { >>> +static const struct drm_fb_helper_funcs vbox_fb_helper_funcs = { >>> .fb_probe = vboxfb_create, >>> }; >>> > _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/vboxvideo: Make structure vbox_fb_helper_funcs constant 2019-08-14 17:36 ` Hans de Goede @ 2019-08-14 17:51 ` Daniel Vetter 2019-08-14 18:42 ` Sam Ravnborg 2019-08-18 10:56 ` Hans de Goede 1 sibling, 1 reply; 8+ messages in thread From: Daniel Vetter @ 2019-08-14 17:51 UTC (permalink / raw) To: Hans de Goede; +Cc: airlied, dri-devel, Nishka Dasgupta On Wed, Aug 14, 2019 at 07:36:55PM +0200, Hans de Goede wrote: > Hi, > > On 14-08-19 19:26, Daniel Vetter wrote: > > On Tue, Aug 13, 2019 at 09:57:19AM +0200, Hans de Goede wrote: > > > Hi, > > > > > > On 13-08-19 08:25, Nishka Dasgupta wrote: > > > > The static structure vbox_fb_helper_funcs, of type drm_fb_helper_funcs, > > > > is used only when it is passed as the third argument to > > > > drm_fb_helper_fbdev_setup(), which does not modify it. Hence make it > > > > constant to protect it from unintended modifications. > > > > Issue found with Coccinelle. > > > > > > > > Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> > > > > > > Thank you for the patch, this looks good to me: > > > > > > Reviewed-by: Hans de Goede <hdegoede@redhat.com> > > > > I'm assuming you'll apply this to drm-misc-next too? Good to state that, > > to avoid confusion and coordination issues. > > Actually I'm so used to the workflow in other subsystems I was > expecting the subsys maintainer to pick it up. But I know that > is not how it works for the drm subsys and since I'm the vboxvideo > maintainer I guess it makes sense for me to pick this up and push it. Yeah, drm subsystem maintainers are exceedingly lazy bastards. Same applies to subtree maintainers (at least in most cases). > So yes I will pick this up and push it to drm-misc-next, sorry > for the confusion. Thanks, Daniel > > Regards, > > Hans > > > > > > --- > > > > drivers/gpu/drm/vboxvideo/vbox_drv.c | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/drivers/gpu/drm/vboxvideo/vbox_drv.c b/drivers/gpu/drm/vboxvideo/vbox_drv.c > > > > index 02537ab9cc08..2b57ea3195f2 100644 > > > > --- a/drivers/gpu/drm/vboxvideo/vbox_drv.c > > > > +++ b/drivers/gpu/drm/vboxvideo/vbox_drv.c > > > > @@ -32,7 +32,7 @@ static const struct pci_device_id pciidlist[] = { > > > > }; > > > > MODULE_DEVICE_TABLE(pci, pciidlist); > > > > -static struct drm_fb_helper_funcs vbox_fb_helper_funcs = { > > > > +static const struct drm_fb_helper_funcs vbox_fb_helper_funcs = { > > > > .fb_probe = vboxfb_create, > > > > }; > > > > > > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/vboxvideo: Make structure vbox_fb_helper_funcs constant 2019-08-14 17:51 ` Daniel Vetter @ 2019-08-14 18:42 ` Sam Ravnborg 2019-08-14 19:28 ` Daniel Vetter 0 siblings, 1 reply; 8+ messages in thread From: Sam Ravnborg @ 2019-08-14 18:42 UTC (permalink / raw) To: Daniel Vetter, lwn; +Cc: airlied, Hans de Goede, Nishka Dasgupta, dri-devel On Wed, Aug 14, 2019 at 07:51:37PM +0200, Daniel Vetter wrote: > On Wed, Aug 14, 2019 at 07:36:55PM +0200, Hans de Goede wrote: > > Hi, > > > > On 14-08-19 19:26, Daniel Vetter wrote: > > > On Tue, Aug 13, 2019 at 09:57:19AM +0200, Hans de Goede wrote: > > > > Hi, > > > > > > > > On 13-08-19 08:25, Nishka Dasgupta wrote: > > > > > The static structure vbox_fb_helper_funcs, of type drm_fb_helper_funcs, > > > > > is used only when it is passed as the third argument to > > > > > drm_fb_helper_fbdev_setup(), which does not modify it. Hence make it > > > > > constant to protect it from unintended modifications. > > > > > Issue found with Coccinelle. > > > > > > > > > > Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> > > > > > > > > Thank you for the patch, this looks good to me: > > > > > > > > Reviewed-by: Hans de Goede <hdegoede@redhat.com> > > > > > > I'm assuming you'll apply this to drm-misc-next too? Good to state that, > > > to avoid confusion and coordination issues. > > > > Actually I'm so used to the workflow in other subsystems I was > > expecting the subsys maintainer to pick it up. But I know that > > is not how it works for the drm subsys and since I'm the vboxvideo > > maintainer I guess it makes sense for me to pick this up and push it. > > Yeah, drm subsystem maintainers are exceedingly lazy bastards. Same > applies to subtree maintainers (at least in most cases). Be careful, this could end up in some popular news site. Sam > > > So yes I will pick this up and push it to drm-misc-next, sorry > > for the confusion. > > Thanks, Daniel > > > > > Regards, > > > > Hans > > > > > > > > > --- > > > > > drivers/gpu/drm/vboxvideo/vbox_drv.c | 2 +- > > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > > > diff --git a/drivers/gpu/drm/vboxvideo/vbox_drv.c b/drivers/gpu/drm/vboxvideo/vbox_drv.c > > > > > index 02537ab9cc08..2b57ea3195f2 100644 > > > > > --- a/drivers/gpu/drm/vboxvideo/vbox_drv.c > > > > > +++ b/drivers/gpu/drm/vboxvideo/vbox_drv.c > > > > > @@ -32,7 +32,7 @@ static const struct pci_device_id pciidlist[] = { > > > > > }; > > > > > MODULE_DEVICE_TABLE(pci, pciidlist); > > > > > -static struct drm_fb_helper_funcs vbox_fb_helper_funcs = { > > > > > +static const struct drm_fb_helper_funcs vbox_fb_helper_funcs = { > > > > > .fb_probe = vboxfb_create, > > > > > }; > > > > > > > > > > -- > Daniel Vetter > Software Engineer, Intel Corporation > http://blog.ffwll.ch > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/vboxvideo: Make structure vbox_fb_helper_funcs constant 2019-08-14 18:42 ` Sam Ravnborg @ 2019-08-14 19:28 ` Daniel Vetter 0 siblings, 0 replies; 8+ messages in thread From: Daniel Vetter @ 2019-08-14 19:28 UTC (permalink / raw) To: Sam Ravnborg; +Cc: Nishka Dasgupta, airlied, dri-devel, Hans de Goede, lwn On Wed, Aug 14, 2019 at 08:42:27PM +0200, Sam Ravnborg wrote: > On Wed, Aug 14, 2019 at 07:51:37PM +0200, Daniel Vetter wrote: > > On Wed, Aug 14, 2019 at 07:36:55PM +0200, Hans de Goede wrote: > > > Hi, > > > > > > On 14-08-19 19:26, Daniel Vetter wrote: > > > > On Tue, Aug 13, 2019 at 09:57:19AM +0200, Hans de Goede wrote: > > > > > Hi, > > > > > > > > > > On 13-08-19 08:25, Nishka Dasgupta wrote: > > > > > > The static structure vbox_fb_helper_funcs, of type drm_fb_helper_funcs, > > > > > > is used only when it is passed as the third argument to > > > > > > drm_fb_helper_fbdev_setup(), which does not modify it. Hence make it > > > > > > constant to protect it from unintended modifications. > > > > > > Issue found with Coccinelle. > > > > > > > > > > > > Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> > > > > > > > > > > Thank you for the patch, this looks good to me: > > > > > > > > > > Reviewed-by: Hans de Goede <hdegoede@redhat.com> > > > > > > > > I'm assuming you'll apply this to drm-misc-next too? Good to state that, > > > > to avoid confusion and coordination issues. > > > > > > Actually I'm so used to the workflow in other subsystems I was > > > expecting the subsys maintainer to pick it up. But I know that > > > is not how it works for the drm subsys and since I'm the vboxvideo > > > maintainer I guess it makes sense for me to pick this up and push it. > > > > Yeah, drm subsystem maintainers are exceedingly lazy bastards. Same > > applies to subtree maintainers (at least in most cases). > > Be careful, this could end up in some popular news site. Rule of Cool: Always be quotable :-) Cheers, Daniel > > Sam > > > > > So yes I will pick this up and push it to drm-misc-next, sorry > > > for the confusion. > > > > Thanks, Daniel > > > > > > > > Regards, > > > > > > Hans > > > > > > > > > > > > --- > > > > > > drivers/gpu/drm/vboxvideo/vbox_drv.c | 2 +- > > > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > > > > > diff --git a/drivers/gpu/drm/vboxvideo/vbox_drv.c b/drivers/gpu/drm/vboxvideo/vbox_drv.c > > > > > > index 02537ab9cc08..2b57ea3195f2 100644 > > > > > > --- a/drivers/gpu/drm/vboxvideo/vbox_drv.c > > > > > > +++ b/drivers/gpu/drm/vboxvideo/vbox_drv.c > > > > > > @@ -32,7 +32,7 @@ static const struct pci_device_id pciidlist[] = { > > > > > > }; > > > > > > MODULE_DEVICE_TABLE(pci, pciidlist); > > > > > > -static struct drm_fb_helper_funcs vbox_fb_helper_funcs = { > > > > > > +static const struct drm_fb_helper_funcs vbox_fb_helper_funcs = { > > > > > > .fb_probe = vboxfb_create, > > > > > > }; > > > > > > > > > > > > > > -- > > Daniel Vetter > > Software Engineer, Intel Corporation > > http://blog.ffwll.ch > > _______________________________________________ > > dri-devel mailing list > > dri-devel@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/vboxvideo: Make structure vbox_fb_helper_funcs constant 2019-08-14 17:36 ` Hans de Goede 2019-08-14 17:51 ` Daniel Vetter @ 2019-08-18 10:56 ` Hans de Goede 1 sibling, 0 replies; 8+ messages in thread From: Hans de Goede @ 2019-08-18 10:56 UTC (permalink / raw) To: Daniel Vetter; +Cc: airlied, dri-devel, Nishka Dasgupta Hi all, On 14-08-19 19:36, Hans de Goede wrote: > Hi, > > On 14-08-19 19:26, Daniel Vetter wrote: >> On Tue, Aug 13, 2019 at 09:57:19AM +0200, Hans de Goede wrote: >>> Hi, >>> >>> On 13-08-19 08:25, Nishka Dasgupta wrote: >>>> The static structure vbox_fb_helper_funcs, of type drm_fb_helper_funcs, >>>> is used only when it is passed as the third argument to >>>> drm_fb_helper_fbdev_setup(), which does not modify it. Hence make it >>>> constant to protect it from unintended modifications. >>>> Issue found with Coccinelle. >>>> >>>> Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> >>> >>> Thank you for the patch, this looks good to me: >>> >>> Reviewed-by: Hans de Goede <hdegoede@redhat.com> >> >> I'm assuming you'll apply this to drm-misc-next too? Good to state that, >> to avoid confusion and coordination issues. > > Actually I'm so used to the workflow in other subsystems I was > expecting the subsys maintainer to pick it up. But I know that > is not how it works for the drm subsys and since I'm the vboxvideo > maintainer I guess it makes sense for me to pick this up and push it. > > So yes I will pick this up and push it to drm-misc-next, sorry > for the confusion. I've pushed this to drm-misc-next now. Regards, Hans >>>> --- >>>> drivers/gpu/drm/vboxvideo/vbox_drv.c | 2 +- >>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>> >>>> diff --git a/drivers/gpu/drm/vboxvideo/vbox_drv.c b/drivers/gpu/drm/vboxvideo/vbox_drv.c >>>> index 02537ab9cc08..2b57ea3195f2 100644 >>>> --- a/drivers/gpu/drm/vboxvideo/vbox_drv.c >>>> +++ b/drivers/gpu/drm/vboxvideo/vbox_drv.c >>>> @@ -32,7 +32,7 @@ static const struct pci_device_id pciidlist[] = { >>>> }; >>>> MODULE_DEVICE_TABLE(pci, pciidlist); >>>> -static struct drm_fb_helper_funcs vbox_fb_helper_funcs = { >>>> +static const struct drm_fb_helper_funcs vbox_fb_helper_funcs = { >>>> .fb_probe = vboxfb_create, >>>> }; >>>> >> _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-08-18 10:56 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-08-13 6:25 [PATCH] drm/vboxvideo: Make structure vbox_fb_helper_funcs constant Nishka Dasgupta 2019-08-13 7:57 ` Hans de Goede 2019-08-14 17:26 ` Daniel Vetter 2019-08-14 17:36 ` Hans de Goede 2019-08-14 17:51 ` Daniel Vetter 2019-08-14 18:42 ` Sam Ravnborg 2019-08-14 19:28 ` Daniel Vetter 2019-08-18 10:56 ` Hans de Goede
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.