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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DEB93C4332F for ; Thu, 24 Mar 2022 09:20:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349201AbiCXJW0 (ORCPT ); Thu, 24 Mar 2022 05:22:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232772AbiCXJWY (ORCPT ); Thu, 24 Mar 2022 05:22:24 -0400 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::223]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31D7C5F4FC; Thu, 24 Mar 2022 02:20:51 -0700 (PDT) Received: (Authenticated sender: clement.leger@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id C685760005; Thu, 24 Mar 2022 09:20:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1648113650; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CDd5bvBOgJNE2ytXtdK2RZTlUwQIpquV3qJmoWMbk88=; b=hPwp5w4WxcIyRQcVbCEwNC52okhKdKA4EUdP+PHuHN33g/Z3k2NsQSvOtmR+/Jmy1W9pSq xzsF11YXmw61VD6jeTorClvo7JDrHYrsWze0C2al+JRI91/wprOfFgeEovNHh+2BLEQVYa 1gW8BUscRy4VpscvT1FnlI9gRy874fs7kQp85qZxhvN/1gS0p+kRyUqZy2JbwJajCHptfq Tul/9hQCMMTT/lriMAMYOGfUqOiAsPYn+bWdefFhdwa8fse24ztyyH3UNtsudMHiYN1zMm jYSRpFQ7CP9tFs+H3wZ7l2AdTuJ9cTj7sTeI0WNmJe/mKUwEG5t+3appwuWWLg== Date: Thu, 24 Mar 2022 10:19:29 +0100 From: =?UTF-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= To: Philipp Zabel Cc: Rob Herring , Frank Rowand , Thomas Petazzoni , Alexandre Belloni , Allan Nielsen , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH 2/2] reset: add support for fwnode Message-ID: <20220324101929.00f51f01@fixe.home> In-Reply-To: <20220323172121.220a26e9@fixe.home> References: <20220323095022.453708-1-clement.leger@bootlin.com> <20220323095022.453708-3-clement.leger@bootlin.com> <20220323172121.220a26e9@fixe.home> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le Wed, 23 Mar 2022 17:21:21 +0100, Cl=C3=A9ment L=C3=A9ger a =C3=A9crit : > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if (id) { > > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0index =3D of_property_match_string(node, > > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "reset-n= ames", id); > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0index =3D fwnode_property_match_string(fwnode, "res= et-names", id); > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0if (index =3D=3D -EILSEQ) > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= return ERR_PTR(index); =20 > >=20 > > I don't think this is good enough any more. At least -ENOMEM is added > > as a possible error return code by this change. =20 >=20 > Yes indeed, errors are clearly not correctly handled anymore. At least > -EILSEQ won't be triggered. > >=20 By the way, even after looking at this more carefully, I'm not sure to understand why there is a special handling for -EILSEQ ? From what I understand, EILSEQ is returned in case the device tree is malformed (string longer than returned property length) but why is it handled differently in this case ? Thanks, --=20 Cl=C3=A9ment L=C3=A9ger, Embedded Linux and Kernel engineer at Bootlin https://bootlin.com