Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp5906332rwe; Tue, 18 Apr 2023 13:28:53 -0700 (PDT) X-Google-Smtp-Source: AKy350aWahU7cBFEGoBV70lq7JyFu8BggEexxPLOnwHoeRqE3Z0crbkkvN09cxiJHoa3vNr2dytL X-Received: by 2002:a17:903:32c1:b0:1a6:3ffb:8997 with SMTP id i1-20020a17090332c100b001a63ffb8997mr4065384plr.42.1681849733758; Tue, 18 Apr 2023 13:28:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681849733; cv=none; d=google.com; s=arc-20160816; b=o1yKamy0pgoDXUvzb8Ka71Kez0x5dgl4YhX7dDcvdYTWXaJq1qpqV6gkkku4aeHMYC sK0fs4PF1PW7gs6O6eMZXUox2SA8TtbZo2pDQ9c0y7VRPLcD+gzb9Qe1eCORBGONIV07 rBvHQsi9K3/1jeLBS1bglbBK7wCgMnFW9Pa1wcIJuVWPNHfLvhb0g5N9laPCGfKte78p DfF6o/iMZfCbP1rBd3qkrrHDg3Ov5eJgcWdMcZI8pk7GwV6hkIfR3teNE3QiQ5mlHJuE XOzPdnttc1WfNN877e7xpgLD/xTFe91rYNv9tmbbdtmbfZrK3pwrmghp8THKIfXkCMCU 9CXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=I1h5VMD8irVNgEXz9YvfZ3zmENpujirJNHAjn+rYAZE=; b=M7OoU3s1fKY8q2Pp6xvX6vKn+VUIM8FJkOZTL4ecCiwNIUbhgnHS0ZlGzd3kaR8hf5 6Mc/UKVVLupEX9hQnwbzDtzNOMdQq4/hqvM9o/K7kUiSuGlCijarIW98YyzG3qWT2L3r Uwl6nb+eZvI3dqOjBks59JxSwbrbt4XiUXy1e8dloTJnn1LWyRIGK798TrIvso9AGucE VCmmrb7N2lVylng+j6s7/nWWPQ9oHEiu9dRzfP+WUjk16idKj/2+pHKdLjDKTdPoMK7C j6XrgUCseGMAz6///nRAS5iCWICc6agx48ZPZIzaR+lDDvWIGTwIKm8gMzX5gCa7M+jc 55iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=twMxLwYO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j7-20020a170902da8700b001a52db202c7si2262450plx.382.2023.04.18.13.28.43; Tue, 18 Apr 2023 13:28:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=twMxLwYO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232331AbjDRU1u (ORCPT + 99 others); Tue, 18 Apr 2023 16:27:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232521AbjDRU1q (ORCPT ); Tue, 18 Apr 2023 16:27:46 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7D6D9F for ; Tue, 18 Apr 2023 13:27:44 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-2f7c281a015so1752947f8f.1 for ; Tue, 18 Apr 2023 13:27:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681849663; x=1684441663; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=I1h5VMD8irVNgEXz9YvfZ3zmENpujirJNHAjn+rYAZE=; b=twMxLwYOZ6dC9LrYkN1FQPYT1IcxPWPd6k0ixiWIZHb7qZscLoKqG7eabN3ZU/rsFh 2M+I2xQaOcgP9vhaYR9qr4c19iBxlCOu/q/hxy1UJOwtnAh0BnSMoFfr+dqy2JTgsD1z ou6giTAVLv7aIBcjvnj5ncSAnb5HS1Oe8BjwVZe8eQ4HluDCrjoO2OR+D+a5pN0ojavO 2nGLsAKvWML5zjkuOQfyoVeIpVz/6iEDmuILxZRtKdQSt+f63ebVZTqpgAbzPriyjQKM CgDKE/jU8PbMKVOr2/Sd1d/g7nlB+ckoHqacVEB5Lr7Eo0PzaAcMnf89tSID4IMbNZdx 7CRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681849663; x=1684441663; h=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=I1h5VMD8irVNgEXz9YvfZ3zmENpujirJNHAjn+rYAZE=; b=cElrwEo5KDlud9lMLoLgXHxUwNIUAAGSnqOnaQlJ/QAUJvlXD+oEYjJwTG81oNzLLB 6sFjau8n1RNZZTWYQoNllF4/M8SSzhZrkV4CaATMtHm76L0Zc20/uebF0IfD6oVcHbQ7 ZKyRTZDdaswnubIqcceM/KAgMKS2Uo75TfOWGpXl4IDGTEwpvZm41gkREjWWsjjw1lKC URo3q2cE7dVK3E3LdMWkH8btwjcJ6khx/psYqQLa3Wn2J/yWce6sGc7FG1kRQhOvZc5x 3LxCrEB/ThNx8XAqj0+GsOL9tRlzlGD86Aqck1s4YlQuYRGYSM6DlGWqEP7fI9VV0yUL Y8AQ== X-Gm-Message-State: AAQBX9eDvQNJ8ai2waOks8qRwhUx0IIm/oxdH5O1NPXDdVTcbURNHx1M JgWvQu1clndJSVYuRMMEKdrn+dPtsQgEtQSky0tKiA== X-Received: by 2002:a5d:4f05:0:b0:2f8:cd53:d882 with SMTP id c5-20020a5d4f05000000b002f8cd53d882mr2271901wru.56.1681849663050; Tue, 18 Apr 2023 13:27:43 -0700 (PDT) MIME-Version: 1.0 References: <20230310144736.1546972-1-robh@kernel.org> <20230418162635.GE1764573-robh@kernel.org> In-Reply-To: <20230418162635.GE1764573-robh@kernel.org> From: Mathieu Poirier Date: Tue, 18 Apr 2023 14:27:32 -0600 Message-ID: Subject: Re: [PATCH] remoteproc: st: Use of_property_present() for testing DT property presence To: Rob Herring Cc: Patrice Chotard , Bjorn Andersson , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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 On Tue, 18 Apr 2023 at 10:26, Rob Herring wrote: > > On Fri, Mar 10, 2023 at 08:47:35AM -0600, Rob Herring wrote: > > 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 > > --- > > drivers/remoteproc/st_remoteproc.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > Ping! I did provide an RB for this patch on the same day you sent it, thinking it was part of a larger refactoring effort. But taking another look now I see that it is not the case and will apply it right away. > > > > > diff --git a/drivers/remoteproc/st_remoteproc.c b/drivers/remoteproc/st_remoteproc.c > > index a3268d95a50e..50ef40671652 100644 > > --- a/drivers/remoteproc/st_remoteproc.c > > +++ b/drivers/remoteproc/st_remoteproc.c > > @@ -379,7 +379,7 @@ static int st_rproc_probe(struct platform_device *pdev) > > clk_set_rate(ddata->clk, ddata->clk_rate); > > } > > > > - if (of_get_property(np, "mbox-names", NULL)) { > > + if (of_property_present(np, "mbox-names")) { > > ddata->mbox_client_vq0.dev = dev; > > ddata->mbox_client_vq0.tx_done = NULL; > > ddata->mbox_client_vq0.tx_block = false; > > -- > > 2.39.2 > > > > > > _______________________________________________ > > linux-arm-kernel mailing list > > linux-arm-kernel@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel