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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 054CCC28D13 for ; Mon, 22 Aug 2022 09:43:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234540AbiHVJnw (ORCPT ); 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 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