From: Nathan Chancellor Date: Fri, 22 Oct 2021 19:56:56 +0000 (-0700) Subject: iio: frequency: adrf6780: Fix adrf6780_spi_{read,write}() X-Git-Tag: v6.6.17~8913^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7b473ae754fec86cfa44f05f0882d1329d244e6c;p=platform%2Fkernel%2Flinux-rpi.git iio: frequency: adrf6780: Fix adrf6780_spi_{read,write}() Clang warns: drivers/iio/frequency/adrf6780.c:117:1: error: all paths through this function will call itself [-Werror,-Winfinite-recursion] { ^ drivers/iio/frequency/adrf6780.c:138:1: error: all paths through this function will call itself [-Werror,-Winfinite-recursion] { ^ 2 errors generated. The underscore variants should be used here. Link: https://github.com/ClangBuiltLinux/linux/issues/1490 Fixes: 63aaf6d06d87 ("iio: frequency: adrf6780: add support for ADRF6780") Acked-by: Jonathan Cameron Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20211022195656.1513147-1-nathan@kernel.org Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/iio/frequency/adrf6780.c b/drivers/iio/frequency/adrf6780.c index abe8b30..8255ffd 100644 --- a/drivers/iio/frequency/adrf6780.c +++ b/drivers/iio/frequency/adrf6780.c @@ -118,7 +118,7 @@ static int adrf6780_spi_read(struct adrf6780_state *st, unsigned int reg, int ret; mutex_lock(&st->lock); - ret = adrf6780_spi_read(st, reg, val); + ret = __adrf6780_spi_read(st, reg, val); mutex_unlock(&st->lock); return ret; @@ -139,7 +139,7 @@ static int adrf6780_spi_write(struct adrf6780_state *st, unsigned int reg, int ret; mutex_lock(&st->lock); - ret = adrf6780_spi_write(st, reg, val); + ret = __adrf6780_spi_write(st, reg, val); mutex_unlock(&st->lock); return ret;