linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] apple-gmux: fix gmux_get_client_id()'s return type
@ 2018-04-24 13:15 Luc Van Oostenryck
  2018-04-25 14:17 ` Andy Shevchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Luc Van Oostenryck @ 2018-04-24 13:15 UTC (permalink / raw)
  To: linux-kernel
  Cc: Luc Van Oostenryck, Darren Hart, Andy Shevchenko, platform-driver-x86

The method struct vga_switcheroo_handler::get_client_id() is defined
as returning an 'enum vga_switcheroo_client_id' but the implementation
in this driver, gmux_get_client_id(), returns an 'int'.

Fix this by returning 'enum vga_switcheroo_client_id' in this driver too.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 drivers/platform/x86/apple-gmux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c
index 7c4eb86c8..fd2ffebc8 100644
--- a/drivers/platform/x86/apple-gmux.c
+++ b/drivers/platform/x86/apple-gmux.c
@@ -495,7 +495,7 @@ static int gmux_set_power_state(enum vga_switcheroo_client_id id,
 	return gmux_set_discrete_state(apple_gmux_data, state);
 }
 
-static int gmux_get_client_id(struct pci_dev *pdev)
+static enum vga_switcheroo_client_id gmux_get_client_id(struct pci_dev *pdev)
 {
 	/*
 	 * Early Macbook Pros with switchable graphics use nvidia
-- 
2.17.0

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

* Re: [PATCH] apple-gmux: fix gmux_get_client_id()'s return type
  2018-04-24 13:15 [PATCH] apple-gmux: fix gmux_get_client_id()'s return type Luc Van Oostenryck
@ 2018-04-25 14:17 ` Andy Shevchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2018-04-25 14:17 UTC (permalink / raw)
  To: Luc Van Oostenryck
  Cc: Linux Kernel Mailing List, Darren Hart, Andy Shevchenko, Platform Driver

On Tue, Apr 24, 2018 at 4:15 PM, Luc Van Oostenryck
<luc.vanoostenryck@gmail.com> wrote:
> The method struct vga_switcheroo_handler::get_client_id() is defined
> as returning an 'enum vga_switcheroo_client_id' but the implementation
> in this driver, gmux_get_client_id(), returns an 'int'.
>
> Fix this by returning 'enum vga_switcheroo_client_id' in this driver too.
>

Pushed to my review and testing queue, thanks!

> Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
> ---
>  drivers/platform/x86/apple-gmux.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c
> index 7c4eb86c8..fd2ffebc8 100644
> --- a/drivers/platform/x86/apple-gmux.c
> +++ b/drivers/platform/x86/apple-gmux.c
> @@ -495,7 +495,7 @@ static int gmux_set_power_state(enum vga_switcheroo_client_id id,
>         return gmux_set_discrete_state(apple_gmux_data, state);
>  }
>
> -static int gmux_get_client_id(struct pci_dev *pdev)
> +static enum vga_switcheroo_client_id gmux_get_client_id(struct pci_dev *pdev)
>  {
>         /*
>          * Early Macbook Pros with switchable graphics use nvidia
> --
> 2.17.0
>



-- 
With Best Regards,
Andy Shevchenko

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

end of thread, other threads:[~2018-04-25 14:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-24 13:15 [PATCH] apple-gmux: fix gmux_get_client_id()'s return type Luc Van Oostenryck
2018-04-25 14:17 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).