Re: [PATCH v2] platform/mellanox: mlxreg-lc: Fix logic error in power state check

From: Ilpo Järvinen
Date: Mon Jun 30 2025 - 07:08:05 EST


On Mon, 30 Jun 2025 03:58:08 -0700, Alok Tiwari wrote:

> Fixes a logic issue in mlxreg_lc_completion_notify() where the
> intention was to check if MLXREG_LC_POWERED flag is not set before
> powering on the device.
>
> The original code used "state & ~MLXREG_LC_POWERED" to check for the
> absence of the POWERED bit. However this condition evaluates to true
> even when other bits are set, leading to potentially incorrect
> behavior.
>
> [...]


Thank you for your contribution, it has been applied to my local
review-ilpo-fixes branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-fixes branch only once I've pushed my
local branch there, which might take a while.

The list of commits applied:
[1/1] platform/mellanox: mlxreg-lc: Fix logic error in power state check
commit: 644bec18e705ca41d444053407419a21832fcb2f

--
i.