RE: [PATCH] cdx: constify bin_attribute callback
From: Agarwal, Nikhil
Date: Mon Nov 11 2024 - 06:10:12 EST
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> 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@xxxxxxxx>
> ---
> 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@xxxxxxxxxx/