[U-Boot] [PATCH v2] regmap: fix regmap_read_poll_timeout warning about sandbox_timer_add_offset
Simon Glass
sjg at chromium.org
Sun Apr 21 19:29:40 UTC 2019
On Wed, 17 Apr 2019 at 11:17, Neil Armstrong <narmstrong at baylibre.com> wrote:
>
> When fixing sandbox test for regmap_read_poll_timeout(), the
> sandbox_timer_add_offset was introduced but only defined in sandbox code
> thus generating warnings when used out of sandbox :
>
> include/regmap.h:289:2: note: in expansion of macro 'regmap_read_poll_timeout_test'
> regmap_read_poll_timeout_test(map, addr, val, cond, sleep_us, \
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/spi/meson_spifc.c:169:8: note: in expansion of macro 'regmap_read_poll_timeout'
> ret = regmap_read_poll_timeout(spifc->regmap, REG_SLAVE, data,
> ^~~~~~~~~~~~~~~~~~~~~~~~
> drivers/spi/meson_spifc.c: In function 'meson_spifc_txrx':
> include/regmap.h:277:4: warning: implicit declaration of function 'sandbox_timer_add_offset' [-Wimplicit-function-declaration]
>
> This fix renames the sandbox_timer_add_offset() to a generic timer_test_add_offset()
> function defined in time.h and renames the implementation and test usages.
>
> Cc: Simon Glass <sjg at chromium.org>
> Reported-by: Tom Rini <trini at konsulko.com>
> Fixes: df9cf1cc08 ("test: dm: regmap: Fix the long test delay")
> Signed-off-by: Neil Armstrong <narmstrong at baylibre.com>
> ---
> arch/sandbox/include/asm/test.h | 8 --------
> board/sandbox/sandbox.c | 2 +-
> drivers/net/sandbox.c | 2 +-
> drivers/timer/sandbox_timer.c | 2 +-
> include/regmap.h | 2 +-
> include/time.h | 8 ++++++++
> 6 files changed, 12 insertions(+), 12 deletions(-)
Reviewed-by: Simon Glass <sjg at chromium.org>
More information about the U-Boot
mailing list