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 X-Patchwork-Id: 1755254 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=zN+lbel5; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PY85w4bkZz246J for ; Sat, 11 Mar 2023 01:47:16 +1100 (AEDT) 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-Spam-Score: 0.8 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 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 [...] Content analysis details: (0.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.210.51 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.210.51 listed in wl.mailspike.net] 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 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+incoming-imx=patchwork.ozlabs.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);