Re: [PATCH] vdpa: Consider device id larger than 31

From: Jason Wang
Date: Thu Nov 25 2021 - 21:52:01 EST


On Fri, Nov 26, 2021 at 2:09 AM Parav Pandit <parav@xxxxxxxxxx> wrote:
>
> virtio device id value can be more than 31. Hence, use BIT_ULL in
> assignment.
>
> Fixes: 33b347503f01 ("vdpa: Define vdpa mgmt device, ops and a netlink interface")
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Signed-off-by: Parav Pandit <parav@xxxxxxxxxx>

Acked-by: Jason Wang <jasowang@xxxxxxxxxx>

> ---
> drivers/vdpa/vdpa.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/vdpa/vdpa.c b/drivers/vdpa/vdpa.c
> index 7332a74a4b00..e91c71aeeddf 100644
> --- a/drivers/vdpa/vdpa.c
> +++ b/drivers/vdpa/vdpa.c
> @@ -404,7 +404,7 @@ static int vdpa_mgmtdev_fill(const struct vdpa_mgmt_dev *mdev, struct sk_buff *m
> goto msg_err;
>
> while (mdev->id_table[i].device) {
> - supported_classes |= BIT(mdev->id_table[i].device);
> + supported_classes |= BIT_ULL(mdev->id_table[i].device);
> i++;
> }
>
> --
> 2.26.2
>