From patchwork Fri Mar 10 14:47:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 67514 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp953085wrd; Fri, 10 Mar 2023 08:02:44 -0800 (PST) X-Google-Smtp-Source: AK7set/MyC0bZ419E/ROVvtEGnets9XxJl17h6aTooY2lDjCQue5FM2h/eha1TkuijKDQalQUGwu X-Received: by 2002:a17:902:720b:b0:19e:674a:1fb9 with SMTP id ba11-20020a170902720b00b0019e674a1fb9mr22333300plb.69.1678464164281; Fri, 10 Mar 2023 08:02:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678464164; cv=none; d=google.com; s=arc-20160816; b=Wj2IPyMprEAQm+4kgQjqWDZbAY+LdDIkRo+zI3xnMccHol2cTrLO7BA4fGt+d0Ni2m H0zOs8kjbRs0Dg216QRswyHf5KVqTYkjDGwSUoQSyIKGG5gukTQDyHi84hInrFlpnFG/ JTP2LY8Zsx/cfQSpXyGRv5D4vgSxLXcPzRrH6yxzO9NCwmfKPPO0fRP8DSRIrwzgDAGA jKsoQ0YP4ZlnIDIokutBlFV3t2oZ1/b72lBu6AdgKIZS4kmEZg+23FO0Ouzu//A2PYMb SP3DYKPRX+E2dLNh5f+cbuc97QthZrijQPHpLfEsHCXUSYicd4FDx3VpN0JhkGt6dxgf LKPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=gIsj2WC67R0QYaUVMrSWcmPH0Rz9P/s3jlTMUe0suxA=; b=KNxPKsYV3eQcYp2Er/MAsryjXXzSKDGN7E5BxjuOixrkGefBASnGBqfCKIjFEwhfB2 CrGiRFtyOl8uONlrcmK9RDIwgjjLP/XxmftgZZ76MFZUmZTIhj3rBRNRwxU+/9Q+NZYS O+njkJawCJohqhz4dKfQokxg/2QrbAKWnN89PRjed31/x3dSqBsBu7Vv3YLqe/z05gu/ hBdDBhgivHdj6kou2EyJZnwTOpiX/2TNNfNYC1mRzAeOg4jh7MA6OnWGeh1bZR3e/KRy KfHxAMtP1xRNtThwPLAw1+U6TWpPNTeCKqBJWwe+56J7/agiMCAKNWiDHfe16gdisK9J t/0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c2-20020a170902848200b001926cc639ecsi198564plo.487.2023.03.10.08.02.30; Fri, 10 Mar 2023 08:02:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233300AbjCJOud (ORCPT + 99 others); Fri, 10 Mar 2023 09:50:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233250AbjCJOtU (ORCPT ); Fri, 10 Mar 2023 09:49:20 -0500 Received: from mail-ot1-f52.google.com (mail-ot1-f52.google.com [209.85.210.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2A561241D4; Fri, 10 Mar 2023 06:47:45 -0800 (PST) Received: by mail-ot1-f52.google.com with SMTP id m25-20020a05683026d900b006941a2838caso3033013otu.7; Fri, 10 Mar 2023 06:47:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678459664; 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=gIsj2WC67R0QYaUVMrSWcmPH0Rz9P/s3jlTMUe0suxA=; b=iuH//qZrW7+ys647ooJxkyzJO1n47ThweQHvGk0lKFIWRZcGZh68OlQXw5DkY+OVjK mzYDKsjVW35m16jr4Mclg95iKEkmZ6e7B8eqj4i7ECT1NBxjeeVXGTcPFBP9uf5Bcun7 fw7unTQoFSUC9Zy0QLuEHIbO++Ef2ojv4anYrr/6oWD56c+uGVNdP+bUUekb+bQgRh9X M6fEKWX1sh+bERUu+Bg1cxUCr/XogW2eQN8Q6FsipzDDimmFuleozd7M5h/dCtaqkwIa YP4zpRcVQtiZZNBLjjGHn8BnM6zNQgtu5wouTmcne72FEVwGtgw/UnGLdnS6i8qnpIuk vvgA== X-Gm-Message-State: AO0yUKVFyVF+61XF8MQkAd5f3Lq9ZFM6UYMlryxt5/aHe6M0Ew6rkshr 282ISXyVjz6SyHZrBdds+A== X-Received: by 2002:a05:6830:35b:b0:693:daa8:ec6f with SMTP id h27-20020a056830035b00b00693daa8ec6fmr12574633ote.1.1678459664381; Fri, 10 Mar 2023 06:47:44 -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 u25-20020a056830249900b0068be5ad8044sm135876ots.4.2023.03.10.06.47.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 06:47:43 -0800 (PST) Received: (nullmailer pid 1543793 invoked by uid 1000); Fri, 10 Mar 2023 14:47:14 -0000 From: Rob Herring To: Adrian Hunter , Michal Simek , Ulf Hansson Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] mmc: arasan: Use of_property_present() for testing DT property presence Date: Fri, 10 Mar 2023 08:47:14 -0600 Message-Id: <20230310144714.1543767-1-robh@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759996895515677554?= X-GMAIL-MSGID: =?utf-8?q?1759997239514844475?= 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/mmc/host/sdhci-of-arasan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c index 89c431a34c43..415f44bf5ee6 100644 --- a/drivers/mmc/host/sdhci-of-arasan.c +++ b/drivers/mmc/host/sdhci-of-arasan.c @@ -1434,7 +1434,7 @@ static void sdhci_arasan_unregister_sdclk(struct device *dev) { struct device_node *np = dev->of_node; - if (!of_find_property(np, "#clock-cells", NULL)) + if (!of_property_present(np, "#clock-cells")) return; of_clk_del_provider(dev->of_node);