aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/vdpa
diff options
context:
space:
mode:
authorEli Cohen <elic@nvidia.com>2023-02-05 09:29:06 +0200
committerMichael S. Tsirkin <mst@redhat.com>2023-02-20 19:26:59 -0500
commit446062e6adc48f1e963ce57621b5bfcbf999cda7 (patch)
tree120de1c602bd509c497defc3e990d85c59c1ba00 /drivers/vdpa
parent0d0ed4006127714e318c9a9d7796f5c8532a21e7 (diff)
downloadlinux-446062e6adc48f1e963ce57621b5bfcbf999cda7.tar.gz
vdpa/mlx5: Directly assign memory key
When creating a memory key, the key value should be assigned to the passed pointer and not or'ed to. No functional issue was observed due to this bug. Fixes: 29064bfdabd5 ("vdpa/mlx5: Add support library for mlx5 VDPA implementation") Signed-off-by: Eli Cohen <elic@nvidia.com> Message-Id: <20230205072906.1108194-1-elic@nvidia.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vdpa')
-rw-r--r--drivers/vdpa/mlx5/core/resources.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vdpa/mlx5/core/resources.c b/drivers/vdpa/mlx5/core/resources.c
index 9800f9bec225a..45ad41287a317 100644
--- a/drivers/vdpa/mlx5/core/resources.c
+++ b/drivers/vdpa/mlx5/core/resources.c
@@ -213,7 +213,7 @@ int mlx5_vdpa_create_mkey(struct mlx5_vdpa_dev *mvdev, u32 *mkey, u32 *in,
return err;
mkey_index = MLX5_GET(create_mkey_out, lout, mkey_index);
- *mkey |= mlx5_idx_to_mkey(mkey_index);
+ *mkey = mlx5_idx_to_mkey(mkey_index);
return 0;
}