Skip to content

Commit 79d4037

Browse files
goyalbhumikaAlex Williamson
authored andcommitted
vfio-mdev/samples: make mdev_fops const and static
Make this const as it is only passed to a const argument of the function mdev_register_device. Make it static as it is not referenced in any other file. Structure found using Coccinelle and changes done by hand. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
1 parent 5c2fefd commit 79d4037

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎samples/vfio-mdev/mtty.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1413,7 +1413,7 @@ struct attribute_group *mdev_type_groups[] = {
14131413
NULL,
14141414
};
14151415

1416-
struct mdev_parent_ops mdev_fops = {
1416+
static const struct mdev_parent_ops mdev_fops = {
14171417
.owner = THIS_MODULE,
14181418
.dev_attr_groups = mtty_dev_groups,
14191419
.mdev_attr_groups = mdev_dev_groups,

0 commit comments

Comments
 (0)