From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751534AbdJBTKj (ORCPT ); Mon, 2 Oct 2017 15:10:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24532 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751354AbdJBTKh (ORCPT ); Mon, 2 Oct 2017 15:10:37 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D185A13A42 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=alex.williamson@redhat.com Date: Mon, 2 Oct 2017 13:10:35 -0600 From: Alex Williamson To: Bhumika Goyal Cc: julia.lawall@lip6.fr, kwankhede@nvidia.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] vfio-mdev: make mdev_fops const and static Message-ID: <20171002131035.4f901999@t450s.home> In-Reply-To: <1506788244-6864-1-git-send-email-bhumirks@gmail.com> References: <1506788244-6864-1-git-send-email-bhumirks@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 02 Oct 2017 19:10:37 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 30 Sep 2017 21:47:24 +0530 Bhumika Goyal 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 > --- > 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