[PATCH 03/18] cdev: fix for_each_cdev macro

Marco Felsch m.felsch at pengutronix.de
Wed May 31 08:37:13 PDT 2023


On 23-05-31, Ahmad Fatoum wrote:
> The macro parameter 'c' was never used, instead hardcoding cdev.
> It worked so far anyway, because all users of for_each_cdev used cdev
> as the argument. Fix this.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>

Reviewed-by: Marco Felsch <m.felsch at pengutronix.de>

> ---
>  include/driver.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/driver.h b/include/driver.h
> index d33e0fcbccc9..e1ee3dc2dd7c 100644
> --- a/include/driver.h
> +++ b/include/driver.h
> @@ -566,7 +566,7 @@ int cdev_truncate(struct cdev*, size_t size);
>  loff_t cdev_unallocated_space(struct cdev *cdev);
>  
>  extern struct list_head cdev_list;
> -#define for_each_cdev(c) \
> +#define for_each_cdev(cdev) \
>  	list_for_each_entry(cdev, &cdev_list, list)
>  
>  #define DEVFS_PARTITION_FIXED		(1U << 0)
> -- 
> 2.39.2
> 
> 
> 



More information about the barebox mailing list