From patchwork Fri Mar 10 14:47:19 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: 13169356 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 5F991C6FA99 for ; Fri, 10 Mar 2023 14:50:02 +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=D1xD1el4CDKsA5rWLJI7E5oVjqupjsNYLLMyGG61qhw=; b=ghMx9yp46Ty6nz z8mr7GW1n0NprHQPKe5n8rw0J2fXJftDwWRvS+smuazU5Ufsnvt9Ja0pgTpGOASI/EqoG1mf5OZtr VYXFTUhpg+rqdr1OAioC/U0Le8m4QRl6UNMOhTAG3QninwfkMo4lemup2ltKRtoCl8GkPTE+3lZa9 DH85L9f4m/G/YNxowHGNEAgOlwB6bYipjIUxF5i+hSUWjWL32HjzA+a5028m7AMumyHY1Frs3Cfos MKhb4TiXilXgYUXI2rJY0IbDkqpfWXUH0GJdN0+81HJ7QO535Lb3kIrHMClvY8fncBOqsBqVc03tv aKBBSCvQ42Lci8sIWFOw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pae3I-00EnRI-Bo; Fri, 10 Mar 2023 14:49:01 +0000 Received: from mail-ot1-f45.google.com ([209.85.210.45]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pae2Y-00En2t-Fe for linux-arm-kernel@lists.infradead.org; Fri, 10 Mar 2023 14:48:15 +0000 Received: by mail-ot1-f45.google.com with SMTP id 32-20020a9d0323000000b0069426a71d79so3024174otv.10 for ; Fri, 10 Mar 2023 06:48:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678459694; 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=Uh2zryUkVS9JH/QLtNCRYYvxt5QfZNmyGLsJzwETiPA=; b=HCQdCazofLLZ0zsxTHfv/tz+0JvPI1zvKVEB2ttSasWXpqWVyV7Mta9yZYY4Mj0dfe Cm+PufbJOoOxUBtE7NQhMH43XGR1suDxdGUGKCpYfIypYeNtKFae8EYw9q62LpT7QOb1 GWv6sKUokeJWVAlv4XXWH+lFB6O2QirfdknCus0QikU6FASShaiS5zh8LK+8LWJ8KAlX toN7CRs8enoV/o7WPxrwQj88tAFkotLKc56fPdSCXgUjEgD4USD+UAlrfJWQvwPvAUws hfPnIy+KCcBD/hsgDdfPBzVRzHTTYevLMlo7kwiq4dKOsMGwvOko0VUNGMHGwX/pwSGs JjkA== X-Gm-Message-State: AO0yUKWfDOesTPot1eW7emD2b0NN/lvhdsO7XWq6iLl2966rXAbXuT5o AT2xPEa74lp8kIwo7b4inQ== X-Google-Smtp-Source: AK7set/AI2jpctLr/vDtjPcpG63rmnfkLhITd/XYQW/Dp2aBtAkDBQvwBtBBs175QmuTl8wItwS5lQ== X-Received: by 2002:a05:6830:82a:b0:68b:dd5a:d99b with SMTP id t10-20020a056830082a00b0068bdd5ad99bmr13888196ots.31.1678459693800; Fri, 10 Mar 2023 06:48:13 -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 63-20020a9d0845000000b00690f6d9a737sm135299oty.8.2023.03.10.06.48.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 06:48:13 -0800 (PST) Received: (nullmailer pid 1544557 invoked by uid 1000); Fri, 10 Mar 2023 14:47:20 -0000 From: Rob Herring To: Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy?= =?utf-8?q?=C5=84ski?= , Bjorn Helgaas , Ray Jui , Scott Branden , Broadcom internal kernel review list Cc: devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] PCI: iproc: Use of_property_read_bool() for boolean properties Date: Fri, 10 Mar 2023 08:47:19 -0600 Message-Id: <20230310144720.1544531-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_064814_558468_EA155DA4 X-CRM114-Status: GOOD ( 11.70 ) 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. Convert reading boolean properties to to of_property_read_bool(). Signed-off-by: Rob Herring --- drivers/pci/controller/pcie-iproc-msi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/pci/controller/pcie-iproc-msi.c b/drivers/pci/controller/pcie-iproc-msi.c index fee036b07cd4..649fcb449f34 100644 --- a/drivers/pci/controller/pcie-iproc-msi.c +++ b/drivers/pci/controller/pcie-iproc-msi.c @@ -525,7 +525,7 @@ int iproc_msi_init(struct iproc_pcie *pcie, struct device_node *node) if (!of_device_is_compatible(node, "brcm,iproc-msi")) return -ENODEV; - if (!of_find_property(node, "msi-controller", NULL)) + if (!of_property_read_bool(node, "msi-controller")) return -ENODEV; if (pcie->msi) @@ -585,8 +585,7 @@ int iproc_msi_init(struct iproc_pcie *pcie, struct device_node *node) return -EINVAL; } - if (of_find_property(node, "brcm,pcie-msi-inten", NULL)) - msi->has_inten_reg = true; + msi->has_inten_reg = of_property_read_bool(node, "brcm,pcie-msi-inten"); msi->nr_msi_vecs = msi->nr_irqs * EQ_LEN; msi->bitmap = devm_bitmap_zalloc(pcie->dev, msi->nr_msi_vecs,