lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20171002131035.4f901999@t450s.home>
Date:   Mon, 2 Oct 2017 13:10:35 -0600
From:   Alex Williamson <alex.williamson@...hat.com>
To:     Bhumika Goyal <bhumirks@...il.com>
Cc:     julia.lawall@...6.fr, kwankhede@...dia.com, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] vfio-mdev: make mdev_fops const and static

On Sat, 30 Sep 2017 21:47:24 +0530
Bhumika Goyal <bhumirks@...il.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@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ