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 (Arm)" X-Patchwork-Id: 13169361 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 6C6F9C6FD1F for ; Fri, 10 Mar 2023 14:52:35 +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=146Uk5jCF8+u3u7iE8PMnBf1Vbt4ckJFuHziEtAmYks=; b=K4P1UssuN7yEvk jO+UaXv996qyFHVvJWFkqBRYkPmsHcXxpgTHe8juBw6IVm6PU9VEcdlKxg/bJHBW1BgobsMQKWD+7 lZPs5sTyCJXH/0iEgmBdniYAv2JN2O+ZDNeEIZKm5T062nILT1LMPXI30EgA/l742dHM/1huqgUvC 11s781m8Ury9jlW25gzwwDwhRFMUW3n5NaFR/9pn2nt6JzQwWfnA0Le0jFYojZtsuQoD7+j4iMNz3 hTcqxYCawdATYLAg6JdmAm+2c8rJM8F1oEzdOJaJ+37l8xI2xjw7jz4cFn1YdNV91D3YthVByfXzH 9QFgK4ocXfsGLuSScwQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pae5d-00Eou9-8P; Fri, 10 Mar 2023 14:51:25 +0000 Received: from mail-ot1-f51.google.com ([209.85.210.51]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pae2t-00EnFb-RY for linux-arm-kernel@lists.infradead.org; Fri, 10 Mar 2023 14:48:37 +0000 Received: by mail-ot1-f51.google.com with SMTP id m25-20020a05683026d900b006941a2838caso3034606otu.7 for ; Fri, 10 Mar 2023 06:48:35 -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=nc19PyAGIxyi+33aMpz+3rzbmJCpc4CxsqGC/bLf8zYH8d14tAhUU4hl/9ey7vFELX MUV8WDA2HNloE/m0HRQHhZ/WaIkWncmvlXEIA1Ywb1SR8LLKvCa7yNViM1RvR/enARlU Dvz76rMv1uRbHuJq+00qS5kVPzwN9f0M5Q8tlmvq8PSWxia9Eut7FdpGB57Oxd5nAcJZ ayYfSWtnPieylraqSWVZaQ6RtevIgTsK1oPXV0MmRVM2Cnn0HTmFQcz66oWh1ExmvnCh JNjtjZDl8ENckPV5neSkbpraIAYvG+Mm+IvGmNPeR6r8fsj45AES9csaRPtEgOcgVJV3 g0yQ== X-Gm-Message-State: AO0yUKVg6Z6Ryv+259tGuMNK8SjBo1hML2UF3u1ZeBo6dsjkEZXePH6s B3Ni8c9MDLlC2vyZBlVwSCTFb7UWGg== X-Google-Smtp-Source: AK7set8tVsqa9HhLKisdw+M9nHnxilhqxXoHkky42GhfVXwc/Oo7Hu2EM+VwC2PJ1F18rc5Oh5fauw== 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230310_064835_922203_74F47FA0 X-CRM114-Status: GOOD ( 14.51 ) 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/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",