From mboxrd@z Thu Jan 1 00:00:00 1970 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 A960DC6FD1F for ; Tue, 14 Mar 2023 19:59:19 +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:References:In-Reply-To: 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: List-Owner; bh=armn0nYpmLuTNmmQnBC7tvcAAGkdNecxdjVyZKYMK/0=; b=Yckcq3HUdXNOaH X0WmR2rGNNegSuzLDNOhhhLpJ6mqEsCWyn+VHSq8axiCfYzNjSh2QgW19FxhUw6IRHwSHwAP2sVfC 0j0/MH7XBNUlrj/39zTBwDDwwRpyoujuSsjujwEfHRvafQSWx+ppce4Ac9RBfY6clCJmab34pjnxx oGbZ/hwnDgQD/YRwfICPij3lzw4zAwwddziRHNf9RXXEv4v5+W2R4buohdRwLXZweR5DY+CNl8jta C7FxbbRoQARP3ukuFTg84EFvWoHFbKz8vK5EDJI+IGZHl5V3bSD9gjgQnntjT9U5pfhQXjM9T7+cr iwijgE6RJO6t3LFZ3QLQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pcAn1-00BPNz-00; Tue, 14 Mar 2023 19:58:31 +0000 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pcAmy-00BPN5-0g for linux-arm-kernel@lists.infradead.org; Tue, 14 Mar 2023 19:58:29 +0000 Received: by mail-ed1-x52a.google.com with SMTP id x3so66733702edb.10 for ; Tue, 14 Mar 2023 12:58:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678823907; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xqwHb3pl10s7quxiCLdge3d3HiQ2kieNQ2q19oo8kDs=; b=kCsABlT+HkwgRsyKMRlCb41qMBQ1GsJeb1u/zUZGfUsAzgBXSebzj7zTIdHOMUZ4hm Jddh/W1F1qfjhpUOo0OHPBm+37Xkubd46bVkGO+nzkvBHmgWXgYJxLvi2CIGm3NkwLtt kTUFSwRuOG4YU3Y11mcrYUcfx9+a1mAo3RXJ4kCw3cmIAjNz7A4g6IB638HJRaArVmGZ FkELAXbvLbkwoqaBGrGROnDFSrfeEb/heIyC0YFgIstC2AE3Yw9l6BDMbblzJgcit2De eaOyNCNGLDVUabserU/ISATGn9ccpbBAh0xp94IoBx925GjvIaAd//hykfRIi5NliUk6 SMTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678823907; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xqwHb3pl10s7quxiCLdge3d3HiQ2kieNQ2q19oo8kDs=; b=Xi7Ba71cOu5vZ5CihBDvJMhjl0s/CAmS0pX6WzW72Pwhv5uYZ91QRMJmC8cyYxfVK1 1vwkHHN6R89BVZh2P1w5/WBns+GY4QnDa30ReyMy0MFHK3Pfthp9se7VvrLYcZKd77oh AM3+DfG4dAQ9odqIzqbz3WjE4mzAyNE1gG8eKMR+MQsQCDmp9Kiywf0PyELnV5EBTjY7 xTWHp5fDw0l6i9Gc2b4rore46XLo7tU0Xf7v8qTqSBYgWz42jFYJpGTAF+L4unf4m/1w 9b6QRPE4GAyOeW+05UAISMqS4Ln1KSpP73gFlPFKaxVLxmMQBPDr9eZGOMtrhQCBNArP lDGQ== X-Gm-Message-State: AO0yUKXv/A1FjReK38e97a67bXCnTRPiosz9+VLmfgx28dTzvoBckGm1 DZdauu580hksx7FNAqklvDA= X-Google-Smtp-Source: AK7set+c9gXFRmjVi6fFDbFdISN4aKZTF0Ediiw5KyDrz4H9I2ZmJcurfv6q47uliZL8XXT7wR5jVQ== X-Received: by 2002:a17:906:6b0c:b0:8aa:be5c:b7c5 with SMTP id q12-20020a1709066b0c00b008aabe5cb7c5mr3670395ejr.41.1678823906634; Tue, 14 Mar 2023 12:58:26 -0700 (PDT) Received: from jernej-laptop.localnet (82-149-1-233.dynamic.telemach.net. [82.149.1.233]) by smtp.gmail.com with ESMTPSA id de11-20020a1709069bcb00b008d1dc5f5692sm1514491ejc.76.2023.03.14.12.58.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 12:58:26 -0700 (PDT) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: Alessandro Zummo , Alexandre Belloni , Chen-Yu Tsai , Samuel Holland , Rob Herring Cc: devicetree@vger.kernel.org, linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] rtc: sun6i: Use of_property_present() for testing DT property presence Date: Tue, 14 Mar 2023 20:58:25 +0100 Message-ID: <1845104.tdWV9SEqCh@jernej-laptop> In-Reply-To: <20230310144736.1547041-1-robh@kernel.org> References: <20230310144736.1547041-1-robh@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230314_125828_266911_B9DC3CD4 X-CRM114-Status: GOOD ( 20.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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Dne petek, 10. marec 2023 ob 15:47:36 CET je Rob Herring napisal(a): > 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: Jernej Skrabec Best regards, Jernej > --- > drivers/rtc/rtc-sun6i.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/rtc/rtc-sun6i.c b/drivers/rtc/rtc-sun6i.c > index 7038f47d77ff..dc76537f1b62 100644 > --- a/drivers/rtc/rtc-sun6i.c > +++ b/drivers/rtc/rtc-sun6i.c > @@ -260,7 +260,7 @@ static void __init sun6i_rtc_clk_init(struct device_node > *node, } > > /* Switch to the external, more precise, oscillator, if present */ > - if (of_get_property(node, "clocks", NULL)) { > + if (of_property_present(node, "clocks")) { > reg |= SUN6I_LOSC_CTRL_EXT_OSC; > if (rtc->data->has_losc_en) > reg |= SUN6I_LOSC_CTRL_EXT_LOSC_EN; _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel