Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp29883792rwd; Wed, 5 Jul 2023 20:03:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlHxlCE3PuqYl0bc6VkWp39QnYZawOr7iYP/xzode1atF9YWoZ1crF45k0syPkBMiouflEWy X-Received: by 2002:a05:6a20:7d9d:b0:127:72c3:6428 with SMTP id v29-20020a056a207d9d00b0012772c36428mr1357461pzj.18.1688612584080; Wed, 05 Jul 2023 20:03:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688612584; cv=none; d=google.com; s=arc-20160816; b=VtduI41oK82XJRxfm4OUnLQ3xEmN7Pl08tj5C0URu4IFkdyirpuM6LierSbna9wAdR 9FpRa8mNz07sgXseh60C/iJ8/k/rRHAmb10cbNM+kmGkaOQe/uF2yB2ZaPbIE49a2Udu MGPVE470GGX/ED6j+WtQap8MiynL9LqBLqhEXr2CjQkRPuACKCOagi/5MaFD69WsYSz3 9NYUDxb4QaUudvLSMA2DxLq5krwn5GcZk0wwzpt/XRDXmvx7s8KEFs6RpWwXN/zE9fAe Q49+to992Xb1HY1p0LNIM5h2ebKDY6aCdzzu9OtdFsxVNd9tZ2DQzDSPaP9Wton53fQz 6l6w== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=s9xVy39GDL5wBV8nHsG/ul0tPB6WY7m4aUUBlmZl6is=; fh=L2tXdyutSgmDTeXOpWh/GKjiwZ5QlXO0v7eTeTVp+vw=; b=0BdgqYWDQ9fdC52hBN8cq0hu4NO7ELmpEeyk24eEVljchNZpE00RHBNWmD7IdWHQwI dNi4AXONKWXc4+9Zo5vWUNAmLIA3fecbO4VGU7J25OqWks6F1lqqD8J+p8pqL244zely Hh94fu2Apgp0DJMPAlORE8/xQLIgjS0HMAPKTek0sIveglGSp3fIJ2E8bouf/ehBo+9K NvzTVdLuwpeepLzZQc/GzilHs4rlf1+8EZUbulhGY3PbigcK/YCk9NzoyeWRVp6wNrww EJ5Hsor9s+HZ/qeVNJr710lVmOI401PzNModrh/ffs70wSaCS1U6pcAQ7f6NqDclgJNv O0YA== 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m18-20020a63fd52000000b0051322a8d2aesi527895pgj.110.2023.07.05.20.02.50; Wed, 05 Jul 2023 20:03:04 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232960AbjGFCj5 (ORCPT + 99 others); Wed, 5 Jul 2023 22:39:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232446AbjGFCj4 (ORCPT ); Wed, 5 Jul 2023 22:39:56 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FC44199F; Wed, 5 Jul 2023 19:39:55 -0700 (PDT) Received: from lhrpeml500005.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4QxLJk3y7pz67LmL; Thu, 6 Jul 2023 10:36:54 +0800 (CST) Received: from localhost (10.34.206.101) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 6 Jul 2023 03:39:51 +0100 Date: Thu, 6 Jul 2023 10:39:47 +0800 From: Jonathan Cameron To: Paul Cercueil CC: Wolfram Sang , , , Vladimir Zapolskiy , Subject: Re: [PATCH 12/23] i2c: lpc2k: Remove #ifdef guards for PM related functions Message-ID: <20230706103947.00000119@Huawei.com> In-Reply-To: <20230705204314.89800-13-paul@crapouillou.net> References: <20230705204314.89800-1-paul@crapouillou.net> <20230705204314.89800-13-paul@crapouillou.net> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.33; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.34.206.101] X-ClientProxiedBy: lhrpeml100001.china.huawei.com (7.191.160.183) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,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 Wed, 5 Jul 2023 22:43:03 +0200 Paul Cercueil wrote: > Use the new PM macros for the suspend and resume functions to be > automatically dropped by the compiler when CONFIG_PM or > CONFIG_PM_SLEEP are 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 the behaviour is slightly different than before; the original > code wrapped the suspend/resume with #ifdef CONFIG_PM guards, which > resulted in these functions being compiled in but never used when > CONFIG_PM_SLEEP was disabled. > > Now, those functions are only compiled in when CONFIG_PM_SLEEP is > enabled. > > Also note that pm_sleep_ptr() has not been applied to each callback > in the dev_pm_ops structure because the pm_sleep_ptr() at the usage site > is sufficient. > > Signed-off-by: Paul Cercueil Reviewed-by: Jonathan Cameron