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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1875965.3q8Q5IJkUj@townsend>
Date:   Fri, 08 Nov 2019 20:18:57 +1100
From:   Alistair Popple <alistair@...ple.id.au>
To:     Joel Stanley <joel@....id.au>
Cc:     Rob Herring <robh+dt@...nel.org>,
        Greg KH <gregkh@...uxfoundation.org>,
        Jeremy Kerr <jk@...abs.org>,
        Eddie James <eajames@...ux.ibm.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
        devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-fsi@...ts.ozlabs.org
Subject: Re: [PATCH v2 02/11] fsi: Move master attributes to fsi-master class

Acked-by: Alistair Popple <alistair@...ple.id.au>

On Friday, 8 November 2019 4:19:36 PM AEDT Joel Stanley wrote:
> From: Jeremy Kerr <jk@...abs.org>
> 
> Populate fsi_master_class->dev_attrs with the existing attribute
> definitions, so we don't need to explicitly register.
> 
> Signed-off-by: Jeremy Kerr <jk@...abs.org>
> Signed-off-by: Joel Stanley <joel@....id.au>
> ---
>  drivers/fsi/fsi-core.c | 23 +++++++++--------------
>  1 file changed, 9 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/fsi/fsi-core.c b/drivers/fsi/fsi-core.c
> index 0861f6097b33..c773c65a5058 100644
> --- a/drivers/fsi/fsi-core.c
> +++ b/drivers/fsi/fsi-core.c
> @@ -1241,8 +1241,17 @@ static ssize_t master_break_store(struct device *dev,
>  
>  static DEVICE_ATTR(break, 0200, NULL, master_break_store);
>  
> +static struct attribute *master_attrs[] = {
> +	&dev_attr_break.attr,
> +	&dev_attr_rescan.attr,
> +	NULL
> +};
> +
> +ATTRIBUTE_GROUPS(master);
> +
>  struct class fsi_master_class = {
>  	.name = "fsi-master",
> +	.dev_groups = master_groups,
>  };
>  
>  int fsi_master_register(struct fsi_master *master)
> @@ -1261,20 +1270,6 @@ int fsi_master_register(struct fsi_master *master)
>  		return rc;
>  	}
>  
> -	rc = device_create_file(&master->dev, &dev_attr_rescan);
> -	if (rc) {
> -		device_del(&master->dev);
> -		ida_simple_remove(&master_ida, master->idx);
> -		return rc;
> -	}
> -
> -	rc = device_create_file(&master->dev, &dev_attr_break);
> -	if (rc) {
> -		device_del(&master->dev);
> -		ida_simple_remove(&master_ida, master->idx);
> -		return rc;
> -	}
> -
>  	np = dev_of_node(&master->dev);
>  	if (!of_property_read_bool(np, "no-scan-on-init")) {
>  		mutex_lock(&master->scan_lock);
> 




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ