Skip to content

Commit

Permalink
vfio-mdev/samples: make mdev_fops const and static
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
  • Loading branch information
goyalbhumika authored and awilliam committed Oct 2, 2017
1 parent 5c2fefd commit 79d4037
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion samples/vfio-mdev/mtty.c
Original file line number Diff line number Diff line change
Expand Up @@ -1413,7 +1413,7 @@ struct attribute_group *mdev_type_groups[] = {
NULL,
};

struct mdev_parent_ops mdev_fops = {
static const struct mdev_parent_ops mdev_fops = {
.owner = THIS_MODULE,
.dev_attr_groups = mtty_dev_groups,
.mdev_attr_groups = mdev_dev_groups,
Expand Down

0 comments on commit 79d4037

Please sign in to comment.