All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Dan Carpenter <dan.carpenter@oracle.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Lukasz Luba <lukasz.luba@arm.com>,
	linux-pm@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 1/3] powercap/drivers/dtpm: Fix a double shift bug
Date: Thu, 07 Jan 2021 16:59:37 +0000	[thread overview]
Message-ID: <3723a63e-5c3f-9c15-2e2c-788e7e6ec0bf@linaro.org> (raw)
In-Reply-To: <X/V2k8dwaXJH6VFh@mwanda>

On 06/01/2021 09:36, Dan Carpenter wrote:
> The DTPM_POWER_LIMIT_FLAG is used for test_bit() etc which take a bit
> number so it should be bit 0.  But currently it's set to BIT(0) then
> that is double shifted equivalent to BIT(BIT(0)).  This doesn't cause a
> run time problem because it's done consistently.
> 
> Fixes: a20d0ef97abf ("powercap/drivers/dtpm: Add API for dynamic thermal power management")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>

> ---
>  drivers/powercap/dtpm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/powercap/dtpm.c b/drivers/powercap/dtpm.c
> index 0abcc439d728..d49df0569cd4 100644
> --- a/drivers/powercap/dtpm.c
> +++ b/drivers/powercap/dtpm.c
> @@ -24,7 +24,7 @@
>  #include <linux/slab.h>
>  #include <linux/mutex.h>
>  
> -#define DTPM_POWER_LIMIT_FLAG BIT(0)
> +#define DTPM_POWER_LIMIT_FLAG 0
>  
>  static const char *constraint_name[] = {
>  	"Instantaneous",
> 


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Dan Carpenter <dan.carpenter@oracle.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Lukasz Luba <lukasz.luba@arm.com>,
	linux-pm@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 1/3] powercap/drivers/dtpm: Fix a double shift bug
Date: Thu, 7 Jan 2021 17:59:37 +0100	[thread overview]
Message-ID: <3723a63e-5c3f-9c15-2e2c-788e7e6ec0bf@linaro.org> (raw)
In-Reply-To: <X/V2k8dwaXJH6VFh@mwanda>

On 06/01/2021 09:36, Dan Carpenter wrote:
> The DTPM_POWER_LIMIT_FLAG is used for test_bit() etc which take a bit
> number so it should be bit 0.  But currently it's set to BIT(0) then
> that is double shifted equivalent to BIT(BIT(0)).  This doesn't cause a
> run time problem because it's done consistently.
> 
> Fixes: a20d0ef97abf ("powercap/drivers/dtpm: Add API for dynamic thermal power management")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>

> ---
>  drivers/powercap/dtpm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/powercap/dtpm.c b/drivers/powercap/dtpm.c
> index 0abcc439d728..d49df0569cd4 100644
> --- a/drivers/powercap/dtpm.c
> +++ b/drivers/powercap/dtpm.c
> @@ -24,7 +24,7 @@
>  #include <linux/slab.h>
>  #include <linux/mutex.h>
>  
> -#define DTPM_POWER_LIMIT_FLAG BIT(0)
> +#define DTPM_POWER_LIMIT_FLAG 0
>  
>  static const char *constraint_name[] = {
>  	"Instantaneous",
> 


-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

  parent reply	other threads:[~2021-01-07 16:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-06  8:36 [PATCH 1/3] powercap/drivers/dtpm: Fix a double shift bug Dan Carpenter
2021-01-06  8:36 ` Dan Carpenter
2021-01-06  9:03 ` [PATCH 3/3] powercap/drivers/dtpm: Fix an IS_ERR() vs NULL check Dan Carpenter
2021-01-06  9:03   ` Dan Carpenter
2021-01-07 17:03   ` Daniel Lezcano
2021-01-07 17:03     ` Daniel Lezcano
2021-01-07 17:19     ` Rafael J. Wysocki
2021-01-07 17:19       ` Rafael J. Wysocki
2021-01-07 16:59 ` Daniel Lezcano [this message]
2021-01-07 16:59   ` [PATCH 1/3] powercap/drivers/dtpm: Fix a double shift bug Daniel Lezcano
  -- strict thread matches above, loose matches on Subject: below --
2021-01-06  8:41 [PATCH 2/3] powercap/drivers/dtpm: Fix some missing unlock bugs Dan Carpenter
2021-01-06  8:41 ` Dan Carpenter
2021-01-07 17:01 ` Daniel Lezcano
2021-01-07 17:01   ` Daniel Lezcano

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=3723a63e-5c3f-9c15-2e2c-788e7e6ec0bf@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=rjw@rjwysocki.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.