From patchwork Fri Jun 9 19:33:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 13274320 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 62F30C7EE29 for ; Fri, 9 Jun 2023 19:34:21 +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=dg2+U0+ZZxdY1MxVJPLDDetgLG5VbNhdus949SUVcJM=; b=vdf3hgnDD7Jjr0 s0Xw/5zkuXDelT61DfwVvrYrd+WvHP8Umnp3RVgrCir5vXqBKUYWwN4OhaNDUlBBfVdEok1DAba7T 7W5dohRuhIsklobht4/ONoz/e4vtvjC7C1zPZSqGFfI5uvu+LAz5DlShsgdx+TQY8yaTD3f6XzdtL zStwZKlhmnFm8aI7wJzZTwyhDy7O0NRrHXXRj1IGjUM+tRoK+ZhN7FVyzW/pEtKzU5VUUnivNzxVv xQ2ukt18yRTtK9thEpKqXScFtv3gK0YM2zqNLXnFaS0+lMcp+9x7TAYQ4Uq9+SxK0NWERwdXXKMFP 7d3AMpSmpW5WyhA9NspA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q7hrx-00E0vZ-0i; Fri, 09 Jun 2023 19:33:57 +0000 Received: from mail-il1-f175.google.com ([209.85.166.175]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q7hru-00E0tL-2a for linux-arm-kernel@lists.infradead.org; Fri, 09 Jun 2023 19:33:55 +0000 Received: by mail-il1-f175.google.com with SMTP id e9e14a558f8ab-33b0cae115bso9302855ab.3 for ; Fri, 09 Jun 2023 12:33:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686339225; x=1688931225; 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=rMoUuVCoy8iPi5l41BbPCFeIaC3DlfQ2sHoobxu0rd4=; b=Yw0GR7yptHi+aqY7PRGpYZ648KW1hFYeP8uX+4e7w2fgl23ey6UR0IpCinT4atIjq5 JGaOsVwQmN8uyPFNL9O9TQhQg2wnBXV0gE4NU1OQVqttxWs2iksnJnJxQK/qIbCN9ozD dVgi7Kny2BahCQx5RX9qY4US26TnZozrBJkCE3RXFnvclCtHOa/XoxFvQj9ZGFNjPzFV OXs0YjGSmdsFSSb53B1tfvaKHDXzW8FOQUdss5o+fpQQLpSnxi+mshKHAUrTSc0Zthhg 1EWbkM3sgEXzCWCUCpmRSRuUYWoktbOlO/14MTAWgFII1CrjszSgWvJoV5LopsN4ax9g x1RA== X-Gm-Message-State: AC+VfDx4QABhMbYqBWId8LoTwT/jbd2nrMlDE6AmCyzQ+Wd3GJn3gbux NrXi+6TPr8do6uAZFG9reg== X-Google-Smtp-Source: ACHHUZ4pduV4nm+kOOf2LCKJZuG86VPl6p4jzzFbmjKFwp6EFkNLZ/0POAfMsLj1enQS0YlNO+g2ng== X-Received: by 2002:a92:c149:0:b0:338:c685:83d1 with SMTP id b9-20020a92c149000000b00338c68583d1mr2607823ilh.10.1686339225462; Fri, 09 Jun 2023 12:33:45 -0700 (PDT) Received: from robh_at_kernel.org ([64.188.179.250]) by smtp.gmail.com with ESMTPSA id i8-20020a056e02054800b003248469e5easm1264744ils.43.2023.06.09.12.33.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Jun 2023 12:33:44 -0700 (PDT) Received: (nullmailer pid 1963853 invoked by uid 1000); Fri, 09 Jun 2023 19:33:43 -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: linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] PCI: iproc: Use of_property_read_bool() for boolean properties Date: Fri, 9 Jun 2023 13:33:25 -0600 Message-Id: <20230609193326.1963542-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-20230609_123354_847161_17842179 X-CRM114-Status: GOOD ( 10.86 ) 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 of_property_read_bool(). Signed-off-by: Rob Herring Reviewed-by: Florian Fainelli Acked-by: Ray Jui --- v2: - Commit msg: s/to to/to/ --- 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,