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] [thread-next>] [day] [month] [year] [list]
Message-ID: <87o8xhs4b3.fsf@linux.ibm.com>
Date:   Tue, 12 Nov 2019 17:19:04 +0530
From:   "Aneesh Kumar K.V" <aneesh.kumar@...ux.ibm.com>
To:     Dan Williams <dan.j.williams@...el.com>, linux-nvdimm@...ts.01.org
Cc:     Ira Weiny <ira.weiny@...el.com>,
        Vishal Verma <vishal.l.verma@...el.com>, peterz@...radead.org,
        dave.hansen@...ux.intel.com, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org
Subject: Re: [PATCH 09/16] dax: Create a dax device_type

Dan Williams <dan.j.williams@...el.com> writes:

> Move the open coded release method and attribute groups to a 'struct
> device_type' instance.
>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@...ux.ibm.com>

> Cc: Ira Weiny <ira.weiny@...el.com>
> Cc: Vishal Verma <vishal.l.verma@...el.com>
> Signed-off-by: Dan Williams <dan.j.williams@...el.com>
> ---
>  drivers/dax/bus.c |    8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c
> index 8fafbeab510a..f3e6e00ece40 100644
> --- a/drivers/dax/bus.c
> +++ b/drivers/dax/bus.c
> @@ -373,6 +373,11 @@ static void dev_dax_release(struct device *dev)
>  	kfree(dev_dax);
>  }
>  
> +static const struct device_type dev_dax_type = {
> +	.release = dev_dax_release,
> +	.groups = dax_attribute_groups,
> +};
> +
>  static void unregister_dev_dax(void *dev)
>  {
>  	struct dev_dax *dev_dax = to_dev_dax(dev);
> @@ -430,8 +435,7 @@ struct dev_dax *__devm_create_dev_dax(struct dax_region *dax_region, int id,
>  	else
>  		dev->class = dax_class;
>  	dev->parent = parent;
> -	dev->groups = dax_attribute_groups;
> -	dev->release = dev_dax_release;
> +	dev->type = &dev_dax_type;
>  	dev_set_name(dev, "dax%d.%d", dax_region->id, id);
>  
>  	rc = device_add(dev);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ