public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: vboxvideo: constify drm_fb_helper_funcs
@ 2017-08-21 10:06 Arvind Yadav
  2017-08-21 11:36 ` Hans de Goede
  2017-08-23  1:33 ` Greg KH
  0 siblings, 2 replies; 5+ messages in thread
From: Arvind Yadav @ 2017-08-21 10:06 UTC (permalink / raw)
  To: gregkh, michael.thayer, daniel, hdegoede; +Cc: linux-kernel, devel

drm_fb_helper_funcs are not supposed to change at runtime.
All functions working with drm_fb_helper_funcs provided by
<drm/drm_fb_helper.h> work with const drm_fb_helper_funcs.
So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/staging/vboxvideo/vbox_fb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/vboxvideo/vbox_fb.c b/drivers/staging/vboxvideo/vbox_fb.c
index 35f6d9f..70d99b7 100644
--- a/drivers/staging/vboxvideo/vbox_fb.c
+++ b/drivers/staging/vboxvideo/vbox_fb.c
@@ -330,7 +330,7 @@ static void vbox_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green,
 	*blue = regno;
 }
 
-static struct drm_fb_helper_funcs vbox_fb_helper_funcs = {
+static const struct drm_fb_helper_funcs vbox_fb_helper_funcs = {
 	.gamma_set = vbox_fb_gamma_set,
 	.gamma_get = vbox_fb_gamma_get,
 	.fb_probe = vboxfb_create,
-- 
1.9.1

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

* Re: [PATCH] staging: vboxvideo: constify drm_fb_helper_funcs
  2017-08-21 10:06 [PATCH] staging: vboxvideo: constify drm_fb_helper_funcs Arvind Yadav
@ 2017-08-21 11:36 ` Hans de Goede
  2017-08-23  1:33 ` Greg KH
  1 sibling, 0 replies; 5+ messages in thread
From: Hans de Goede @ 2017-08-21 11:36 UTC (permalink / raw)
  To: Arvind Yadav, gregkh, michael.thayer, daniel; +Cc: linux-kernel, devel

Hi,

On 21-08-17 12:06, Arvind Yadav wrote:
> drm_fb_helper_funcs are not supposed to change at runtime.
> All functions working with drm_fb_helper_funcs provided by
> <drm/drm_fb_helper.h> work with const drm_fb_helper_funcs.
> So mark the non-const structs as const.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans


> ---
>   drivers/staging/vboxvideo/vbox_fb.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/vboxvideo/vbox_fb.c b/drivers/staging/vboxvideo/vbox_fb.c
> index 35f6d9f..70d99b7 100644
> --- a/drivers/staging/vboxvideo/vbox_fb.c
> +++ b/drivers/staging/vboxvideo/vbox_fb.c
> @@ -330,7 +330,7 @@ static void vbox_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green,
>   	*blue = regno;
>   }
>   
> -static struct drm_fb_helper_funcs vbox_fb_helper_funcs = {
> +static const struct drm_fb_helper_funcs vbox_fb_helper_funcs = {
>   	.gamma_set = vbox_fb_gamma_set,
>   	.gamma_get = vbox_fb_gamma_get,
>   	.fb_probe = vboxfb_create,
> 

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

* Re: [PATCH] staging: vboxvideo: constify drm_fb_helper_funcs
  2017-08-21 10:06 [PATCH] staging: vboxvideo: constify drm_fb_helper_funcs Arvind Yadav
  2017-08-21 11:36 ` Hans de Goede
@ 2017-08-23  1:33 ` Greg KH
  1 sibling, 0 replies; 5+ messages in thread
From: Greg KH @ 2017-08-23  1:33 UTC (permalink / raw)
  To: Arvind Yadav; +Cc: michael.thayer, daniel, hdegoede, linux-kernel, devel

On Mon, Aug 21, 2017 at 03:36:34PM +0530, Arvind Yadav wrote:
> drm_fb_helper_funcs are not supposed to change at runtime.
> All functions working with drm_fb_helper_funcs provided by
> <drm/drm_fb_helper.h> work with const drm_fb_helper_funcs.
> So mark the non-const structs as const.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  drivers/staging/vboxvideo/vbox_fb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Does not apply to my tree :(

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

* [PATCH] staging: vboxvideo: constify drm_fb_helper_funcs
@ 2017-08-31  9:46 Arvind Yadav
  2017-08-31  9:50 ` Arvind Yadav
  0 siblings, 1 reply; 5+ messages in thread
From: Arvind Yadav @ 2017-08-31  9:46 UTC (permalink / raw)
  To: hubcap; +Cc: linux-kernel

drm_fb_helper_funcs are not supposed to change at runtime.
All functions working with drm_fb_helper_funcs provided by
<drm/drm_fb_helper.h> work with const drm_fb_helper_funcs.
So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/staging/vboxvideo/vbox_fb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/vboxvideo/vbox_fb.c b/drivers/staging/vboxvideo/vbox_fb.c
index 35f6d9f..70d99b7 100644
--- a/drivers/staging/vboxvideo/vbox_fb.c
+++ b/drivers/staging/vboxvideo/vbox_fb.c
@@ -330,7 +330,7 @@ static void vbox_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green,
 	*blue = regno;
 }
 
-static struct drm_fb_helper_funcs vbox_fb_helper_funcs = {
+static const struct drm_fb_helper_funcs vbox_fb_helper_funcs = {
 	.gamma_set = vbox_fb_gamma_set,
 	.gamma_get = vbox_fb_gamma_get,
 	.fb_probe = vboxfb_create,
-- 
1.9.1

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

* Re: [PATCH] staging: vboxvideo: constify drm_fb_helper_funcs
  2017-08-31  9:46 Arvind Yadav
@ 2017-08-31  9:50 ` Arvind Yadav
  0 siblings, 0 replies; 5+ messages in thread
From: Arvind Yadav @ 2017-08-31  9:50 UTC (permalink / raw)
  To: hubcap; +Cc: linux-kernel

Sorry for noise, Please Ignore this. :(


On Thursday 31 August 2017 03:16 PM, Arvind Yadav wrote:
> drm_fb_helper_funcs are not supposed to change at runtime.
> All functions working with drm_fb_helper_funcs provided by
> <drm/drm_fb_helper.h> work with const drm_fb_helper_funcs.
> So mark the non-const structs as const.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
> ---
>   drivers/staging/vboxvideo/vbox_fb.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/vboxvideo/vbox_fb.c b/drivers/staging/vboxvideo/vbox_fb.c
> index 35f6d9f..70d99b7 100644
> --- a/drivers/staging/vboxvideo/vbox_fb.c
> +++ b/drivers/staging/vboxvideo/vbox_fb.c
> @@ -330,7 +330,7 @@ static void vbox_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green,
>   	*blue = regno;
>   }
>   
> -static struct drm_fb_helper_funcs vbox_fb_helper_funcs = {
> +static const struct drm_fb_helper_funcs vbox_fb_helper_funcs = {
>   	.gamma_set = vbox_fb_gamma_set,
>   	.gamma_get = vbox_fb_gamma_get,
>   	.fb_probe = vboxfb_create,

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

end of thread, other threads:[~2017-08-31  9:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-21 10:06 [PATCH] staging: vboxvideo: constify drm_fb_helper_funcs Arvind Yadav
2017-08-21 11:36 ` Hans de Goede
2017-08-23  1:33 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2017-08-31  9:46 Arvind Yadav
2017-08-31  9:50 ` Arvind Yadav

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox