Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1742651 > unrolled thread

[PATCH] vfio-mdev: make mdev_fops const and static

Started byBhumika Goyal <bhumirks@gmail.com>
First post2017-09-30 18:20 +0200
Last post2017-09-30 18:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] vfio-mdev: make mdev_fops const and static Bhumika Goyal <bhumirks@gmail.com> - 2017-09-30 18:20 +0200

#1742651 — [PATCH] vfio-mdev: make mdev_fops const and static

FromBhumika Goyal <bhumirks@gmail.com>
Date2017-09-30 18:20 +0200
Subject[PATCH] vfio-mdev: make mdev_fops const and static
Message-ID<uvsEF-6tv-11@gated-at.bofh.it>
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>
---
 samples/vfio-mdev/mtty.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/samples/vfio-mdev/mtty.c b/samples/vfio-mdev/mtty.c
index ca49568..09f255b 100644
--- a/samples/vfio-mdev/mtty.c
+++ b/samples/vfio-mdev/mtty.c
@@ -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,
-- 
1.9.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web