* [PATCH] iio: frequency: adrf6780: Fix adrf6780_spi_{read,write}()
@ 2021-10-22 19:56 Nathan Chancellor
2021-10-23 15:43 ` Jonathan Cameron
0 siblings, 1 reply; 3+ messages in thread
From: Nathan Chancellor @ 2021-10-22 19:56 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron
Cc: Nick Desaulniers, Antoniu Miclaus, linux-iio, linux-kernel, llvm,
Nathan Chancellor
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.
Fixes: 63aaf6d06d87 ("iio: frequency: adrf6780: add support for ADRF6780")
Link: https://github.com/ClangBuiltLinux/linux/issues/1490
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
drivers/iio/frequency/adrf6780.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/frequency/adrf6780.c b/drivers/iio/frequency/adrf6780.c
index abe8b30fceca..8255ffd174f6 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;
base-commit: 77af145dc7eadcb78d38912b67d6a68050d21a9b
--
2.33.1.637.gf443b226ca
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: frequency: adrf6780: Fix adrf6780_spi_{read,write}()
2021-10-22 19:56 [PATCH] iio: frequency: adrf6780: Fix adrf6780_spi_{read,write}() Nathan Chancellor
@ 2021-10-23 15:43 ` Jonathan Cameron
2021-10-24 11:14 ` Greg KH
0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Cameron @ 2021-10-23 15:43 UTC (permalink / raw)
To: Nathan Chancellor
Cc: Lars-Peter Clausen, Michael Hennerich, Nick Desaulniers,
Antoniu Miclaus, linux-iio, linux-kernel, llvm, gregkh
On Fri, 22 Oct 2021 12:56:56 -0700
Nathan Chancellor <nathan@kernel.org> wrote:
> 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.
>
> Fixes: 63aaf6d06d87 ("iio: frequency: adrf6780: add support for ADRF6780")
> Link: https://github.com/ClangBuiltLinux/linux/issues/1490
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Thanks Nathan, (bit embarrassed I missed this in review :(
As you probably guessed I didn't run an llvm test this time - guess I should
start doing that on a regular basis.
We obviously have plenty of time to get this fix in place but
seeing as I just sent a pull request for the driver a few hours before this
patch:
Greg, would you mind picking this one up directly on top of
[PULL] 2nd set of IIO new device support, features, cleanup for 5.16
if you take that pull request?
Message ID for this one is:
20211022195656.1513147-1-nathan@kernel.org
No problem if you'd rather I just queue this fix up for post merge
window.
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Thanks,
Jonathan
> ---
> drivers/iio/frequency/adrf6780.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iio/frequency/adrf6780.c b/drivers/iio/frequency/adrf6780.c
> index abe8b30fceca..8255ffd174f6 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;
>
> base-commit: 77af145dc7eadcb78d38912b67d6a68050d21a9b
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: frequency: adrf6780: Fix adrf6780_spi_{read,write}()
2021-10-23 15:43 ` Jonathan Cameron
@ 2021-10-24 11:14 ` Greg KH
0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2021-10-24 11:14 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Nathan Chancellor, Lars-Peter Clausen, Michael Hennerich,
Nick Desaulniers, Antoniu Miclaus, linux-iio, linux-kernel, llvm
On Sat, Oct 23, 2021 at 04:43:33PM +0100, Jonathan Cameron wrote:
> On Fri, 22 Oct 2021 12:56:56 -0700
> Nathan Chancellor <nathan@kernel.org> wrote:
>
> > 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.
> >
> > Fixes: 63aaf6d06d87 ("iio: frequency: adrf6780: add support for ADRF6780")
> > Link: https://github.com/ClangBuiltLinux/linux/issues/1490
> > Signed-off-by: Nathan Chancellor <nathan@kernel.org>
>
> Thanks Nathan, (bit embarrassed I missed this in review :(
> As you probably guessed I didn't run an llvm test this time - guess I should
> start doing that on a regular basis.
>
> We obviously have plenty of time to get this fix in place but
> seeing as I just sent a pull request for the driver a few hours before this
> patch:
>
> Greg, would you mind picking this one up directly on top of
> [PULL] 2nd set of IIO new device support, features, cleanup for 5.16
> if you take that pull request?
>
> Message ID for this one is:
>
> 20211022195656.1513147-1-nathan@kernel.org
>
> No problem if you'd rather I just queue this fix up for post merge
> window.
>
> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Picked it up now, thanks!
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-24 11:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-22 19:56 [PATCH] iio: frequency: adrf6780: Fix adrf6780_spi_{read,write}() Nathan Chancellor
2021-10-23 15:43 ` Jonathan Cameron
2021-10-24 11:14 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).