Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2110386pxb; Fri, 25 Mar 2022 11:15:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSHYcjjrG8vFTlkb1LnBX8UwXt/SLxpYiS98MdSfKxZZpklbNiIDJG+D3nYasb99d6Vx8D X-Received: by 2002:a63:5c5c:0:b0:382:2812:9d9d with SMTP id n28-20020a635c5c000000b0038228129d9dmr641924pgm.227.1648232151615; Fri, 25 Mar 2022 11:15:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648232151; cv=none; d=google.com; s=arc-20160816; b=gJCZRzUOKAGB0LSyjzLB+1byKC9d4ERHX//Oo5wvnLdFlQiuuzhFN1iq3IwMjOFG2Q quvq6bzHHEBRjuurv2zwz/aCoS5k0wmGMLKBMKMEc627RiJLTslyzx/hQm1S1pSoAHTI WjpFTc0VcRA6oU/Mjet9XCOMXk7XV1jlYWO7DTUeOj5wLYX53G/t2nqPjAmWWUIa0mMs vf9abWUNeCkpu3aq8m2NIiVo80/WrZTU8gUEhzRvkUPcJ4+HKTqzLUXzXfDxku6lfCSg HGrUasLxAqGx9VxdvKkCRKiL/nb7DUNoYB4dKgzTAq5QopYX9w390Iz9XY5ezzWO0OL8 5OFw== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=CDd5bvBOgJNE2ytXtdK2RZTlUwQIpquV3qJmoWMbk88=; b=ZS9pLVF8ihivUEu1ZnVpKqEIhfv3bPBqR90mhTdUEkail4Hkeu2erLUVRPEBXQSCJr 5XKDblZafPfnTBANSJp3kX614JyrEJUCrTchUR2MoZADPB87+24fsVVbbe8MWU+W/eY2 3nkbjzaj9E0VNtxHKrRxhNsAcfwFYOTyfD6IY4K4OJ6bsfAR4ey42ESZ52a/HAimYuJc lUceN17VnObx62bTiNO8nMKd63cs1rQNGhmDTapFKUUeBnEPze3vHnIghW9IfiTMHgmM cC3sOinn94P+qpaRnQivQr6KU77UtlNkYORfOm4LvDCE0LULJ0cXGm3BQhstK21mazQK cbAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=hPwp5w4W; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id u5-20020a170902e80500b00153b2d16507si3320238plg.271.2022.03.25.11.15.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 11:15:51 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=hPwp5w4W; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 65848151D1A; Fri, 25 Mar 2022 10:44:58 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349191AbiCXJWZ (ORCPT + 99 others); Thu, 24 Mar 2022 05:22:25 -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 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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