Skip to content

Commit

Permalink
iio: frequency: adrf6780: Fix adrf6780_spi_{read,write}()
Browse files Browse the repository at this point in the history
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: 63aaf6d ("iio: frequency: adrf6780: add support for ADRF6780")
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20211022195656.1513147-1-nathan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Nathan Chancellor authored and Greg Kroah-Hartman committed Oct 24, 2021
1 parent b6df1fc commit 7b473ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/iio/frequency/adrf6780.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 7b473ae

Please sign in to comment.