mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eddie James <eajames@linux.ibm.com>
To: "Thomas Weißschuh" <linux@weissschuh.net>,
	"Jeremy Kerr" <jk@ozlabs.org>, "Joel Stanley" <joel@jms.id.au>,
	"Alistar Popple" <alistair@popple.id.au>
Cc: linux-fsi@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fsi: core: Use const 'struct bin_attribute' callbacks
Date: Thu, 9 Jan 2025 12:10:26 -0600	[thread overview]
Message-ID: <3b95537e-f5fe-4aea-a7f1-a9aec3bdb8f6@linux.ibm.com> (raw)
In-Reply-To: <20241215-sysfs-const-bin_attr-fsi-v1-1-b717f76a0146@weissschuh.net>


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@linux.ibm.com>


>
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.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,

      reply	other threads:[~2025-01-09 18:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-15 14:10 Thomas Weißschuh
2025-01-09 18:10 ` Eddie James [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3b95537e-f5fe-4aea-a7f1-a9aec3bdb8f6@linux.ibm.com \
    --to=eajames@linux.ibm.com \
    --cc=alistair@popple.id.au \
    --cc=jk@ozlabs.org \
    --cc=joel@jms.id.au \
    --cc=linux-fsi@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@weissschuh.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®