From patchwork Fri Mar 10 14:47: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: 67517 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp953282wrd; Fri, 10 Mar 2023 08:02:59 -0800 (PST) X-Google-Smtp-Source: AK7set/U9/ECfvx2CvX8+MlxYIZzXUD/fjuJp/bXsfKPC+F4hVp67CYUT0e37p2NrP2mK6bcjNsa X-Received: by 2002:a17:902:ba83:b0:19d:14c:e590 with SMTP id k3-20020a170902ba8300b0019d014ce590mr20584223pls.9.1678464178686; Fri, 10 Mar 2023 08:02:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678464178; cv=none; d=google.com; s=arc-20160816; b=vNyHn7Fnp4HcB858+nfsrvGAG59mwEqEm6AIEuhPZBtAsBzMIzLROMJkrEJR1DERxq 25YACPH2hsCDL5HE0sJPzHlW5NjyPX+XiT+yWU0ZAcxL53X005mTXUgRh2AqByhz8uJM BkRWqeLw1du+RXDtb5MbM2ZA0YLtDt17PqdwSWfXwJo/A6x9VbcUmG0/1ZCJAl8qtr06 CeX5m7IOxYfIJOxOIYdWnb7MSRGqIMneg2vSHdDxU4IvsO6caIo2RgEV5H5scSMO4Y8E KTeU8ezEP18oOApDWJixBXbbbgKZffglNGMZfrBZK1TJEH9bQ/cr78lEGNqwYvH+1+VA 0MvQ== 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=W60syQtwwLaj9P+ywSF+QbHoeubN8UmWjHL9quZCQYE=; b=wRALzk4aSTMMNxU3XE08XC3eCwZQ5nd729jWpwObVl1xA6XGxPmVhMg9Cr6ypTNtSe yAmsvaoU8HUGCXYYtleY8IxrXn6Cp+soXBD2IreOme1gOROQDlsALY5x1RY42dsV6CWv k8HH4K03mdW9HqOqOSmu1Oyxm4n+7dkoNRqXPqthzqRfRQ8t3AQXUmw5jJnGJTrBduqu wqxzxjdBNx6ioZiWvF92AB1xIQwvc8n/xj3oCurGUpe75SppfqmmxMDoPYy3XapCqrIo l0a/oCcbqGVzeGrRis2QdaxBGkvx6UoVoaIwa7OCDbp8yOe1McHjxck8x73NkVJBCWup U/BQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d5-20020a63ed05000000b005072b0d67e2si81860pgi.845.2023.03.10.08.02.43; Fri, 10 Mar 2023 08:02:58 -0800 (PST) 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 S233613AbjCJO4u (ORCPT + 99 others); Fri, 10 Mar 2023 09:56:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233804AbjCJOzW (ORCPT ); Fri, 10 Mar 2023 09:55:22 -0500 Received: from mail-ot1-x332.google.com (mail-ot1-x332.google.com [IPv6:2607:f8b0:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCED612E156; Fri, 10 Mar 2023 06:50:45 -0800 (PST) Received: by mail-ot1-x332.google.com with SMTP id q11-20020a056830440b00b00693c1a62101so3127448otv.0; Fri, 10 Mar 2023 06:50:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678459715; 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=W60syQtwwLaj9P+ywSF+QbHoeubN8UmWjHL9quZCQYE=; b=gAzTao1URwvJGwBkg52laENNZNisLzuFUPERyrNMtlEDWqSwzv8BtNK54ymL73O1P3 Mwn//BdnHPt0AwdHb4hpjHm9DgBG6lhgxdxCNxj1CWTrKVTbm2WLoPFpPhJSJpCQTfVg liJUF1dp/MMijz7m6Y//lBu45uUtsByr9K6ujJEe037zJhhpUZr5pi0clIip2EN4nJk/ A4ndlkBv5jARdTSyO/ZrwXART16ubxtMFr5E7kwqFf5hTjjCQjuSJw3/2HFDCdeERe/P Wx3xRaE2kSQJs8zGA9D3MvMrxtvtKGI5aWwGwnSPTKwDOY99dZmQ+mOGNiXtWHybK4q4 1s1w== X-Gm-Message-State: AO0yUKXZuZY7rN6QHozA45eAb2uZ6hPx4+XKFzQZA9JMcK6twK3OGsvk pxTHrnijp0Mdo42YRpnlbw== X-Received: by 2002:a05:6830:920:b0:68b:c60c:de58 with SMTP id v32-20020a056830092000b0068bc60cde58mr16173226ott.7.1678459715123; Fri, 10 Mar 2023 06:48:35 -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 z27-20020a9d71db000000b00690e6d56670sm129880otj.25.2023.03.10.06.48.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 06:48:34 -0800 (PST) Received: (nullmailer pid 1545500 invoked by uid 1000); Fri, 10 Mar 2023 14:47:26 -0000 From: Rob Herring To: Nishanth Menon , Santosh Shilimkar Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] soc: ti: Use of_property_read_bool() for boolean properties Date: Fri, 10 Mar 2023 08:47:25 -0600 Message-Id: <20230310144726.1545453-1-robh@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759997254138896535?= X-GMAIL-MSGID: =?utf-8?q?1759997254138896535?= 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/soc/ti/knav_dma.c | 4 ++-- drivers/soc/ti/knav_qmss_acc.c | 2 +- drivers/soc/ti/knav_qmss_queue.c | 2 +- drivers/soc/ti/wkup_m3_ipc.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/soc/ti/knav_dma.c b/drivers/soc/ti/knav_dma.c index 84afebd355be..0fbc37cd5123 100644 --- a/drivers/soc/ti/knav_dma.c +++ b/drivers/soc/ti/knav_dma.c @@ -666,8 +666,8 @@ static int dma_init(struct device_node *cloud, struct device_node *dma_node) dma->rx_priority = DMA_PRIO_DEFAULT; dma->tx_priority = DMA_PRIO_DEFAULT; - dma->enable_all = (of_get_property(node, "ti,enable-all", NULL) != NULL); - dma->loopback = (of_get_property(node, "ti,loop-back", NULL) != NULL); + dma->enable_all = of_property_read_bool(node, "ti,enable-all"); + dma->loopback = of_property_read_bool(node, "ti,loop-back"); ret = of_property_read_u32(node, "ti,rx-retry-timeout", &timeout); if (ret < 0) { diff --git a/drivers/soc/ti/knav_qmss_acc.c b/drivers/soc/ti/knav_qmss_acc.c index fde66e28e046..3d388646ed43 100644 --- a/drivers/soc/ti/knav_qmss_acc.c +++ b/drivers/soc/ti/knav_qmss_acc.c @@ -521,7 +521,7 @@ int knav_init_acc_range(struct knav_device *kdev, info->pdsp = pdsp; channels = range->num_queues; - if (of_get_property(node, "multi-queue", NULL)) { + if (of_property_read_bool(node, "multi-queue")) { range->flags |= RANGE_MULTI_QUEUE; channels = 1; if (range->queue_base & (32 - 1)) { diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c index 48de98560093..0f252c2549ba 100644 --- a/drivers/soc/ti/knav_qmss_queue.c +++ b/drivers/soc/ti/knav_qmss_queue.c @@ -1264,7 +1264,7 @@ static int knav_setup_queue_range(struct knav_device *kdev, if (range->num_irqs) range->flags |= RANGE_HAS_IRQ; - if (of_get_property(node, "qalloc-by-id", NULL)) + if (of_property_read_bool(node, "qalloc-by-id")) range->flags |= RANGE_RESERVED; if (of_property_present(node, "accumulator")) { diff --git a/drivers/soc/ti/wkup_m3_ipc.c b/drivers/soc/ti/wkup_m3_ipc.c index 343c58ed5896..6970478b40f3 100644 --- a/drivers/soc/ti/wkup_m3_ipc.c +++ b/drivers/soc/ti/wkup_m3_ipc.c @@ -681,7 +681,7 @@ static int wkup_m3_ipc_probe(struct platform_device *pdev) dev_warn(dev, "Invalid VTT GPIO(%d) pin\n", temp); } - if (of_find_property(np, "ti,set-io-isolation", NULL)) + if (of_property_read_bool(np, "ti,set-io-isolation")) wkup_m3_set_io_isolation(m3_ipc); ret = of_property_read_string(np, "firmware-name",