* [PATCH] cdx: constify bin_attribute callback
@ 2024-11-11 10:33 Arnd Bergmann
2024-11-11 11:09 ` Agarwal, Nikhil
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2024-11-11 10:33 UTC (permalink / raw)
To: Nipun Gupta, Nikhil Agarwal, Greg Kroah-Hartman,
Krzysztof Wilczyński, Andrew Donnellan,
Thomas Weißschuh
Cc: Arnd Bergmann, Abhijit Gangurde, Dan Carpenter, Rob Herring,
linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
This one was missed in the treewide conversion:
drivers/cdx/cdx.c: In function 'cdx_create_res_attr':
drivers/cdx/cdx.c:773:24: error: assignment to 'int (*)(struct file *, struct kobject *, const struct bin_attribute *, struct vm_area_struct *)' from incompatible pointer type 'int (*)(struct file *, struct kobject *, struct bin_attribute *, struct vm_area_struct *)' [-Wincompatible-pointer-types]
773 | res_attr->mmap = cdx_mmap_resource;
| ^
Fixes: 94a20fb9af16 ("sysfs: treewide: constify attribute callback of bin_attribute::mmap()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/cdx/cdx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cdx/cdx.c b/drivers/cdx/cdx.c
index 07371cb653d3..316bd89a95ca 100644
--- a/drivers/cdx/cdx.c
+++ b/drivers/cdx/cdx.c
@@ -707,7 +707,7 @@ static const struct vm_operations_struct cdx_phys_vm_ops = {
* Return: true on success, false otherwise.
*/
static int cdx_mmap_resource(struct file *fp, struct kobject *kobj,
- struct bin_attribute *attr,
+ const struct bin_attribute *attr,
struct vm_area_struct *vma)
{
struct cdx_device *cdx_dev = to_cdx_device(kobj_to_dev(kobj));
--
2.39.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [PATCH] cdx: constify bin_attribute callback
2024-11-11 10:33 [PATCH] cdx: constify bin_attribute callback Arnd Bergmann
@ 2024-11-11 11:09 ` Agarwal, Nikhil
0 siblings, 0 replies; 2+ messages in thread
From: Agarwal, Nikhil @ 2024-11-11 11:09 UTC (permalink / raw)
To: Arnd Bergmann, Gupta, Nipun, Greg Kroah-Hartman,
Krzysztof Wilczyński, Andrew Donnellan,
Thomas Weißschuh
Cc: Arnd Bergmann, Gangurde, Abhijit, Dan Carpenter, Rob Herring,
linux-kernel@vger.kernel.org, Nathan Chancellor
> From: Arnd Bergmann <arnd@arndb.de>
>
> This one was missed in the treewide conversion:
>
> drivers/cdx/cdx.c: In function 'cdx_create_res_attr':
> drivers/cdx/cdx.c:773:24: error: assignment to 'int (*)(struct file *, struct kobject *,
> const struct bin_attribute *, struct vm_area_struct *)' from incompatible pointer type
> 'int (*)(struct file *, struct kobject *, struct bin_attribute *, struct vm_area_struct *)' [-
> Wincompatible-pointer-types]
> 773 | res_attr->mmap = cdx_mmap_resource;
> | ^
>
> Fixes: 94a20fb9af16 ("sysfs: treewide: constify attribute callback of
> bin_attribute::mmap()")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/cdx/cdx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
This change is already sent by Nathan here
https://lore.kernel.org/all/20241107-sysfs-const-mmap-fix-cdx-v1-1-2ed9b7cd5f8b@kernel.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-11-11 11:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-11 10:33 [PATCH] cdx: constify bin_attribute callback Arnd Bergmann
2024-11-11 11:09 ` Agarwal, Nikhil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox