[PATCH] cmd/misc: Stop using a function pointer
Bin Meng
bmeng.cn at gmail.com
Thu Jun 23 02:14:14 CEST 2022
On Thu, Jun 23, 2022 at 4:10 AM Tom Rini <trini at konsulko.com> wrote:
>
> Currently, enabling CMD_MISC gives:
> cmd/misc.c:67:25: warning: assignment to 'int (*)(struct udevice *, int, void *, int)' from incompatible pointer type 'int (*)(struct udevice *, int, const void *, int)' [-Wincompatible-pointer-types]
>
> Because 'misc_read' takes a void * and 'misc_write' takes a const void
> *, both of which make sense for their operation. Given there's one
> place we make use of the function pointer, just call read or write
> directly for the operation we're called with.
>
> Cc: Bin Meng <bmeng.cn at gmail.com>
> Signed-off-by: Tom Rini <trini at konsulko.com>
> ---
> cmd/misc.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
More information about the U-Boot
mailing list