From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E7920EE49AB for ; Fri, 25 Aug 2023 21:08:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CAhoCLyrI67+LHKIAZqh+KlNpZUAVcg/kY0HaQZhCis=; b=NpkPQNS3jrVxwAszOzUpRzBGq9 kHvhEdumTHUprDsQGrmfvSK7Md6iPuzUkspINgPSiz5W1UEm3g47NyXzeRZIgkX5gL8z+CqI3icwn hXJy/vgBxyBHWgLXuy8XqRYFqkqqYpLMGa4kNXYNwJbcOgjoQrr9w54nc2Bw/wRp7DM6/qc30lacQ hzBCK7FJ37WrIxLELmUhIpKsC1+533+Kxoex/hatG8yv9AIW79njrpXdTq9o6rrXBNhXh44nH3t3f dxY7sKc/yv+zWIMOVTQIIES/WtOHHzLbYmXv7PZW3l2w4XoFhhPaYXjrEpo3k+BCWkx2PBRyguiTV Sm+GuIkA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qZe1q-0061ov-0P; Fri, 25 Aug 2023 21:07:38 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qZe1o-0061nw-0C for linux-arm-kernel@lists.infradead.org; Fri, 25 Aug 2023 21:07:37 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EBAAC62CEA; Fri, 25 Aug 2023 21:07:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BF8E0C433C8; Fri, 25 Aug 2023 21:07:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692997639; bh=AfwgcpgMJ3ts5+daIGnYlmv38YNu2CUhdi9Z7+mMO34=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CCOgoWC3wfKwG2sZ6tqsHoUGBKyWZO5pVLHYB3hNbiNe4cu4m5lqi7OlzpSGReipL Nkl1ttVVRuI78ChJA+LO1vUKmtklXfhsixTsguPq4qbdFDrC5skQcdN7EfTq1EkVrQ 3WZL3Dpn5OAXKLDFHGtuaWZBv4YVX7KkyUXZddFUfnhA4OXiHb+439sU5/kqMDeb0T 5iZ47KbZt5rzJHPGHKxUnLMUs4m19YKpPgrR30ydn03Gi3BBs5pW/0yryzjsK6ecmi XL7ny58PV6s5UvPO8VN2FUI9BVzHhkp0LpJGJngermNGWUOVlJWgCa7KktaPQl9+x9 QUL/NCmfYtAZA== Date: Fri, 25 Aug 2023 23:07:15 +0200 From: Wolfram Sang To: Jinjie Ruan Subject: Re: [PATCH -next v3] I2C: Make return value check more accurate and explicit for devm_pinctrl_get() Message-ID: Mail-Followup-To: Wolfram Sang , Jinjie Ruan , linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux@armlinux.org.uk, linus.walleij@linaro.org, Codrin Ciubotariu , Andi Shyti , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Oleksij Rempel , Pengutronix Kernel Team , Shawn Guo , Sascha Hauer , Fabio Estevam , NXP Linux Team References: <20230821032914.1976317-1-ruanjinjie@huawei.com> MIME-Version: 1.0 In-Reply-To: <20230821032914.1976317-1-ruanjinjie@huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230825_140736_210496_721538BF X-CRM114-Status: GOOD ( 17.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Andi Shyti , Fabio Estevam , linus.walleij@linaro.org, linux@armlinux.org.uk, linux-i2c@vger.kernel.org, Pengutronix Kernel Team , Claudiu Beznea , Codrin Ciubotariu , Oleksij Rempel , Shawn Guo , Sascha Hauer , linux-arm-kernel@lists.infradead.org, NXP Linux Team Content-Type: multipart/mixed; boundary="===============6194062526386736218==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============6194062526386736218== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="DBWPSrDkDaaAxt7q" Content-Disposition: inline --DBWPSrDkDaaAxt7q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 21, 2023 at 11:29:14AM +0800, Jinjie Ruan wrote: > If pinctrl is not available (thus devm_pinctrl_get() returns NULL) then > recovery can't work, because we can't switch the I2C pins between the > I2C controller and GPIO. So, it is quite correct to print > "can't get pinctrl, bus recovery not supported" because the I2C bus > can't be recovered without pinctrl. >=20 > The PTR_ERR() is also fine - because if pinctrl is not present and > returns NULL, we'll end up returning zero, which is exactly what we > want. >=20 > However, open code that with a more accurate message will be more explicit > for NULL case when CONFIG_PINCTRL is not defined. >=20 > Signed-off-by: Jinjie Ruan > Acked-by: Oleksij Rempel > Reviewed-by: Linus Walleij > Acked-by: Nicolas Ferre > Suggested-by: Russell King (Oracle) Applied to for-next, thanks! --DBWPSrDkDaaAxt7q Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmTpF/8ACgkQFA3kzBSg KbYfLw/8CPpUq5HQ48s50MZyWKNfih7hLAG6WGOHo3cgPZgn1Ln1T0aYnAB6D1SH imuYX4dUMTQJIlhUWaCG0ocitkYxmqhsMQ7zvxqXtEyR1q3dDhnLpuIUFzuhfSJU oG7ss2I6H9dqrCF4K6SLAKYadtQk+VApok//JnLxWVd8/DDf1172I7/bODwrGvB0 7eR/PgQuY+nfqenwR8QtmjLIn+kuCITMuZyD3RYQHLWzHooTAKbAVkvG9cEZ/uLK kPGPlhDTNQgi9b2xRG+oQWNHI/P9l+CkJoYJuLQlgYij/8dIA4zHISR5bhYgmNOu hmWf99e7MXPygNznASWNmcSDat9a1iLl2Oic7OxeL6/tN6TwgyfbxnI3YM1PPEYw kJhsN6Cy/k6BkkJzEYbv96XKJuh+kW4ekDvnOSW3fcy/Bhw5SAjgK0fBhGJ/nQsg sBF3ahZqniotSelyIAxg8C/e+oVmo2OesNuQqDkZwbKDrJ+xHkIFiSp5WgaSq+NN XH+Hs/ewcUGtxBIJkwlpiLdsdFSIdkt1sC5y4lvDVTjVF/u0RNJGO2C/S63VZV1w sPLl/1of5/ijUZ2hNGNeVLAMepgzyDpZgqSNT/qwpzyuz6IKkTEgSyXBe1/UqkgO BHeOKM/4Er8v6/4v8zKRX0d7v2odptwaCD4oKBFIMooO8A0Y2V0= =KaV8 -----END PGP SIGNATURE----- --DBWPSrDkDaaAxt7q-- --===============6194062526386736218== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============6194062526386736218==--