From patchwork Fri Mar 10 14:47:24 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: 13169432 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 F38C4C74A5B for ; Fri, 10 Mar 2023 15:46:33 +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=2RJoWAvz+ljd+kaczDn/JfEeiAGB2iK9yBR5uSAkvuk=; b=RVYRqcptt7Rl2u wXoWTSpWEIZLwBPzQkNiVlaQwniv7H17TteXLCMbkOXaslIeYPuZeSf2fX2QmWocMmg1j/1VltuK6 mzKbk4UcQsn0M9ItFhQFNagbh0DHUYopZ3MMuyA25iE5uScIgrKE6fkpfBc+8Sn3FywptqY70LnPf HR1vvYLPcNj0cUSDzTs3AakXHEQhN5adZKLsClsDvZxLFqIHpCATsBepmJuwFn75vtrRlZi7yZWzl bYiQC6pQtEnOIUJjtbO8sxuSeLGBNwDIAt91cJ6tIl9RwJ8/IWqK3TsWCJR6e/TfqFzWqhpk1An84 wOVG/EPsZjZGd6VnR1Bg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1paew7-00F3kA-1I; Fri, 10 Mar 2023 15:45:39 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1paew2-00F3iY-99 for linux-arm-kernel@bombadil.infradead.org; Fri, 10 Mar 2023 15:45:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=Jcxqo0ngoDPG8sfx3l2EfDlYPoRMEx1f3UACnu8WIP0=; b=jhOIPVVs3j6WNHbY39TSQHhG6r TtFSz0Xi9DRVxdBVcLPumtUdB3ARv6O+tqJV6bzDYvVOYI7aU8jD6AQDHDlSUr8C0aYEoZYscveIq dCmSjcKch9MjyoTBj8BpBR12w4zb29/tnvVEKGon0CmnX28zuvHEPqBpzeM/qBg5PK/a1nZUFJFDU TgiM1QC1514sMOBl65GaFQ3PBnDHVuqTz8zYcL3zTiAA5N9FyD7JjpVtFSL0PJupRzTr8GvJ5GqTv riptwxo6p7jqaZS7BL3/OmAK9sh5Dequt88G1LeF4bYnbfodvuzvnBXqNZTKgvIfXi3x22G8x3AKD bAWQJz+Q==; Received: from mail-oa1-f54.google.com ([209.85.160.54]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pae2e-000UZ7-0Y for linux-arm-kernel@lists.infradead.org; Fri, 10 Mar 2023 14:48:27 +0000 Received: by mail-oa1-f54.google.com with SMTP id 586e51a60fabf-176b90e14a9so6042114fac.9 for ; Fri, 10 Mar 2023 06:48:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678459698; 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=Jcxqo0ngoDPG8sfx3l2EfDlYPoRMEx1f3UACnu8WIP0=; b=M5Eho5EZ3uNt4stNil0Z++vzLfy/oYoY9GtBAhTQhrflHadv0/03/M3dz2q3qtw2EM oDLTsJ6Hg78EhZ2p77Yi3ZB6zQzp9GlR5P5Jksiz0qQdX2fYJ+2M3UmQcOt/h7rggqaV MH1CwsCV6nBXytmhWek01nwif/Fv9EYqus2fniGwvHH8v87UEgIc+rJnMz2BVfDI7J2X dwupv5nzScYbDyHOXx3gMjcCy0pd1r0+qqeFBJDiKQzJDnng1nzuJC5+k8tS2O0QIl1y 5yYMZ9NorMwdlPaNO3yXtecfAPS0Ss8M+zTs5ib+kUT/8+ERDTMdywK0wQ8dr7kY/UpH HUsQ== X-Gm-Message-State: AO0yUKUF/iHpFW6HZ6TZh90rk8epI3CNdPyoAfSiF8Ii7fiifroJVNwv 6SWxDYqsuJNbVoZytCbmNw== X-Google-Smtp-Source: AK7set+/NJfKhDjq/US9Zgnj2vnj5ULRkdXtv1anFiXdX/PaEZpHr9aZmeUXkDHFpmVGgwO/W+nGBw== X-Received: by 2002:a05:6870:20e:b0:172:3a2f:c5ec with SMTP id j14-20020a056870020e00b001723a2fc5ecmr15852389oad.2.1678459698281; Fri, 10 Mar 2023 06:48:18 -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 zq48-20020a0568718eb000b00172473f9fe0sm118665oab.13.2023.03.10.06.48.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 06:48:17 -0800 (PST) Received: (nullmailer pid 1545259 invoked by uid 1000); Fri, 10 Mar 2023 14:47:24 -0000 From: Rob Herring To: Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH] soc: sunxi: Use of_property_present() for testing DT property presence Date: Fri, 10 Mar 2023 08:47:24 -0600 Message-Id: <20230310144724.1545223-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_144824_126268_E030D753 X-CRM114-Status: GOOD ( 13.48 ) 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. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring Reviewed-by: Andre Przywara Reviewed-by: Jernej Skrabec --- drivers/soc/sunxi/sunxi_mbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/sunxi/sunxi_mbus.c b/drivers/soc/sunxi/sunxi_mbus.c index d90e4a264b6f..1734da357ca2 100644 --- a/drivers/soc/sunxi/sunxi_mbus.c +++ b/drivers/soc/sunxi/sunxi_mbus.c @@ -82,7 +82,7 @@ static int sunxi_mbus_notifier(struct notifier_block *nb, * Older DTs or SoCs who are not clearly understood need to set * that DMA offset though. */ - if (of_find_property(dev->of_node, "interconnects", NULL)) + if (of_property_present(dev->of_node, "interconnects")) return NOTIFY_DONE; ret = dma_direct_set_offset(dev, PHYS_OFFSET, 0, SZ_4G);