* [PATCH] platform/x86: hp-wmi: Fix implementation of the platform_profile_omen_get function
@ 2024-07-12 17:26 Alexis Belmonte
2024-07-14 4:46 ` Armin Wolf
2024-07-15 9:39 ` Ilpo Järvinen
0 siblings, 2 replies; 4+ messages in thread
From: Alexis Belmonte @ 2024-07-12 17:26 UTC (permalink / raw)
To: ilpo.jarvinen, hdegoede, W_Armin; +Cc: platform-driver-x86
Fix ill-formed implementation of the platform_profile_omen_get function
introduced by patch "platform/x86: hp-wmi: Fix platform profile option
switch"
Signed-off-by: Alexis Belmonte <alexbelm48@gmail.com>
---
drivers/platform/x86/hp/hp-wmi.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
index c8bcb3e2b344..876e0a97cee1 100644
--- a/drivers/platform/x86/hp/hp-wmi.c
+++ b/drivers/platform/x86/hp/hp-wmi.c
@@ -1238,8 +1238,6 @@ static int platform_profile_omen_get_ec(enum platform_profile_option *profile)
static int platform_profile_omen_get(struct platform_profile_handler *pprof,
enum platform_profile_option *profile)
{
- enum platform_profile_option selected_platform_profile;
-
/*
* We directly return the stored platform profile, as the embedded
* controller will not accept switching to the performance option when
@@ -1253,9 +1251,9 @@ static int platform_profile_omen_get(struct platform_profile_handler *pprof,
* See also omen_powersource_event.
*/
guard(mutex)(&active_platform_profile_lock);
- selected_platform_profile = active_platform_profile;
+ *profile = active_platform_profile;
- return selected_platform_profile;
+ return 0;
}
static bool has_omen_thermal_profile_ec_timer(void)
--
2.45.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] platform/x86: hp-wmi: Fix implementation of the platform_profile_omen_get function
2024-07-12 17:26 [PATCH] platform/x86: hp-wmi: Fix implementation of the platform_profile_omen_get function Alexis Belmonte
@ 2024-07-14 4:46 ` Armin Wolf
2024-07-15 9:39 ` Ilpo Järvinen
1 sibling, 0 replies; 4+ messages in thread
From: Armin Wolf @ 2024-07-14 4:46 UTC (permalink / raw)
To: Alexis Belmonte, ilpo.jarvinen, hdegoede; +Cc: platform-driver-x86
Am 12.07.24 um 19:26 schrieb Alexis Belmonte:
> Fix ill-formed implementation of the platform_profile_omen_get function
> introduced by patch "platform/x86: hp-wmi: Fix platform profile option
> switch"
>
> Signed-off-by: Alexis Belmonte <alexbelm48@gmail.com>
> ---
> drivers/platform/x86/hp/hp-wmi.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
> index c8bcb3e2b344..876e0a97cee1 100644
> --- a/drivers/platform/x86/hp/hp-wmi.c
> +++ b/drivers/platform/x86/hp/hp-wmi.c
> @@ -1238,8 +1238,6 @@ static int platform_profile_omen_get_ec(enum platform_profile_option *profile)
> static int platform_profile_omen_get(struct platform_profile_handler *pprof,
> enum platform_profile_option *profile)
> {
> - enum platform_profile_option selected_platform_profile;
> -
> /*
> * We directly return the stored platform profile, as the embedded
> * controller will not accept switching to the performance option when
> @@ -1253,9 +1251,9 @@ static int platform_profile_omen_get(struct platform_profile_handler *pprof,
> * See also omen_powersource_event.
> */
> guard(mutex)(&active_platform_profile_lock);
> - selected_platform_profile = active_platform_profile;
> + *profile = active_platform_profile;
>
> - return selected_platform_profile;
> + return 0;
> }
>
> static bool has_omen_thermal_profile_ec_timer(void)
Looks good to me.
Reviewed-by: Armin Wolf <W_Armin@gmx.de>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] platform/x86: hp-wmi: Fix implementation of the platform_profile_omen_get function
2024-07-12 17:26 [PATCH] platform/x86: hp-wmi: Fix implementation of the platform_profile_omen_get function Alexis Belmonte
2024-07-14 4:46 ` Armin Wolf
@ 2024-07-15 9:39 ` Ilpo Järvinen
2024-07-15 14:14 ` Alexis Belmonte
1 sibling, 1 reply; 4+ messages in thread
From: Ilpo Järvinen @ 2024-07-15 9:39 UTC (permalink / raw)
To: Alexis Belmonte; +Cc: Hans de Goede, W_Armin, platform-driver-x86
On Fri, 12 Jul 2024, Alexis Belmonte wrote:
> Fix ill-formed implementation of the platform_profile_omen_get function
> introduced by patch "platform/x86: hp-wmi: Fix platform profile option
> switch"
>
> Signed-off-by: Alexis Belmonte <alexbelm48@gmail.com>
I took this patch but there were a number of issues with it I had to fix:
- Reported-by tag missing
- Fixes tag missing
- You didn't tell in the commit message what was wrong.
--
i.
> ---
> drivers/platform/x86/hp/hp-wmi.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
> index c8bcb3e2b344..876e0a97cee1 100644
> --- a/drivers/platform/x86/hp/hp-wmi.c
> +++ b/drivers/platform/x86/hp/hp-wmi.c
> @@ -1238,8 +1238,6 @@ static int platform_profile_omen_get_ec(enum platform_profile_option *profile)
> static int platform_profile_omen_get(struct platform_profile_handler *pprof,
> enum platform_profile_option *profile)
> {
> - enum platform_profile_option selected_platform_profile;
> -
> /*
> * We directly return the stored platform profile, as the embedded
> * controller will not accept switching to the performance option when
> @@ -1253,9 +1251,9 @@ static int platform_profile_omen_get(struct platform_profile_handler *pprof,
> * See also omen_powersource_event.
> */
> guard(mutex)(&active_platform_profile_lock);
> - selected_platform_profile = active_platform_profile;
> + *profile = active_platform_profile;
>
> - return selected_platform_profile;
> + return 0;
> }
>
> static bool has_omen_thermal_profile_ec_timer(void)
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] platform/x86: hp-wmi: Fix implementation of the platform_profile_omen_get function
2024-07-15 9:39 ` Ilpo Järvinen
@ 2024-07-15 14:14 ` Alexis Belmonte
0 siblings, 0 replies; 4+ messages in thread
From: Alexis Belmonte @ 2024-07-15 14:14 UTC (permalink / raw)
To: ilpo.jarvinen; +Cc: W_Armin, hdegoede, platform-driver-x86
Hi Ilpo,
On Mon, Jul 15, 2024 at 12:39:22PM +0300, Ilpo Järvinen wrote:
>
> I took this patch but there were a number of issues with it I had to fix:
>
Thanks a lot for your attention to detail. As you can probably tell,
it's my first time doing this kind of bug-fixing submission, so I apologize for
that. I'll try to be more careful in the future. :]
Don't hesitate to let me do the fixes myself next time -- you certainly have
better things to do than fixing this kind of stuff, and this will help me
remember how things are supposed to be done. :]
Still, I'm very thankful for your help.
Hope you have a great afternoon!
Alexis
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-07-15 14:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-12 17:26 [PATCH] platform/x86: hp-wmi: Fix implementation of the platform_profile_omen_get function Alexis Belmonte
2024-07-14 4:46 ` Armin Wolf
2024-07-15 9:39 ` Ilpo Järvinen
2024-07-15 14:14 ` Alexis Belmonte
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox