From patchwork Fri Mar 10 14:47:11 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: 13169463 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 A0EBDC6FA99 for ; Fri, 10 Mar 2023 16:02:21 +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=/+10w7pS3pDLNkgftqHQ0M1dJ+onLmyxf1a7gkvVsZQ=; b=nx3dfFDTtC/Nzz YyMuf0ymYD4NbBHZ7lN4zumVig9WBYY26b2oaSzULJDBwxZGc1gB95wfflil2iLXJRfqWGvPPFD2Z lcnqiNSLQ1I1yPe0bT30RZMvbEWVBw5EoX/j/g4lLeE7uCQGZfxV4ib+skCSytBjkNeN6JF9RXcIM j2xQ3w3PCxzNf1BINvefmzLXJ9RA8QepH5U1DEEAeGnH9IzbSd7eI3begBhJ2VbmvpHQ/fjuRJc0g OcMZaljhhh1JW+0ZZ5F3DBvTw903xdDYLL6Y4mk3QC9iXLn6mRLrA0N0my81bry9t5SgXg1+McSVt RU5cMZTe6ZunUARQ+fuQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pafBV-00FA8A-Rw; Fri, 10 Mar 2023 16:01:33 +0000 Received: from mail-oa1-f43.google.com ([209.85.160.43]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pae1i-00Emay-QX for linux-arm-kernel@lists.infradead.org; Fri, 10 Mar 2023 14:47:24 +0000 Received: by mail-oa1-f43.google.com with SMTP id 586e51a60fabf-17671fb717cso6049380fac.8 for ; Fri, 10 Mar 2023 06:47:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678459642; 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=jpgx4CM4QTHptKDBGTPzlfwWfMWQrZb5f5lH9E1GeQQ=; b=LM/+CP+08bsPxhS1+8ksXsASaG/IWcUjoDVuATcyDKj6UOyVaLMSJ/+NnOuKebntED Ej5brTJbJbZ4VaOL2dacCeRP6hBgcVKH+mheBOeSIouTABQazlNwnKXb4SphiT1t/Iqv 2VPo2oPDAmY2nvfpr7CM0nDEXs627S6Escoj+iVQomc57egGrLSfj13Vh/VYalt0dBfS Pi0xqGf3wq4QcCr1d/8fr6SKi2wSf2is7pP0Ce9IVekfIYx4EFnB9sJ+qAIXKlqvuCaW o/8tY7hV9yiQAwEByMJPFM7LZ6+EUUxECAsY6dGg0HD9QZ3jpBLe15C+oxjjhW7Ob+J2 Tr/w== X-Gm-Message-State: AO0yUKUYwqQzXKZ6UlGlB2mVw4IUeMS3SbcEfhwhpvts1GstRNRStNDK XU5Z86Ta4bKdGZQ/uOCqiA== X-Google-Smtp-Source: AK7set+Ovw9dE9l/bcL5S3/f1hQjQMjRF9HMHKWTfj7fhcXtHDFd09AjwRONrH2sgpgOrmra4d9rwQ== X-Received: by 2002:a05:6870:8a09:b0:176:4c90:a172 with SMTP id p9-20020a0568708a0900b001764c90a172mr14588755oaq.56.1678459642058; Fri, 10 Mar 2023 06:47:22 -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 o21-20020a056870e81500b0016b0369f08fsm119202oan.15.2023.03.10.06.47.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 06:47:21 -0800 (PST) Received: (nullmailer pid 1543336 invoked by uid 1000); Fri, 10 Mar 2023 14:47:11 -0000 From: Rob Herring To: Krzysztof Kozlowski , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] memory: atmel-ebi: Use of_property_present() for testing DT property presence Date: Fri, 10 Mar 2023 08:47:11 -0600 Message-Id: <20230310144711.1543295-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_064722_893303_3B1CEA14 X-CRM114-Status: GOOD ( 14.43 ) 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 --- drivers/memory/atmel-ebi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/memory/atmel-ebi.c b/drivers/memory/atmel-ebi.c index e749dcb3ddea..635966d705cb 100644 --- a/drivers/memory/atmel-ebi.c +++ b/drivers/memory/atmel-ebi.c @@ -598,7 +598,7 @@ static int atmel_ebi_probe(struct platform_device *pdev) reg_cells += val; for_each_available_child_of_node(np, child) { - if (!of_find_property(child, "reg", NULL)) + if (!of_property_present(child, "reg")) continue; ret = atmel_ebi_dev_setup(ebi, child, reg_cells);