From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2BAA01170F; Thu, 5 Oct 2023 13:38:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hdhzp6tQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7C49C4AF73; Thu, 5 Oct 2023 13:38:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696513089; bh=IHjcJEdzOn5XpuR4rXMoCHN3hdl6l6qbxCqy3uQRR68=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=hdhzp6tQXl6tvjcq1x6OfQN/c974rRNvEZaKS4R2RpqKqYifvkLl1kGaRhD9rvTWZ ga2o1a64DLAey6jhLH1efLIVZcJHzJVYtHSbSBDeeDLl0dXGd/ZS7Ygvj8zyhp2RAW x+wXEqby0DQ5y+eMWs3uRzwYGu4Ih4nuE+Y+rcnvbcwXqb1D4Im5BcZJ6epVdP3Bdl sc9A9slKc5hXs8qQY85LP0eHqVN/TW0AoYE+g0tYBo9R/THyvGAAJxt/RsuTDTAlg4 s165+CJNCUAcAv+zB8o7RtfsIo3Oip1XoIuBKen59qYNX95pHYqnyK18ENhmkZ7k6n 7AvPCNpAyslzQ== Date: Thu, 5 Oct 2023 14:38:12 +0100 From: Jonathan Cameron To: David Lechner Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-staging@lists.linux.dev, David Lechner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Michael Hennerich , Nuno =?UTF-8?B?U8Oh?= , Axel Haslam , Philip Molloy , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 13/27] staging: iio: resolver: ad2s1210: rework gpios Message-ID: <20231005143812.42aff573@jic23-huawei> In-Reply-To: <20230930155536.5a5e982e@jic23-huawei> References: <20230929-ad2s1210-mainline-v3-0-fa4364281745@baylibre.com> <20230929-ad2s1210-mainline-v3-13-fa4364281745@baylibre.com> <20230930155536.5a5e982e@jic23-huawei> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sat, 30 Sep 2023 15:55:36 +0100 Jonathan Cameron wrote: > On Fri, 29 Sep 2023 12:23:18 -0500 > David Lechner wrote: > > > From: David Lechner > > > > From: David Lechner > > > > - Remove "adi," prefix from gpio names. > > - Sample gpio is now expected to be active low. > > - Convert A0 and A1 gpios to "mode-gpios" gpio array. > > - Convert RES0 and RES1 gpios to "resolution-gpios" gpio array. > > - Remove extraneous lookup tables. > > - Remove unused mode field from state struct. > > - Swap argument order of ad2s1210_set_mode() while we are touching this. > > > > Signed-off-by: David Lechner > Applied, 0-day ran smatch on this and it picked up that a log isn't released in an error path. I've fixed that up with a goto error_ret and will push out a fresh testing branch for 0-day to take another look at. ... > > @@ -546,7 +537,9 @@ static int ad2s1210_initial(struct ad2s1210_state *st) > > int ret; > > > > mutex_lock(&st->lock); > > - ad2s1210_set_resolution_pin(st); > > + ret = ad2s1210_set_resolution_gpios(st, st->resolution); > > + if (ret < 0) Exiting with lock held. There is an error_ret label that releases the lock so use that. > > + return ret; > > > > /* Use default config register value plus resolution from devicetree. */ > > data = FIELD_PREP(AD2S1210_PHASE_LOCK_RANGE_44, 1);