From patchwork Fri Mar 10 14:47:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 13169387 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 E9262C76188 for ; Fri, 10 Mar 2023 14:56:36 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Ke/jWOVhsh69I8d8+eUgix4Vd4QkIX1RH5C5r6EL+Zk=; b=EVZzDAbXKaXhiC T3FjhkASShhORdKgSAPzN5W9j5PHz4syfgTjqVS2PxWomNq1KypSqrGEV9QYXAkOz5azkjOhwVL2v jrk5KJA+UPSijyTgvjOJeFb2znkag1o+yq5cQeUL7BrgDYcvB037rjrITjG41ccQ2jkY7if646snu EX03hDA7ab2KpPuFCjKtWsYfPMI+kEH4+/E2hT/wJda80Ikt64uh91OC5+iGy5I8HG1S17V4i9WbF Jzj7RChz+yDNOEDAMlf3+k/w/YT13KuJTfbzcoGC338sbDFeP6wOGjoDhuVDNUWUtv85wvoI0OC2f hCDSWL8uKa9BQbvVjCMA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pae9Y-00Eqoa-Lb; Fri, 10 Mar 2023 14:55:28 +0000 Received: from mail-oa1-f48.google.com ([209.85.160.48]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pae67-00EpAx-8F for linux-arm-kernel@lists.infradead.org; Fri, 10 Mar 2023 14:51:56 +0000 Received: by mail-oa1-f48.google.com with SMTP id 586e51a60fabf-1767a208b30so6104969fac.2 for ; Fri, 10 Mar 2023 06:51:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678459911; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=JCpL7ocfi58njdErkPxcygUe6uPmxZK7sL4VjSYUEoA=; b=nMPSOJw+711KKCMWlOoh2DyxYyAP5m44qIjgYT4wxDgERBZ6ZRn0JlO1Y1oN69clfB +0Kv8YDaGGlRFCJ1G5rwQ46WEk5l+EgCo7yisHphBHZPWuTvj2wfmrS7WCOvBXLKDaYo Emcvd89MuZocOBLeYTwZoOwzXRFSL/MRY+T5oRLrFIoxxuZbDmaVA+Kj+DITdzt7Uzuo psudnwwO+DI+eFdLBQPn8QSbYNu+Ndy3yYs9G9/ge8rfcaz2D7Wwf7piK3UsP/cfSwVp hZJ4PeGYMCtQvYZHeVks0ieL/NlPMt75tjhxKjvfl+1A3VVRts/CQeav4NiHMGAAZQE+ J6SA== X-Gm-Message-State: AO0yUKUunBpUmtFSExGaMBhjVTBPf3BfFmvWfGxbpna40+ZlRakMyODV lAE7DMW2Gj/JieQMvw7xeg== X-Google-Smtp-Source: AK7set9LLLPhoeaA3/Sg53Plp3DTTBj+aU8Zy7fyHRUUAbXf8XfSnbThVAnP+AQCUm9GPyAxYbX8Pw== X-Received: by 2002:a05:6870:4195:b0:16d:f177:1a1a with SMTP id y21-20020a056870419500b0016df1771a1amr16870566oac.46.1678459911484; Fri, 10 Mar 2023 06:51:51 -0800 (PST) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id p12-20020a9d4e0c000000b00690df568258sm107688otf.63.2023.03.10.06.51.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 06:51:51 -0800 (PST) Received: (nullmailer pid 1546998 invoked by uid 1000); Fri, 10 Mar 2023 14:47:36 -0000 From: Rob Herring To: Patrice Chotard , Bjorn Andersson , Mathieu Poirier Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] remoteproc: st: Use of_property_present() for testing DT property presence Date: Fri, 10 Mar 2023 08:47:35 -0600 Message-Id: <20230310144736.1546972-1-robh@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230310_065155_329385_D7D8E37F X-CRM114-Status: GOOD ( 13.69 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: Mathieu Poirier --- drivers/remoteproc/st_remoteproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;