Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2544520rwd; Fri, 9 Jun 2023 12:56:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4xleLIJMYh1WfwnhjStDlXzBn1QKLDLc8X0ryyYHaqdVtBPZED2vxORNrhmsllxLk90+dW X-Received: by 2002:a05:6808:34a:b0:399:169:75d8 with SMTP id j10-20020a056808034a00b00399016975d8mr2311779oie.35.1686340610643; Fri, 09 Jun 2023 12:56:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686340610; cv=none; d=google.com; s=arc-20160816; b=MJEBhTscUSAzqMdZDzm6EdCxZiraIGeSUNXMkoe/X+NxQYLY2/a1x5SKTVNB72xcWB Iu3hPbuCc7VD+/1VV4Wdab3ZG76EpdtOFPslkeWnB30LgZoT6EVyMuJqs13aklGiG41f IbVHf30yQ46kjHnA+RzHnpXkNtPbrZ4JySIVFydhudj8MLW9mg5Hu7r0aqyminAT0F5G 7z6b9dyeUY6HzfAzJqpDxv7XrXwGam/RoG4IariaGaLJGsCOtsyiqRWYq2dqRgAPh3T4 ajC5dOzqYN3lVOtw2FWMjbBtgmtCVYynljN/ol3yBjq7oBoAS7wzJjnkC9lQsSfTA/0A 0qNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=rMoUuVCoy8iPi5l41BbPCFeIaC3DlfQ2sHoobxu0rd4=; b=kZgMZexDp7BKS5NS0MK3QWnrA0jxGCJvjGIfFPXmRm+4Y3bb09RurL6LBWumDFDFRf 18ylNOzwsW6Dm8nw/tc0XgqjuFX0BVB5aQG00SYwR1fc42Sx6VNl1Rql4kPcoNYkgLn8 9LvRfSo0ax7Vy8zEy/wafe1InwaPgXs1/6zj+z5U0KVPV8pbwBgMj9KIIc7PhXWPohgt xnk/72rbIbfzhYlRgrthlLPxcPC5jPcq2Qv7Uh2oEmQyyqiDE6ocKqL32OBFr7wZxH0h Ah3B299OAV/1V1jx9MLSGdbb/kJoFO8DMUeqc65Mxj7yocZVN6Obyz6NKREZzhvNf/tx ra7Q== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mi18-20020a17090b4b5200b0024e35ef410fsi3286883pjb.131.2023.06.09.12.56.38; Fri, 09 Jun 2023 12:56:50 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231207AbjFITdr (ORCPT + 99 others); Fri, 9 Jun 2023 15:33:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229695AbjFITdq (ORCPT ); Fri, 9 Jun 2023 15:33:46 -0400 Received: from mail-il1-f173.google.com (mail-il1-f173.google.com [209.85.166.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40B8B2D44; Fri, 9 Jun 2023 12:33:46 -0700 (PDT) Received: by mail-il1-f173.google.com with SMTP id e9e14a558f8ab-33b3cfb9495so9284855ab.2; 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=ZtkZ3qDX+p1flp8mOZ5JocGwjrh9j8wWAmeMehGXb5lKuO0UjHWEP/BucywwG2QNCH Ll6OWk1RyzoQwvEcvS9edGerud6DeXl5U+rBKiRWjHPtyer2pivXBamWXw7NYE9Im+2w j/jUy4ftWPgfF5OF4nAl18xvYEtw91fPEZZouNUdCEEBqEJs/ORdWSmieFQqzBlUPlbX t3lYVp2fdaCpJBhEB/R/+fvwb3uGy2IwfRXNVhd9ZCtUjatKAoS5AvFRNTGtegrJH8y3 UkyzMikfQdoUelESVU8qpmVI9dGexSW7FT4NtD1f8psPrKbDkwxzXxfkgfMC1j0eWYBx cSpA== X-Gm-Message-State: AC+VfDwIt4Jumy+qGMroxheORktZRE9Z5wdYik6sjYmZ4LVVOHPuy5XU 54DmxXqxbvN1rF353lUCqQq/Qicfjg== 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=20Wilczy=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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 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 --- 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, -- 2.39.2