Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2151690rwa; Mon, 22 Aug 2022 03:07:19 -0700 (PDT) X-Google-Smtp-Source: AA6agR6eYfWycDgP/DE0l3t3Vnks0Xak7EGVPq4e6r29lWHaU5RjgilhSOjI340wF3LHaaaZFdL1 X-Received: by 2002:a05:6402:4511:b0:43b:a182:8a0a with SMTP id ez17-20020a056402451100b0043ba1828a0amr15977982edb.410.1661162839715; Mon, 22 Aug 2022 03:07:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661162839; cv=none; d=google.com; s=arc-20160816; b=u3GHyQrAtBAryaaeOqecLWKVP6IuiQZniocvZsGEFT5jmyi5NXFztjSaYk/v4bLqZm /T35u0diVmkJM3hx0KfvJ7X/PlBTRnUBq6bTXxsE5bdPOtT6GC6TBzCjpYKmdIMF9+GK h17BwtdvdI1AHDHU5gfv+Cw0eRuR81tQuj6NjYMTULl6Tfe+1QLfb/bkaSDZ4f1I1ZU4 3oiskGT+IZ78VlvpVShp4hDpz00OctNMGhaNkW3UwWubIlJUOY1bCsbC+DkOHKpe3ma+ Rjz7Ov+A26052cnB0B42zODb+zZjjQewIGY1+pHpFvGnFhOnTlsh6jE0VoYpkUnBCFbV u3vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=0rMjsfIEKN4ipYLg0AamTXV0c/Pfbz0ZkWoRcZMo1T4=; b=DETjMTHb2zqjJyldxIkz6+2Ssl2S7t77fBtSOEXxHqg0KrERfpThhQK698skVE2Fxe ivgEYlf8erZ6JqE2go/oszTymS3bwDEs3zBIkcGDSWmeoI9ItH9NKSEzN+HlXAXTsSBu hBONIZUPp4k07cfmlKa24UkLK7iSbpSVgHdDHnR5oF8GFvgRbH/aKGcuGyeMFlApQU9L 1GIIp2iAIlwhoGc6xZsBEGTnhTA4EZjjgav4mUcnKC8laaMzdMla6AATN/QNtyT5gzId s9xtqJZ2yEcqJjXzvVs5NT/FhN1hfke1OBBUpQlzJ+Nyl8Y298x9NX6/pS6/UElzTcLl fG+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=Zr6k5jZx; 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=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sh35-20020a1709076ea300b0072397249ecbsi8215858ejc.928.2022.08.22.03.06.54; Mon, 22 Aug 2022 03:07:19 -0700 (PDT) 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=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=Zr6k5jZx; 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=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233285AbiHVJnw (ORCPT + 99 others); Mon, 22 Aug 2022 05:43:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234539AbiHVJnp (ORCPT ); Mon, 22 Aug 2022 05:43:45 -0400 Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88DE712A9F for ; Mon, 22 Aug 2022 02:43:44 -0700 (PDT) Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27M5vsDm006019; Mon, 22 Aug 2022 04:43:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=PODMain02222019; bh=0rMjsfIEKN4ipYLg0AamTXV0c/Pfbz0ZkWoRcZMo1T4=; b=Zr6k5jZxuZHFUKdyWFkmHk0koTnb4cfxOSuRzdIEjr+eg/pgaSvSk5mhdEGiaVEdjFoH XoaOH5wLAOQdnkjYmiG3ilXJ9aabgISgL8B9p6SGwrc6v4lfIhYYqNseOEHBca+q0ylh Bfhm7MYslVBE4zhgCA/5ni6brv4VZpYp0KX/CkVHL+Z2joq/IQwBIvS9jipbL70LZ8Eu WVE+BE4kg/up0VWlqJrhhZ+uDvOFwMikKpoPIcAYKPd4HwmN4P6ZiWO4arZ9jikD5ZFN bo1A4I9dM0ACKA99OdN3ylCG907pmGQi4pzQPxmHA1sLIigKOgYJA6rO7cmB5sBpL4rX tw== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3j2x129xut-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 22 Aug 2022 04:43:33 -0500 Received: from ediex01.ad.cirrus.com (198.61.84.80) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.9; Mon, 22 Aug 2022 04:43:31 -0500 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.2.1118.9 via Frontend Transport; Mon, 22 Aug 2022 04:43:31 -0500 Received: from ediswmail.ad.cirrus.com (ediswmail.ad.cirrus.com [198.61.86.93]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id B022EB06; Mon, 22 Aug 2022 09:43:31 +0000 (UTC) Date: Mon, 22 Aug 2022 09:43:31 +0000 From: Charles Keepax To: Paul Cercueil CC: Lee Jones , , Subject: Re: [PATCH v2 18/30] mfd: wm8994: Remove #ifdef guards for PM related functions Message-ID: <20220822094331.GK92394@ediswmail.ad.cirrus.com> References: <20220808174107.38676-1-paul@crapouillou.net> <20220808174107.38676-19-paul@crapouillou.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20220808174107.38676-19-paul@crapouillou.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-GUID: wIzQa6MtbzHk2AFFboJjrlAuJP4szjOw X-Proofpoint-ORIG-GUID: wIzQa6MtbzHk2AFFboJjrlAuJP4szjOw X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 Mon, Aug 08, 2022 at 07:40:55PM +0200, Paul Cercueil wrote: > Use the new RUNTIME_PM_OPS() and pm_ptr() macros to handle the > .runtime_suspend/.runtime_resume callbacks. > > These macros allow the suspend and resume functions to be automatically > dropped by the compiler when CONFIG_PM is disabled, without having > to use #ifdef guards. > > This has the advantage of always compiling these functions in, > independently of any Kconfig option. Thanks to that, bugs and other > regressions are subsequently easier to catch. > > Note that this driver should probably use the new > DEFINE_RUNTIME_DEV_PM_OPS() macro instead, which will provide > .suspend/.resume callbacks, pointing to pm_runtime_force_suspend() and > pm_runtime_force_resume() respectively; unless those callbacks really > aren't needed. > > Signed-off-by: Paul Cercueil > --- Acked-by: Charles Keepax Thanks, Charles