Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1787482rwb; Thu, 19 Jan 2023 15:41:58 -0800 (PST) X-Google-Smtp-Source: AMrXdXtazwQGB+xZ6iDBMwFCy8VFFBoI8IAmERDCeFckm/zlrg4x1cCNFP0YHwCHC08g0HDlbCjw X-Received: by 2002:a17:90b:1a88:b0:22a:be:a92f with SMTP id ng8-20020a17090b1a8800b0022a00bea92fmr1298408pjb.14.1674171717833; Thu, 19 Jan 2023 15:41:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674171717; cv=none; d=google.com; s=arc-20160816; b=O/T6XPZTewbNeME38G+pvgpsQIgpE8JafHivSNLGl2J5nh/VsFEjyj6WdRGlyv6gRg Qqjmgpw++eZglcBPUmVLeIfeRjTC3+2Vqmp64PCv4gpQJMZi4cv8rAtuN8OE/E6jDMil KT1cyIXk9fcFGQ9UYG4xUyfFHU3kYrz1sZeH5pL6O6PaO07qnq7RHepTYRAqyRzVaUqN Xfwv2Qbhsxv/kaxiAGAqeA5PBWy5DbNqF4dZPpZ5ZZoG+jcQT5O6RNEvjvLkDw/fyBfB ZI6m3T3p5wx/3s/rSV+P+xZcmoP4VQ0dWS2pyHkp0kqz1ZtNMjwRAx5ABRIF6G8if5/l 7QJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=kpclHWjHCh8u37izsHyLub1WI5T41GcP65dSnJSHN4M=; b=b3HJ6BCG7JZxTyHV2wRymLMPTCtzIaiGaJT2wvL0ZvA70CIoxSW8aJDCNn4CedUPMd g4Ao8SbGaaEwbhmAjt1I/RQfF6ZwkiLMq/fL5sbZVib8iGvD3b8BbEK3Tcea3YEDjSId Jakwvu1otPgsyE6+csBFqLd5mf6OOfdQgibKBpDy/J4Bju46Uxvwmcb1AhFSmO4fAVbZ 3NFYYBNBwI5FPd6Fe39nXS3P8Rk21E7MewF5LZPXUhjtxopv97F/qRoAKHSwWCMubf/H 4OMYJ8nwerCPbSdPENEOG0HCEGeDcBTPbpsqcGCBIL7P49ml2WF6nvf62pSAkvnWgTWu 3Qyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@sparkcharge.io header.s=google header.b=D56pePQd; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m18-20020a639412000000b00478e15039c0si40171975pge.779.2023.01.19.15.41.51; Thu, 19 Jan 2023 15:41:57 -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; dkim=temperror (no key for signature) header.i=@sparkcharge.io header.s=google header.b=D56pePQd; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229966AbjASXUI (ORCPT + 48 others); Thu, 19 Jan 2023 18:20:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230108AbjASXTZ (ORCPT ); Thu, 19 Jan 2023 18:19:25 -0500 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45E227CCD4 for ; Thu, 19 Jan 2023 15:17:40 -0800 (PST) Received: by mail-lj1-x235.google.com with SMTP id y9so68677lji.2 for ; Thu, 19 Jan 2023 15:17:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sparkcharge.io; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=kpclHWjHCh8u37izsHyLub1WI5T41GcP65dSnJSHN4M=; b=D56pePQdJRVdGhjYma2YESmzkNwZ8lpP8cVRAdzQ9shd5SMdPcZvlcQrRViIEqJCi7 I9y513i7+mJWw7Nk00G36cQksMDV06px3DdfYNk+2wdPf0KpY+NX2eYZzNo5AMrg7gZc vmrxpwDTFSB6FhVJFgCt9kD1Hdn2b/QsKXg61OrSoyuM2dXTbQNfy/Pop6bfx29xpakg FaE+MarJ3fSs7FsPr2MTWSMype3Z5WGEZronLqGQM9cS3C3OiAcdH4uHkCagyYhOMK6R r8ueD36XGs52tPcPEP6AY/voffZcW4UM10N25DHMFj3BsMfZcSQnDuqArWXV6QM1Kb1Q 9MYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kpclHWjHCh8u37izsHyLub1WI5T41GcP65dSnJSHN4M=; b=PBaGtg+1Oa4hc2pm46MQ6S6dVdXkzbtUOSvUNBY0+FCuahq/SrEuHWkBvND+XwPI/a OyQK8d6gbDkokKLl7ToteVumjzloY8/WsmEtgPlHsVYLk5PYe8sJTrEjzdOoEpz63FCi 7j/wL2pRCrcBV5XTAVO4CEwUvOpQShMlsDtojT3C5O66qGTwbsh+n5NhSjQX10flrzr8 fBiPHkVhjvOQy+GkijtomDHvp/1fTRrCzTN1QBjxG1bQu1AUIWzbLZzHvfnipGKJH8ln nEQaXaKMXpp7UeDL4mCblQE/p86yZWq3S9GGTTD1sh0uI6jvAGJ8fJoVKEPQkO+lmNoO Z+1A== X-Gm-Message-State: AFqh2kpcH4ItiXWndLPlRb5cCiaZWEjlOiUKlHWo54n9Pi1mJDRSt9FY 7NguBJjBcnirrsoAO7ULPKHYh3iI/dT0W6i8F+VwWg== X-Received: by 2002:a05:651c:1584:b0:27f:acdd:e42b with SMTP id h4-20020a05651c158400b0027facdde42bmr718959ljq.308.1674170258541; Thu, 19 Jan 2023 15:17:38 -0800 (PST) MIME-Version: 1.0 References: <20230119213903.899756-1-dennis@sparkcharge.io> <20230119213903.899756-2-dennis@sparkcharge.io> In-Reply-To: From: Dennis Lambe Date: Thu, 19 Jan 2023 18:17:26 -0500 Message-ID: Subject: Re: [PATCH v3 1/3] rtc: m41t80: probe: use IS_ENABLED for CONFIG_OF To: Alexandre Belloni Cc: Alessandro Zummo , Atsushi Nemoto , Gary Bisson , Javier Martinez Canillas , Troy Kisky , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE 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 On Thu, Jan 19, 2023 at 5:21 PM Alexandre Belloni wrote: > > -#ifdef CONFIG_OF > > - wakeup_source = of_property_read_bool(client->dev.of_node, > > - "wakeup-source"); > > -#endif > > + if (IS_ENABLED(CONFIG_OF)) { > > + wakeup_source = of_property_read_bool(client->dev.of_node, > > + "wakeup-source"); > > + } > > + > > A way better patch would switch to fwnode_property_read_bool If you like that better, I'll make sure that's how I do it in future revs of the patchset. I didn't know if it was appropriate since I don't know if it would ever make sense to call acpi_dev_prop_get on "wakeup-source" or "quartz-load-femtofarads", or if that kind of consideration should even matter when choosing to use fwnode_* instead of of_*. -- Dennis Lambe (He/Him) Lead Firmware Engineer sparkcharge.io