Skip to contentSkip to conversation

vfio/mdev: update outdated comment

PATCH Applied Julia Lawall 4 participants 4 messages Dec 30, 2025 – Jan 19

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vfio/mdev: update outdated comment

The function add_mdev_supported_type() was renamed mdev_type_add() in commit da44c340c4fe ("vfio/mdev: simplify mdev_type handling"). Update the comment accordingly.

Note that just as mdev_type_release() now states that its put pairs with the get in mdev_type_add(), mdev_type_add() already stated that its get pairs with the put in mdev_type_release().

---
 drivers/vfio/mdev/mdev_sysfs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/vfio/mdev/mdev_sysfs.c +1 -1
index e44bb44c581e..b2596020e62f 100644
@@ -156,7 +156,7 @@ static void mdev_type_release(struct kobject *kobj)
 	struct mdev_type *type = to_mdev_type(kobj);
 
 	pr_debug("Releasing group %s\n", kobj->name);
-	/* Pairs with the get in add_mdev_supported_type() */
+	/* Pairs with the get in mdev_type_add() */
 	put_device(type->parent->dev);
 }
 
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Julia Lawall

The function add_mdev_supported_type() was renamed mdev_type_add() in commit da44c340c4fe ("vfio/mdev: simplify mdev_type handling"). Update the comment accordingly.

Note that just as mdev_type_release() now states that its put pairs with the get in mdev_type_add(), mdev_type_add() already stated that its get pairs with the put in mdev_type_release().

Quoted 5 lines
---
 drivers/vfio/mdev/mdev_sysfs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Jason

maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Julia Lawall
Quoted 18 lines

-----Original Message-----
From: Julia Lawall <[email protected]>
Sent: 30 December 2025 10:11 PM
To: Kirti Wankhede <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Alex Williamson <[email protected]>; [email protected]; [email protected]
Subject: [PATCH] vfio/mdev: update outdated comment

The function add_mdev_supported_type() was renamed mdev_type_add() in commit da44c340c4fe ("vfio/mdev: simplify mdev_type handling"). Update the comment accordingly.

Note that just as mdev_type_release() now states that its put pairs with the get in mdev_type_add(), mdev_type_add() already stated that its get pairs with the put in mdev_type_release().

Quoted 6 lines
---
 drivers/vfio/mdev/mdev_sysfs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
maintainer Applied
#3 lore raw
In reply to Julia Lawall
Quoted 21 lines · On Tue, 30 Dec 2025 17:41:13 +0100 Julia Lawall <[email protected]> wrote:

The function add_mdev_supported_type() was renamed mdev_type_add() in commit da44c340c4fe ("vfio/mdev: simplify mdev_type handling"). Update the comment accordingly.

Note that just as mdev_type_release() now states that its put pairs with the get in mdev_type_add(), mdev_type_add() already stated that its get pairs with the put in mdev_type_release().

---
 drivers/vfio/mdev/mdev_sysfs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/vfio/mdev/mdev_sysfs.c +0 -0
index e44bb44c581e..b2596020e62f 100644

drivers/vfio/mdev/mdev_sysfs.c static void mdev_type_release(struct kobject *kobj) · line 162

Quoted 8 lines
drivers/vfio/mdev/mdev_sysfs.c +1 -1
@@ -156,7 +156,7 @@ static void mdev_type_release(struct kobject *kobj)
 	struct mdev_type *type = to_mdev_type(kobj);
 
 	pr_debug("Releasing group %s\n", kobj->name);
-	/* Pairs with the get in add_mdev_supported_type() */
+	/* Pairs with the get in mdev_type_add() */
 	put_device(type->parent->dev);
 }
 

Applied to vfio next branch for v6.20/7.0. Thanks,

Alex