Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Bhumika Goyal and committed by
Alex Williamson
79d40370 5c2fefd8

+1 -1
+1 -1
samples/vfio-mdev/mtty.c
··· 1413 1413 NULL, 1414 1414 }; 1415 1415 1416 - struct mdev_parent_ops mdev_fops = { 1416 + static const struct mdev_parent_ops mdev_fops = { 1417 1417 .owner = THIS_MODULE, 1418 1418 .dev_attr_groups = mtty_dev_groups, 1419 1419 .mdev_attr_groups = mdev_dev_groups,