linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Amit Kucheria <amitk@kernel.org>, Zhang Rui <rui.zhang@intel.com>,
	Len Brown <len.brown@intel.com>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	Aubrey Li <aubrey.li@linux.intel.com>,
	Haowen Bai <baihaowen@meizu.com>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] thermal: intel: hfi: Remove a pointless die_id check
Date: Fri, 2 Dec 2022 20:48:47 +0100	[thread overview]
Message-ID: <CAJZ5v0h29B-r7TqAD5wqDX6d-uMpUrFainirYWwPhiuDy9HRwQ@mail.gmail.com> (raw)
In-Reply-To: <20221128162001.31227-1-ricardo.neri-calderon@linux.intel.com>

On Mon, Nov 28, 2022 at 5:12 PM Ricardo Neri
<ricardo.neri-calderon@linux.intel.com> wrote:
>
> die_id is an u16 quantity. On single-die systems the default value of
> die_id is 0. No need to check for negative values.
>
> Plus, removing this check makes Coverity happy.
>
> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> Cc: Amit Kucheria <amitk@kernel.org>
> Cc: Zhang Rui <rui.zhang@intel.com>
> Cc: Len Brown <len.brown@intel.com>
> Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> Cc: Aubrey Li <aubrey.li@linux.intel.com>
> Cc: Haowen Bai <baihaowen@meizu.com>
> Cc: linux-pm@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
> ---
>  drivers/thermal/intel/intel_hfi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/intel/intel_hfi.c b/drivers/thermal/intel/intel_hfi.c
> index 239afe02e518..d35287eb2f78 100644
> --- a/drivers/thermal/intel/intel_hfi.c
> +++ b/drivers/thermal/intel/intel_hfi.c
> @@ -371,7 +371,7 @@ void intel_hfi_online(unsigned int cpu)
>         die_id = topology_logical_die_id(cpu);
>         hfi_instance = info->hfi_instance;
>         if (!hfi_instance) {
> -               if (die_id < 0 || die_id >= max_hfi_instances)
> +               if (die_id >= max_hfi_instances)
>                         return;
>
>                 hfi_instance = &hfi_instances[die_id];
> --

Applied as 6.2 material, thanks!

      reply	other threads:[~2022-12-02 19:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-28 16:20 [PATCH] thermal: intel: hfi: Remove a pointless die_id check Ricardo Neri
2022-12-02 19:48 ` Rafael J. Wysocki [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=CAJZ5v0h29B-r7TqAD5wqDX6d-uMpUrFainirYWwPhiuDy9HRwQ@mail.gmail.com \
    --to=rafael@kernel.org \
    --cc=amitk@kernel.org \
    --cc=aubrey.li@linux.intel.com \
    --cc=baihaowen@meizu.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=ricardo.neri-calderon@linux.intel.com \
    --cc=rui.zhang@intel.com \
    --cc=srinivas.pandruvada@linux.intel.com \
    /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).