Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750888AbdLYFwn (ORCPT ); Mon, 25 Dec 2017 00:52:43 -0500 Received: from mail-oi0-f67.google.com ([209.85.218.67]:44098 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750738AbdLYFwk (ORCPT ); Mon, 25 Dec 2017 00:52:40 -0500 X-Google-Smtp-Source: ACJfBous8NjwjhgbWAJvUrQndq33kGejwBNlV/qrQfOTDuxU84D+80z84prPvzb4SSrAX+H/RM5ctA== Subject: Re: [PATCH] vfio: mdev: make a couple of functions and structure vfio_mdev_driver static To: Xiongwei Song , kwankhede@nvidia.com, alex.williamson@redhat.com Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20171221231226.15505-1-sxwjean@gmail.com> From: Quan Xu Message-ID: Date: Mon, 25 Dec 2017 13:52:32 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171221231226.15505-1-sxwjean@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1522 Lines: 45 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 > --- > 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