virtio: bugfix

enum renames for vdpa uapi - we better do this now before
 the names have been in any releases.
 
 Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 
 iQFDBAABCAAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAmYq0j0PHG1zdEByZWRo
 YXQuY29tAAoJECgfDbjSjVRpkIIIAIvMXuyXRfbKJLO6R5sig8C4wAkRno8T1EWp
 BLzG6TNzduUODso00YucBCnZUteYNqo+IIlbPl/q/NmeUkUFEbiy8xwGqf13SEDU
 xRSL6CZDI9v75BZwWvtCijnRIRjXykNe5bpCkOVRy37JyAYhGaLadAyWGOXNYmV7
 1GwNXJa1KtQaBOZb0x/WecYvsHWEgJtygcrDJwAqR5ngEHRyYpqvK9t0jLxuYIKE
 27oY6OWqVNE007zIUx6lI17Ope0OvhBDmlz11zrkQfBsX4mBZok12TVo34wd+Cxn
 rNsb5HrSkQi5rNgW6mz3wR7MLLQK5Msh54KVPRHZQU9OVkio02o=
 =DWUe
 -----END PGP SIGNATURE-----

Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost

Pull virtio fix from Michael Tsirkin:
 "enum renames for vdpa uapi - we better do this now before the names
  have been exposed in any releases"

* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
  vDPA: code clean for vhost_vdpa uapi
This commit is contained in:
Linus Torvalds 2024-04-25 15:38:45 -07:00
commit c942a0cd36
2 changed files with 6 additions and 6 deletions

View File

@ -967,7 +967,7 @@ vdpa_dev_blk_seg_size_config_fill(struct sk_buff *msg, u64 features,
val_u32 = __virtio32_to_cpu(true, config->size_max);
return nla_put_u32(msg, VDPA_ATTR_DEV_BLK_CFG_SEG_SIZE, val_u32);
return nla_put_u32(msg, VDPA_ATTR_DEV_BLK_CFG_SIZE_MAX, val_u32);
}
/* fill the block size*/
@ -1089,7 +1089,7 @@ static int vdpa_dev_blk_ro_config_fill(struct sk_buff *msg, u64 features)
u8 ro;
ro = ((features & BIT_ULL(VIRTIO_BLK_F_RO)) == 0) ? 0 : 1;
if (nla_put_u8(msg, VDPA_ATTR_DEV_BLK_CFG_READ_ONLY, ro))
if (nla_put_u8(msg, VDPA_ATTR_DEV_BLK_READ_ONLY, ro))
return -EMSGSIZE;
return 0;
@ -1100,7 +1100,7 @@ static int vdpa_dev_blk_flush_config_fill(struct sk_buff *msg, u64 features)
u8 flush;
flush = ((features & BIT_ULL(VIRTIO_BLK_F_FLUSH)) == 0) ? 0 : 1;
if (nla_put_u8(msg, VDPA_ATTR_DEV_BLK_CFG_FLUSH, flush))
if (nla_put_u8(msg, VDPA_ATTR_DEV_BLK_FLUSH, flush))
return -EMSGSIZE;
return 0;

View File

@ -57,7 +57,7 @@ enum vdpa_attr {
VDPA_ATTR_DEV_FEATURES, /* u64 */
VDPA_ATTR_DEV_BLK_CFG_CAPACITY, /* u64 */
VDPA_ATTR_DEV_BLK_CFG_SEG_SIZE, /* u32 */
VDPA_ATTR_DEV_BLK_CFG_SIZE_MAX, /* u32 */
VDPA_ATTR_DEV_BLK_CFG_BLK_SIZE, /* u32 */
VDPA_ATTR_DEV_BLK_CFG_SEG_MAX, /* u32 */
VDPA_ATTR_DEV_BLK_CFG_NUM_QUEUES, /* u16 */
@ -70,8 +70,8 @@ enum vdpa_attr {
VDPA_ATTR_DEV_BLK_CFG_DISCARD_SEC_ALIGN,/* u32 */
VDPA_ATTR_DEV_BLK_CFG_MAX_WRITE_ZEROES_SEC, /* u32 */
VDPA_ATTR_DEV_BLK_CFG_MAX_WRITE_ZEROES_SEG, /* u32 */
VDPA_ATTR_DEV_BLK_CFG_READ_ONLY, /* u8 */
VDPA_ATTR_DEV_BLK_CFG_FLUSH, /* u8 */
VDPA_ATTR_DEV_BLK_READ_ONLY, /* u8 */
VDPA_ATTR_DEV_BLK_FLUSH, /* u8 */
/* new attributes must be added above here */
VDPA_ATTR_MAX,