Re: [PATCH RFC v3 1/8] virtio: introduce extended features
From: Paolo Abeni <pabeni@redhat.com>
Date: 2025-06-12 08:51:07
From: Paolo Abeni <pabeni@redhat.com>
Date: 2025-06-12 08:51:07
On 6/8/25 7:49 AM, Akihiko Odaki wrote:
On 2025/06/06 20:45, Paolo Abeni wrote:quoted
int (*set_vq_affinity)(struct virtqueue *vq,@@ -149,11 +154,11 @@ static inline bool __virtio_test_bit(const struct virtio_device *vdev, { /* Did you forget to fix assumptions on max features? */ if (__builtin_constant_p(fbit)) - BUILD_BUG_ON(fbit >= 64); + BUILD_BUG_ON(fbit >= VIRTIO_FEATURES_MAX); else - BUG_ON(fbit >= 64); + BUG_ON(fbit >= VIRTIO_FEATURES_MAX);This check is better to be moved into virtio_features_test_bit().
I leaved the check here mostly unmodified to try to keep the diffstat as low as possible. I see there is consensus to clean this up, I'll do in the next revision. [BTW, I'm sorry for the latency: I'm traveling for the whole week, my replies will be sparse] /P