Content-Type: multipart/mixed; boundary="===============7348015798815865324==" MIME-Version: 1.0 From: Michael S. Tsirkin To: kbuild-all@lists.01.org Subject: Re: [PATCH v1] vdpa: Consider device id larger than 31 Date: Tue, 30 Nov 2021 18:34:51 -0500 Message-ID: <20211130183432-mutt-send-email-mst@kernel.org> In-Reply-To: <20211130042949.88958-1-parav@nvidia.com> List-Id: --===============7348015798815865324== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Tue, Nov 30, 2021 at 06:29:49AM +0200, Parav Pandit 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 in= terface") > Reported-by: kernel test robot > Reported-by: Dan Carpenter > Signed-off-by: Parav Pandit > Acked-by: Jason Wang > --- > changelog: > v0->v1: > - supporting device id up to 63 > --- > drivers/vdpa/vdpa.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > = > diff --git a/drivers/vdpa/vdpa.c b/drivers/vdpa/vdpa.c > index 7332a74a4b00..09bbe53c3ac4 100644 > --- a/drivers/vdpa/vdpa.c > +++ b/drivers/vdpa/vdpa.c > @@ -404,7 +404,8 @@ static int vdpa_mgmtdev_fill(const struct vdpa_mgmt_d= ev *mdev, struct sk_buff *m > goto msg_err; > = > while (mdev->id_table[i].device) { > - supported_classes |=3D BIT(mdev->id_table[i].device); > + if (mdev->id_table[i].device <=3D 63) > + supported_classes |=3D BIT_ULL(mdev->id_table[i].device); > i++; > } Not for this release, but a for loop will be cleaner here. > -- = > 2.26.2 --===============7348015798815865324==--