* Re: [PATCH] vfio: mdev: make a couple of functions and structure vfio_mdev_driver static
2017-12-21 23:12 [PATCH] vfio: mdev: make a couple of functions and structure vfio_mdev_driver static Xiongwei Song
@ 2017-12-25 5:52 ` Quan Xu
2017-12-25 6:51 ` Liu, Yi L
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Quan Xu @ 2017-12-25 5:52 UTC (permalink / raw)
To: Xiongwei Song, kwankhede, alex.williamson; +Cc: kvm, linux-kernel
On 2017/12/22 07:12, Xiongwei Song wrote:
> The functions vfio_mdev_probe, vfio_mdev_remove and the structure
> vfio_mdev_driver are only used in this file, so make them static.
>
> Clean up sparse warnings:
> drivers/vfio/mdev/vfio_mdev.c:114:5: warning: no previous prototype
> for 'vfio_mdev_probe' [-Wmissing-prototypes]
> drivers/vfio/mdev/vfio_mdev.c:121:6: warning: no previous prototype
> for 'vfio_mdev_remove' [-Wmissing-prototypes]
>
> Signed-off-by: Xiongwei Song <sxwjean@gmail.com>
> ---
> drivers/vfio/mdev/vfio_mdev.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/vfio/mdev/vfio_mdev.c b/drivers/vfio/mdev/vfio_mdev.c
> index fa848a701b8b..d230620fe02d 100644
> --- a/drivers/vfio/mdev/vfio_mdev.c
> +++ b/drivers/vfio/mdev/vfio_mdev.c
> @@ -111,19 +111,19 @@ static const struct vfio_device_ops vfio_mdev_dev_ops = {
> .mmap = vfio_mdev_mmap,
> };
>
> -int vfio_mdev_probe(struct device *dev)
> +static int vfio_mdev_probe(struct device *dev)
> {
> struct mdev_device *mdev = to_mdev_device(dev);
>
> return vfio_add_group_dev(dev, &vfio_mdev_dev_ops, mdev);
> }
>
> -void vfio_mdev_remove(struct device *dev)
> +static void vfio_mdev_remove(struct device *dev)
> {
> vfio_del_group_dev(dev);
> }
>
> -struct mdev_driver vfio_mdev_driver = {
> +static struct mdev_driver vfio_mdev_driver = {
> .name = "vfio_mdev",
> .probe = vfio_mdev_probe,
> .remove = vfio_mdev_remove,
Reviewed-by: Quan Xu <quan.xu0@gmail.com>
^ permalink raw reply [flat|nested] 5+ messages in thread* RE: [PATCH] vfio: mdev: make a couple of functions and structure vfio_mdev_driver static
2017-12-21 23:12 [PATCH] vfio: mdev: make a couple of functions and structure vfio_mdev_driver static Xiongwei Song
2017-12-25 5:52 ` Quan Xu
@ 2017-12-25 6:51 ` Liu, Yi L
2017-12-27 2:31 ` Kirti Wankhede
2018-01-16 18:36 ` Alex Williamson
3 siblings, 0 replies; 5+ messages in thread
From: Liu, Yi L @ 2017-12-25 6:51 UTC (permalink / raw)
To: Xiongwei Song, kwankhede, alex.williamson; +Cc: kvm, linux-kernel
> Sent: Friday, December 22, 2017 7:12 AM
> To: kwankhede@nvidia.com; alex.williamson@redhat.com
> Cc: kvm@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [PATCH] vfio: mdev: make a couple of functions and structure
> vfio_mdev_driver static
>
> The functions vfio_mdev_probe, vfio_mdev_remove and the structure
> vfio_mdev_driver are only used in this file, so make them static.
>
> Clean up sparse warnings:
> drivers/vfio/mdev/vfio_mdev.c:114:5: warning: no previous prototype for
> 'vfio_mdev_probe' [-Wmissing-prototypes]
> drivers/vfio/mdev/vfio_mdev.c:121:6: warning: no previous prototype for
> 'vfio_mdev_remove' [-Wmissing-prototypes]
>
> Signed-off-by: Xiongwei Song <sxwjean@gmail.com>
> ---
> drivers/vfio/mdev/vfio_mdev.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/vfio/mdev/vfio_mdev.c b/drivers/vfio/mdev/vfio_mdev.c index
> fa848a701b8b..d230620fe02d 100644
> --- a/drivers/vfio/mdev/vfio_mdev.c
> +++ b/drivers/vfio/mdev/vfio_mdev.c
> @@ -111,19 +111,19 @@ static const struct vfio_device_ops vfio_mdev_dev_ops =
> {
> .mmap = vfio_mdev_mmap,
> };
>
> -int vfio_mdev_probe(struct device *dev)
> +static int vfio_mdev_probe(struct device *dev)
> {
> struct mdev_device *mdev = to_mdev_device(dev);
>
> return vfio_add_group_dev(dev, &vfio_mdev_dev_ops, mdev); }
>
> -void vfio_mdev_remove(struct device *dev)
> +static void vfio_mdev_remove(struct device *dev)
> {
> vfio_del_group_dev(dev);
> }
>
> -struct mdev_driver vfio_mdev_driver = {
> +static struct mdev_driver vfio_mdev_driver = {
> .name = "vfio_mdev",
> .probe = vfio_mdev_probe,
> .remove = vfio_mdev_remove,
> --
> 2.15.1
Reviewed-by: Liu, Yi L <yi.l.liu@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] vfio: mdev: make a couple of functions and structure vfio_mdev_driver static
2017-12-21 23:12 [PATCH] vfio: mdev: make a couple of functions and structure vfio_mdev_driver static Xiongwei Song
2017-12-25 5:52 ` Quan Xu
2017-12-25 6:51 ` Liu, Yi L
@ 2017-12-27 2:31 ` Kirti Wankhede
2018-01-16 18:36 ` Alex Williamson
3 siblings, 0 replies; 5+ messages in thread
From: Kirti Wankhede @ 2017-12-27 2:31 UTC (permalink / raw)
To: Xiongwei Song, alex.williamson; +Cc: kvm, linux-kernel
On 12/22/2017 4:42 AM, Xiongwei Song wrote:
> The functions vfio_mdev_probe, vfio_mdev_remove and the structure
> vfio_mdev_driver are only used in this file, so make them static.
>
> Clean up sparse warnings:
> drivers/vfio/mdev/vfio_mdev.c:114:5: warning: no previous prototype
> for 'vfio_mdev_probe' [-Wmissing-prototypes]
> drivers/vfio/mdev/vfio_mdev.c:121:6: warning: no previous prototype
> for 'vfio_mdev_remove' [-Wmissing-prototypes]
>
> Signed-off-by: Xiongwei Song <sxwjean@gmail.com>
> ---
> drivers/vfio/mdev/vfio_mdev.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/vfio/mdev/vfio_mdev.c b/drivers/vfio/mdev/vfio_mdev.c
> index fa848a701b8b..d230620fe02d 100644
> --- a/drivers/vfio/mdev/vfio_mdev.c
> +++ b/drivers/vfio/mdev/vfio_mdev.c
> @@ -111,19 +111,19 @@ static const struct vfio_device_ops vfio_mdev_dev_ops = {
> .mmap = vfio_mdev_mmap,
> };
>
> -int vfio_mdev_probe(struct device *dev)
> +static int vfio_mdev_probe(struct device *dev)
> {
> struct mdev_device *mdev = to_mdev_device(dev);
>
> return vfio_add_group_dev(dev, &vfio_mdev_dev_ops, mdev);
> }
>
> -void vfio_mdev_remove(struct device *dev)
> +static void vfio_mdev_remove(struct device *dev)
> {
> vfio_del_group_dev(dev);
> }
>
> -struct mdev_driver vfio_mdev_driver = {
> +static struct mdev_driver vfio_mdev_driver = {
> .name = "vfio_mdev",
> .probe = vfio_mdev_probe,
> .remove = vfio_mdev_remove,
>
Reviewed by: Kirti Wankhede <kwankhede@nvidia.com>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] vfio: mdev: make a couple of functions and structure vfio_mdev_driver static
2017-12-21 23:12 [PATCH] vfio: mdev: make a couple of functions and structure vfio_mdev_driver static Xiongwei Song
` (2 preceding siblings ...)
2017-12-27 2:31 ` Kirti Wankhede
@ 2018-01-16 18:36 ` Alex Williamson
3 siblings, 0 replies; 5+ messages in thread
From: Alex Williamson @ 2018-01-16 18:36 UTC (permalink / raw)
To: Xiongwei Song; +Cc: kwankhede, kvm, linux-kernel
On Fri, 22 Dec 2017 07:12:26 +0800
Xiongwei Song <sxwjean@gmail.com> wrote:
> The functions vfio_mdev_probe, vfio_mdev_remove and the structure
> vfio_mdev_driver are only used in this file, so make them static.
>
> Clean up sparse warnings:
> drivers/vfio/mdev/vfio_mdev.c:114:5: warning: no previous prototype
> for 'vfio_mdev_probe' [-Wmissing-prototypes]
> drivers/vfio/mdev/vfio_mdev.c:121:6: warning: no previous prototype
> for 'vfio_mdev_remove' [-Wmissing-prototypes]
>
> Signed-off-by: Xiongwei Song <sxwjean@gmail.com>
> ---
> drivers/vfio/mdev/vfio_mdev.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Applied to next branch with reviewed-bys for v4.16. Thanks,
Alex
^ permalink raw reply [flat|nested] 5+ messages in thread