Skip to content

Commit c942a0c

Browse files
committed
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
2 parents dda89e2 + 98a8215 commit c942a0c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

drivers/vdpa/vdpa.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@ vdpa_dev_blk_seg_size_config_fill(struct sk_buff *msg, u64 features,
967967

968968
val_u32 = __virtio32_to_cpu(true, config->size_max);
969969

970-
return nla_put_u32(msg, VDPA_ATTR_DEV_BLK_CFG_SEG_SIZE, val_u32);
970+
return nla_put_u32(msg, VDPA_ATTR_DEV_BLK_CFG_SIZE_MAX, val_u32);
971971
}
972972

973973
/* fill the block size*/
@@ -1089,7 +1089,7 @@ static int vdpa_dev_blk_ro_config_fill(struct sk_buff *msg, u64 features)
10891089
u8 ro;
10901090

10911091
ro = ((features & BIT_ULL(VIRTIO_BLK_F_RO)) == 0) ? 0 : 1;
1092-
if (nla_put_u8(msg, VDPA_ATTR_DEV_BLK_CFG_READ_ONLY, ro))
1092+
if (nla_put_u8(msg, VDPA_ATTR_DEV_BLK_READ_ONLY, ro))
10931093
return -EMSGSIZE;
10941094

10951095
return 0;
@@ -1100,7 +1100,7 @@ static int vdpa_dev_blk_flush_config_fill(struct sk_buff *msg, u64 features)
11001100
u8 flush;
11011101

11021102
flush = ((features & BIT_ULL(VIRTIO_BLK_F_FLUSH)) == 0) ? 0 : 1;
1103-
if (nla_put_u8(msg, VDPA_ATTR_DEV_BLK_CFG_FLUSH, flush))
1103+
if (nla_put_u8(msg, VDPA_ATTR_DEV_BLK_FLUSH, flush))
11041104
return -EMSGSIZE;
11051105

11061106
return 0;

include/uapi/linux/vdpa.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ enum vdpa_attr {
5757
VDPA_ATTR_DEV_FEATURES, /* u64 */
5858

5959
VDPA_ATTR_DEV_BLK_CFG_CAPACITY, /* u64 */
60-
VDPA_ATTR_DEV_BLK_CFG_SEG_SIZE, /* u32 */
60+
VDPA_ATTR_DEV_BLK_CFG_SIZE_MAX, /* u32 */
6161
VDPA_ATTR_DEV_BLK_CFG_BLK_SIZE, /* u32 */
6262
VDPA_ATTR_DEV_BLK_CFG_SEG_MAX, /* u32 */
6363
VDPA_ATTR_DEV_BLK_CFG_NUM_QUEUES, /* u16 */
@@ -70,8 +70,8 @@ enum vdpa_attr {
7070
VDPA_ATTR_DEV_BLK_CFG_DISCARD_SEC_ALIGN,/* u32 */
7171
VDPA_ATTR_DEV_BLK_CFG_MAX_WRITE_ZEROES_SEC, /* u32 */
7272
VDPA_ATTR_DEV_BLK_CFG_MAX_WRITE_ZEROES_SEG, /* u32 */
73-
VDPA_ATTR_DEV_BLK_CFG_READ_ONLY, /* u8 */
74-
VDPA_ATTR_DEV_BLK_CFG_FLUSH, /* u8 */
73+
VDPA_ATTR_DEV_BLK_READ_ONLY, /* u8 */
74+
VDPA_ATTR_DEV_BLK_FLUSH, /* u8 */
7575

7676
/* new attributes must be added above here */
7777
VDPA_ATTR_MAX,

0 commit comments

Comments
 (0)