From: Vadim Pasternak <vadimp@nvidia.com>
To: <hdegoede@redhat.com>
Cc: <platform-driver-x86@vger.kernel.org>,
Vadim Pasternak <vadimp@nvidia.com>
Subject: [PATCH platform 2/2] platform/mellanox: mlxreg-io: Fix read access of n-bytes size attributes
Date: Mon, 27 Sep 2021 17:22:14 +0300 [thread overview]
Message-ID: <20210927142214.2613929-3-vadimp@nvidia.com> (raw)
In-Reply-To: <20210927142214.2613929-1-vadimp@nvidia.com>
Fix shift argument for function rol32(). It should be provided in bits,
while was provided in bytes.
Fixes: 86148190a7db ("platform/mellanox: mlxreg-io: Add support for complex attributes")
Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
---
drivers/platform/mellanox/mlxreg-io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/mellanox/mlxreg-io.c b/drivers/platform/mellanox/mlxreg-io.c
index a023ec02126b..a916cd89cbbe 100644
--- a/drivers/platform/mellanox/mlxreg-io.c
+++ b/drivers/platform/mellanox/mlxreg-io.c
@@ -98,7 +98,7 @@ mlxreg_io_get_reg(void *regmap, struct mlxreg_core_data *data, u32 in_val,
if (ret)
goto access_error;
- *regval |= rol32(val, regsize * i);
+ *regval |= rol32(val, regsize * i * 8);
}
}
--
2.20.1
next prev parent reply other threads:[~2021-09-27 14:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-27 14:22 [PATCH platform 0/2] platform/mellanox: Fixes for register space access Vadim Pasternak
2021-09-27 14:22 ` [PATCH platform 1/2] platform/mellanox: mlxreg-io: Fix argument base in kstrtou32() call Vadim Pasternak
2021-09-27 14:22 ` Vadim Pasternak [this message]
2021-10-11 12:56 ` [PATCH platform 0/2] platform/mellanox: Fixes for register space access Hans de Goede
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=20210927142214.2613929-3-vadimp@nvidia.com \
--to=vadimp@nvidia.com \
--cc=hdegoede@redhat.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 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.