lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJZ5v0h29B-r7TqAD5wqDX6d-uMpUrFainirYWwPhiuDy9HRwQ@mail.gmail.com>
Date:   Fri, 2 Dec 2022 20:48:47 +0100
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>
Cc:     "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Amit Kucheria <amitk@...nel.org>,
        Zhang Rui <rui.zhang@...el.com>,
        Len Brown <len.brown@...el.com>,
        Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
        Aubrey Li <aubrey.li@...ux.intel.com>,
        Haowen Bai <baihaowen@...zu.com>, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] thermal: intel: hfi: Remove a pointless die_id check

On Mon, Nov 28, 2022 at 5:12 PM Ricardo Neri
<ricardo.neri-calderon@...ux.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@...aro.org>
> Cc: Amit Kucheria <amitk@...nel.org>
> Cc: Zhang Rui <rui.zhang@...el.com>
> Cc: Len Brown <len.brown@...el.com>
> Cc: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
> Cc: Aubrey Li <aubrey.li@...ux.intel.com>
> Cc: Haowen Bai <baihaowen@...zu.com>
> Cc: linux-pm@...r.kernel.org
> Cc: linux-kernel@...r.kernel.org
> Signed-off-by: Ricardo Neri <ricardo.neri-calderon@...ux.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!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ