From patchwork Fri Mar 10 14:46:54 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: 13169332 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 75EEAC6FA99 for ; Fri, 10 Mar 2023 14:48:02 +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=qaDTfxpvLYGPF2cUTuexoVUjI1SCd3dNo6w3jGaI0aE=; b=zN+lbel5hHMMdr 7ZuYAOjUOzTaU7lg/aOjOcUl2Wx+Adn4hkpbZUFN7hsT28wxKmBcMV5fgxRyMgzth6OyMmUVL9rl+ q+A4VepJKmDT6Wywf54flVszB2g4lHrKBl1Hro+xKWBvPUafX80DVWpneFE542NI7jsny46sf9pYD LMJWPbD6+0WbwJIR+53nS8Qp4DBjJ9OClrLOSTKKEtCm1Gf8bdl+C//biisfQUhGpBkCQwGA1rfGa Ox5eQPQgw8VY8PHRwcYyFF37obrydIqMFfc+oykJsCt4RkdFipxaUx3X0XpbsJ9Um2CpiJsGI6voG kywIMrLjNqfHcFnVCL2g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pae1N-00EmTt-BG; Fri, 10 Mar 2023 14:47:01 +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 1pae1K-00EmRy-GP for linux-arm-kernel@lists.infradead.org; Fri, 10 Mar 2023 14:46:59 +0000 Received: by mail-ot1-f51.google.com with SMTP id q11-20020a056830440b00b00693c1a62101so3124350otv.0 for ; Fri, 10 Mar 2023 06:46:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678459616; 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=N/C+fNk0w1+varw1acVN8y8bRrPEeVF6o0QOP6xK1xI=; b=3dYjlmKEjQNmCQjU4V6VcxUYQKr0+U665AAhH2f6kR6NVQo6ffyPHxGGNwtoXvKSbv PvqedxRXw/dv+RMshmKV1Vr7P43v9GNs3LR2WVO4NMSP4iNbcPB2Mek0f7m8XuiXS1dd aHHSnXC5saFZ9nudjvLug1FjKoOLTOhXWGKdpEwX8B9xnOe1V7bYZjs0rb9oDmt7J+ny QtXsqOLih9ITsV0JBf6guG4jk378IHBouKblBl8hOwQMiJKUNYCrQFyMT35ldEMs7c/d y9FQAYJ7SWmzVtlSI0yNJ7yPNX+OvzQMZQLhTYb5yNlR1ReiiLT9GaW5CF/vhlq+8XyZ 6x+g== X-Gm-Message-State: AO0yUKWp/zKpu0s6NNDOJp5myO1tib3DCFUxMKyv1YC+0lofc4bI9805 vSW4LP4TlhczaluwU1+7vg== X-Google-Smtp-Source: AK7set+iPlqLxAvKsse9T3A1If3SSfJcDQ+1VRuqO8QNi+liEvMsbJZYegEvu161cbJrX1iKvRa4XA== X-Received: by 2002:a05:6830:4423:b0:690:ef1f:6191 with SMTP id q35-20020a056830442300b00690ef1f6191mr14947003otv.32.1678459615767; Fri, 10 Mar 2023 06:46:55 -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 z12-20020a9d468c000000b0069436b64bb1sm90153ote.79.2023.03.10.06.46.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 06:46:55 -0800 (PST) Received: (nullmailer pid 1540587 invoked by uid 1000); Fri, 10 Mar 2023 14:46:54 -0000 From: Rob Herring To: Russell King , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM: mxs: Use of_property_present() for testing DT property presence Date: Fri, 10 Mar 2023 08:46:54 -0600 Message-Id: <20230310144654.1540561-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_064658_562635_48B10BCC X-CRM114-Status: GOOD ( 14.36 ) 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 --- arch/arm/mach-mxs/mach-mxs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c index 0129b7c514d7..51e47053c816 100644 --- a/arch/arm/mach-mxs/mach-mxs.c +++ b/arch/arm/mach-mxs/mach-mxs.c @@ -174,7 +174,7 @@ static void __init update_fec_mac_prop(enum mac_oui oui) from = np; - if (of_get_property(np, "local-mac-address", NULL)) + if (of_property_present(np, "local-mac-address")) continue; newmac = kzalloc(sizeof(*newmac) + 6, GFP_KERNEL);