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: <3b95537e-f5fe-4aea-a7f1-a9aec3bdb8f6@linux.ibm.com>
Date: Thu, 9 Jan 2025 12:10:26 -0600
From: Eddie James <eajames@...ux.ibm.com>
To: Thomas Weißschuh <linux@...ssschuh.net>,
        Jeremy Kerr <jk@...abs.org>, Joel Stanley <joel@....id.au>,
        Alistar Popple <alistair@...ple.id.au>
Cc: linux-fsi@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fsi: core: Use const 'struct bin_attribute' callbacks


On 12/15/24 08:10, Thomas Weißschuh wrote:
> The sysfs core now provides callback variants that explicitly take a
> const pointer. Make use of it to match the attribute definition.


Thanks

Reviewed-by: Eddie James <eajames@...ux.ibm.com>


>
> Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net>
> ---
>   drivers/fsi/fsi-core.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/fsi/fsi-core.c b/drivers/fsi/fsi-core.c
> index e2e1e9df611543343a8498cdc425528a3e44619a..50e8736039fe686dd402ecf8fabe37a4c237d71b 100644
> --- a/drivers/fsi/fsi-core.c
> +++ b/drivers/fsi/fsi-core.c
> @@ -554,7 +554,7 @@ static unsigned long aligned_access_size(size_t offset, size_t count)
>   }
>   
>   static ssize_t fsi_slave_sysfs_raw_read(struct file *file,
> -		struct kobject *kobj, struct bin_attribute *attr, char *buf,
> +		struct kobject *kobj, const struct bin_attribute *attr, char *buf,
>   		loff_t off, size_t count)
>   {
>   	struct fsi_slave *slave = to_fsi_slave(kobj_to_dev(kobj));
> @@ -581,7 +581,7 @@ static ssize_t fsi_slave_sysfs_raw_read(struct file *file,
>   }
>   
>   static ssize_t fsi_slave_sysfs_raw_write(struct file *file,
> -		struct kobject *kobj, struct bin_attribute *attr,
> +		struct kobject *kobj, const struct bin_attribute *attr,
>   		char *buf, loff_t off, size_t count)
>   {
>   	struct fsi_slave *slave = to_fsi_slave(kobj_to_dev(kobj));
> @@ -613,8 +613,8 @@ static const struct bin_attribute fsi_slave_raw_attr = {
>   		.mode = 0600,
>   	},
>   	.size = 0,
> -	.read = fsi_slave_sysfs_raw_read,
> -	.write = fsi_slave_sysfs_raw_write,
> +	.read_new = fsi_slave_sysfs_raw_read,
> +	.write_new = fsi_slave_sysfs_raw_write,
>   };
>   
>   static void fsi_slave_release(struct device *dev)
>
> ---
> base-commit: 2d8308bf5b67dff50262d8a9260a50113b3628c6
> change-id: 20241215-sysfs-const-bin_attr-fsi-726b76d56a15
>
> Best regards,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ