* [PATCH] vfio-mdev: make mdev_fops const and static
@ 2017-09-30 16:17 Bhumika Goyal
2017-10-02 19:10 ` Alex Williamson
0 siblings, 1 reply; 2+ messages in thread
From: Bhumika Goyal @ 2017-09-30 16:17 UTC (permalink / raw)
To: julia.lawall, kwankhede, kvm, linux-kernel; +Cc: Bhumika Goyal
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] vfio-mdev: make mdev_fops const and static
2017-09-30 16:17 [PATCH] vfio-mdev: make mdev_fops const and static Bhumika Goyal
@ 2017-10-02 19:10 ` Alex Williamson
0 siblings, 0 replies; 2+ messages in thread
From: Alex Williamson @ 2017-10-02 19:10 UTC (permalink / raw)
To: Bhumika Goyal; +Cc: julia.lawall, kwankhede, kvm, linux-kernel
On Sat, 30 Sep 2017 21:47:24 +0530
Bhumika Goyal <bhumirks@gmail.com> wrote:
> 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,
Applied to vfio next branch for v4.15. Thanks,
Alex
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-02 19:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-30 16:17 [PATCH] vfio-mdev: make mdev_fops const and static Bhumika Goyal
2017-10-02 19:10 ` Alex Williamson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.