kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
	Corentin Chary <corentin.chary@gmail.com>,
	"Luke D. Jones" <luke@ljones.dev>
Cc: Mark Gross <mgross@linux.intel.com>,
	acpi4asus-user@lists.sourceforge.net,
	platform-driver-x86@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] asus-wmi: delete impossible condition
Date: Thu, 26 Aug 2021 15:13:46 +0200	[thread overview]
Message-ID: <44c6b841-fc90-864b-2f39-484d0158500f@redhat.com> (raw)
In-Reply-To: <20210824113654.GA31143@kili>

Hi,

On 8/24/21 1:36 PM, Dan Carpenter wrote:
> The "asus->throttle_thermal_policy_mode" variable is a u8 so it can't
> be negative.  And we always verify that the value is valid before
> setting the policy mode so there is no need to check again here.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Thank you for your patch, I've applied this patch to my review-hans 
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.

Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.

Regards,

Hans


> ---
>  drivers/platform/x86/asus-wmi.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
> index cc5811844012..679429d41264 100644
> --- a/drivers/platform/x86/asus-wmi.c
> +++ b/drivers/platform/x86/asus-wmi.c
> @@ -2179,9 +2179,6 @@ static int platform_profile_get(struct platform_profile_handler *pprof,
>  
>  	tp = asus->throttle_thermal_policy_mode;
>  
> -	if (tp < 0)
> -		return tp;
> -
>  	switch (tp) {
>  	case ASUS_THROTTLE_THERMAL_POLICY_DEFAULT:
>  		*profile = PLATFORM_PROFILE_BALANCED;
> 


      reply	other threads:[~2021-08-26 13:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-24 11:36 [PATCH] asus-wmi: delete impossible condition Dan Carpenter
2021-08-26 13:13 ` Hans de Goede [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44c6b841-fc90-864b-2f39-484d0158500f@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=acpi4asus-user@lists.sourceforge.net \
    --cc=corentin.chary@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=luke@ljones.dev \
    --cc=mgross@linux.intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).