2018-04-24 13:56:58

by Luc Van Oostenryck

[permalink] [raw]
Subject: [PATCH] vboxvideo: fix mode_valid's return type

The method struct drm_connector_helper_funcs::mode_valid is defined
as returning an 'enum drm_mode_status' but the driver implementation
for this method uses an 'int' for it.

Fix this by using 'enum drm_mode_status' in the driver too.

Signed-off-by: Luc Van Oostenryck <[email protected]>
---
drivers/staging/vboxvideo/vbox_mode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/vboxvideo/vbox_mode.c b/drivers/staging/vboxvideo/vbox_mode.c
index b265fe924..5c7ea2378 100644
--- a/drivers/staging/vboxvideo/vbox_mode.c
+++ b/drivers/staging/vboxvideo/vbox_mode.c
@@ -573,7 +573,7 @@ static int vbox_get_modes(struct drm_connector *connector)
return num_modes;
}

-static int vbox_mode_valid(struct drm_connector *connector,
+static enum drm_mode_status vbox_mode_valid(struct drm_connector *connector,
struct drm_display_mode *mode)
{
return MODE_OK;
--
2.17.0



2018-04-24 15:20:22

by Hans de Goede

[permalink] [raw]
Subject: Re: [PATCH] vboxvideo: fix mode_valid's return type

Hi,

On 24-04-18 15:15, Luc Van Oostenryck wrote:
> The method struct drm_connector_helper_funcs::mode_valid is defined
> as returning an 'enum drm_mode_status' but the driver implementation
> for this method uses an 'int' for it.
>
> Fix this by using 'enum drm_mode_status' in the driver too.
>
> Signed-off-by: Luc Van Oostenryck <[email protected]>

Thank you for the patch, looks good to me:

Reviewed-by: Hans de Goede <[email protected]>

Regards,

Hans


> ---
> drivers/staging/vboxvideo/vbox_mode.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/vboxvideo/vbox_mode.c b/drivers/staging/vboxvideo/vbox_mode.c
> index b265fe924..5c7ea2378 100644
> --- a/drivers/staging/vboxvideo/vbox_mode.c
> +++ b/drivers/staging/vboxvideo/vbox_mode.c
> @@ -573,7 +573,7 @@ static int vbox_get_modes(struct drm_connector *connector)
> return num_modes;
> }
>
> -static int vbox_mode_valid(struct drm_connector *connector,
> +static enum drm_mode_status vbox_mode_valid(struct drm_connector *connector,
> struct drm_display_mode *mode)
> {
> return MODE_OK;
>