projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b02420
)
platform/mellanox: mlxreg-io: Fix read access of n-bytes size attributes
author
Vadim Pasternak
<vadimp@nvidia.com>
Mon, 27 Sep 2021 14:22:14 +0000
(17:22 +0300)
committer
Hans de Goede
<hdegoede@redhat.com>
Mon, 11 Oct 2021 12:57:22 +0000
(14:57 +0200)
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>
Link:
https://lore.kernel.org/r/20210927142214.2613929-3-vadimp@nvidia.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/mellanox/mlxreg-io.c
patch
|
blob
|
history
diff --git
a/drivers/platform/mellanox/mlxreg-io.c
b/drivers/platform/mellanox/mlxreg-io.c
index a023ec02126b4ef7c9a1c9436887ab4bd3e20153..a916cd89cbbeddf99272f26012a790d43ce08f7b 100644
(file)
--- 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
);
}
}