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 E0E1CC76195 for ; Sun, 19 Mar 2023 20:55:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229676AbjCSUzo (ORCPT ); Sun, 19 Mar 2023 16:55:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229805AbjCSUzn (ORCPT ); Sun, 19 Mar 2023 16:55:43 -0400 Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EAB912BD6 for ; Sun, 19 Mar 2023 13:55:41 -0700 (PDT) Received: by mail-yb1-xb30.google.com with SMTP id z83so10844639ybb.2 for ; Sun, 19 Mar 2023 13:55:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679259340; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Ac/NF/X3Ce1vR1hDDyKBTJ707og2BXuZP/lMQW+OCrs=; b=H/USSk17Fu5IdWFmU2HYEVwZ92SC2T/aL/5nOvlVpJeD0L0do87jcAsTliaBEz0MCA mMqeZBU9urZirZ7zxW11auSX7+tkHYp0K9XThAE/wLNlnvSVJ8GdNjd8zqxEnyfC6R+S bF0GNyNi0+l9Pp7ASmve9a2w4hwTf3i3d+4y1vux+85gQW4f0GI7kaHZLVj6jXu3zltE 7jVl7Q6CBsq+1I5qhe0Ga3XfgMounIvMwgwAAF156gYYGaIPQ8+xRHnk/kIV9uZT6MuK aofXXYTTc5isXyhzb02mMH9GFNLJv1AQNxp4DslX98DqL+NC2qt8ieSTjsvVDSUikCvp WBRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679259340; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ac/NF/X3Ce1vR1hDDyKBTJ707og2BXuZP/lMQW+OCrs=; b=4RztCWfSXG64MRFRV5lrupH+4cDL2UlWggtNrxHMaPQuA9mgRSOPyuouu6od27RVKF lt98WBdnkqkHHHM5OWp4Iy+7RiWcPmDCzcFSMCXtUDIiTZUs0T4WTL1gI44pVuN1gOuZ P4ji/39Fq37zN7tVDMsuj45wsVYxt/8hhPG3XvdRaGm6qYJ/5x01KC5+GHpeYQPvyDby Tz5opjsO3KONemVHQjGP4My3wtq1tV9FYEiCI4BaBrwuLjPQfzFlOODsp0WacHGGfoVc ulu+5lrucLqsX0QutwZEbopdTvulVT71XTl7jM4PY7foJZ+xJ4R4+QtY8geHrTIa4m8w Q4QA== X-Gm-Message-State: AO0yUKWhJ8cn/J5e3PCIbOmkBXxiascmsfLwgTFOma/+dVL32DVTtCDL IiNW60mKjfQDvRM9cA1fdnyXcNQe+Vt8Ao6dH8knQQ== X-Google-Smtp-Source: AK7set96jMMXsU1lpAmC3W40A6khl6vhFPSlLdYAPpPspd35ltaJhYbiXGg5BwG99gy+Dk9b8AqTCwMdTjF2Un45KI0= X-Received: by 2002:a05:6902:110e:b0:b26:47f3:6cb with SMTP id o14-20020a056902110e00b00b2647f306cbmr3222772ybu.4.1679259340445; Sun, 19 Mar 2023 13:55:40 -0700 (PDT) MIME-Version: 1.0 References: <20230310144721.1544669-1-robh@kernel.org> In-Reply-To: From: Linus Walleij Date: Sun, 19 Mar 2023 21:55:29 +0100 Message-ID: Subject: Re: [PATCH] pinctrl: Use of_property_present() for testing DT property presence To: Geert Uytterhoeven Cc: Rob Herring , Sean Wang , Tony Lindgren , Haojian Zhuang , Maxime Coquelin , Alexandre Torgue , Geert Uytterhoeven , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Matthias Brugger , AngeloGioacchino Del Regno , devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-renesas-soc@vger.kernel.org, linux-sunxi@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Mon, Mar 13, 2023 at 12:00=E2=80=AFPM Geert Uytterhoeven wrote: > On Mon, Mar 13, 2023 at 10:00=E2=80=AFAM Geert Uytterhoeven > wrote: > > On Fri, Mar 10, 2023 at 3:56=E2=80=AFPM Rob Herring w= rote: > > > It is preferred to use typed property access functions (i.e. > > > of_property_read_ functions) rather than low-level > > > of_get_property/of_find_property functions for reading properties. As > > > part of this, convert of_get_property/of_find_property calls to the > > > recently added of_property_present() helper when we just want to test > > > for presence of a property and nothing more. > > > > > > Signed-off-by: Rob Herring > > > > Thanks for your patch! > > > > > --- a/drivers/pinctrl/renesas/pinctrl.c > > > +++ b/drivers/pinctrl/renesas/pinctrl.c > > > @@ -125,8 +125,8 @@ static int sh_pfc_dt_subnode_to_map(struct pinctr= l_dev *pctldev, > > > * inside a subnode nor across subnodes. > > > */ > > > if (!pmx->func_prop_name) { > > > - if (of_find_property(np, "groups", NULL) || > > > - of_find_property(np, "pins", NULL)) { > > > + if (of_property_present(np, "groups")|| > > > + of_property_present(np, "pins")) { > > > pmx->func_prop_name =3D "function"; > > > pmx->groups_prop_name =3D "groups"; > > > pmx->pins_prop_name =3D "pins"; > > > > Reviewed-by: Geert Uytterhoeven > > > > This check is used to auto-detect if the standard property names > > should be used, or the "renesas,"-prefixed ones. > > As the last users of the latter were removed from DTS in v4.10, > > perhaps I should just remove these checks instead? > > Sent a patch just doing that, so you can drop this chunk. > https://lore.kernel.org/linux-renesas-soc/ff9c14781110bbf19b56b45dd1f01e6= da90319ad.1678704441.git.geert+renesas@glider.be So I need a new version of this patch before I can apply it I guess, or there will be conflict with Reseas stuff? Yours, Linus Walleij