Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2820258pxb; Sat, 23 Oct 2021 08:44:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRe3OToP1H9V+eSXmZD6vrHwcu8O2x/w1DLBu0spUSBTkV2n8C98Ligu4LWQi5PxTkWM9k X-Received: by 2002:a17:902:9a04:b0:13a:1ae3:add2 with SMTP id v4-20020a1709029a0400b0013a1ae3add2mr5992353plp.28.1635003873419; Sat, 23 Oct 2021 08:44:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635003873; cv=none; d=google.com; s=arc-20160816; b=rFVics8ZoLTV5s+pGxzNsXniaFf1v6pfSaXx2BKv0NtA/pe3HBB5ua4AgO4lBqOx2g 6z+ILg1j53CNY+eklYTHxijdis9Lj3mry9wh/wGtbZbhYCqRariOQhbF3I+4SQihC00F 0tBPYan6bOxtJwW/4jvEjM84hMnql6PUdquJaoENRKEV1+k+rymaBpNP2nfNfLpbER75 DMZQdVopev+BRYwcmOUffCnEgwxhqo8Vh+kC03PfC0uXVRy5vY1XciAcXE/FXLE519OB PNXNVrqRl2UqX2tMoIqoZ8HWDCdN5j/x0hrP1bKz5zhX5d12czS9LbgM8GRGjv+OIrKO uG2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=PbDzqzluG5vAYvRGwsGDm+Ai8y9WV6R5mX7LycD+Lcs=; b=edXZllxskhxOP7Pl+CzgF7DNQs9h6bVRdxNtf44xT9/wPgtnAgeqwdHhJsqe4zGGis izTnptM0/Qn9T/yuEk5ph3B6Kc6B5aRwR8FYGhePFyMLlGIj27NnB2peiEz4kIVYssdQ RTTebmhNMXmRv6Cl4KsHQOafZ930DxGuoNqANCE3o7fkxDRO3b3FoKnehzKjw09g3yCO rpIn3RiL0SygRQMwpP/Rc3Jt3ZDFEU3rijJE6YugSaThreFpJa93zjxW1f0fgbFfKsj3 FV8gUabUwsrv+8F4AXMiVB8jNnZhXnbdu/ubvQFsZXhv2CNFj3J+oWxB1cQrwwBrnEhF zcrg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c5si19076733pgw.592.2021.10.23.08.44.20; Sat, 23 Oct 2021 08:44:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230253AbhJWPlf (ORCPT + 99 others); Sat, 23 Oct 2021 11:41:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:52862 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229901AbhJWPle (ORCPT ); Sat, 23 Oct 2021 11:41:34 -0400 Received: from jic23-huawei (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F1ADA60FE3; Sat, 23 Oct 2021 15:39:12 +0000 (UTC) Date: Sat, 23 Oct 2021 16:43:33 +0100 From: Jonathan Cameron To: Nathan Chancellor Cc: Lars-Peter Clausen , Michael Hennerich , Nick Desaulniers , Antoniu Miclaus , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, gregkh@linuxfoundation.org Subject: Re: [PATCH] iio: frequency: adrf6780: Fix adrf6780_spi_{read,write}() Message-ID: <20211023164333.36b2ea2c@jic23-huawei> In-Reply-To: <20211022195656.1513147-1-nathan@kernel.org> References: <20211022195656.1513147-1-nathan@kernel.org> X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 22 Oct 2021 12:56:56 -0700 Nathan Chancellor 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 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 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