]> git.baikalelectronics.ru Git - uboot.git/commit
cmd/misc: Stop using a function pointer
authorTom Rini <trini@konsulko.com>
Wed, 22 Jun 2022 20:08:56 +0000 (16:08 -0400)
committerTom Rini <trini@konsulko.com>
Thu, 23 Jun 2022 01:29:47 +0000 (21:29 -0400)
commit5c7cb1dfb9180726b9833aeaa5ef706dfd801c4e
tree2b38b510c055b2053dae6eedb57796c31fcae3d0
parente51ec651d606d919b28ae36bf3e411b1b944c0a7
cmd/misc: Stop using a function pointer

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.

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
cmd/misc.c