Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7648876rwl; Fri, 30 Dec 2022 11:49:26 -0800 (PST) X-Google-Smtp-Source: AMrXdXvcUFmMentQ2KsPNu8ri34zhhmHeTZNa99/Rt2DCbKp8a9ehKM6CJc8mkHpKvrFEvmq3Af4 X-Received: by 2002:a17:906:27c5:b0:7c0:c220:a33d with SMTP id k5-20020a17090627c500b007c0c220a33dmr33241285ejc.9.1672429765820; Fri, 30 Dec 2022 11:49:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672429765; cv=none; d=google.com; s=arc-20160816; b=aIvJMTJgl57ER0oImPtpdimlEWxg8o1ZeGnDa1Nng4KsPMaWnphgs01bZCQbYLyQzd n83XUEime6M3uvlQx4bX5OCCBv/+K8ciHH0uiyFrdMgXE6yauVYUoC3YBga8eYqgznZr OzkGp4L+y6qYLit676W+FEJv/IwFYvvOxJpUtCDWGo0hxg3FMQ2L4J4hwMGx/+sLemt1 Pzp6Je8E7H/zKZTiD5LLg4hMQK7RvFV+K381886/yE4qOqaS1QMY2CcoEbYi5mNSdAV6 SjiRGpwNkaYXRNmABq2pwlML/9HfJlwGaUKHNTtGPg+/vDbBgLkOpBwkgKxf3GSMhvuJ vA5Q== 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; bh=9r/q/xkBcl0YbFZSmKypcL8QeNyZepAafv2DtpMqb5s=; b=uDriEprQYu2qUUkyv8vN4nsaw5pKdFqvc2zXYcM5DeSIKZ5MS3OtnRZAEFuPVta1um aAfCh4anoCCUwP6f+YgiYjstHDrbE3XI+jJGNADCym5mxTcHJebioBJ3FbLAxsRBrHYD 2qu/2HNsBiAMAcGLelgsXP4iLcTOTAVSQZZ8jEB+y3ndy5iLgzom9hd1siKvkp6t1FQQ JsNv+4FOynUINR32st1BmjTsfjgoO++HUXOg/JNn8rU+mSoi6+B3bIw1wi0mXptw12sT gjBB+eAa+Mh90IFoWoPiJXTxskaJZVm4fJja4/c6lg9qObuIECMssQd5iThklKq66Xm+ M8iA== 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cr21-20020a170906d55500b0084a52896274si16508362ejc.961.2022.12.30.11.49.10; Fri, 30 Dec 2022 11:49:25 -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; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231443AbiL3Tc0 (ORCPT + 64 others); Fri, 30 Dec 2022 14:32:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229610AbiL3TcY (ORCPT ); Fri, 30 Dec 2022 14:32:24 -0500 Received: from mail-il1-f169.google.com (mail-il1-f169.google.com [209.85.166.169]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24FE518681; Fri, 30 Dec 2022 11:32:23 -0800 (PST) Received: by mail-il1-f169.google.com with SMTP id g2so8607436ila.4; Fri, 30 Dec 2022 11:32:23 -0800 (PST) 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=9r/q/xkBcl0YbFZSmKypcL8QeNyZepAafv2DtpMqb5s=; b=FiDXi7hByRZPfV2KkM11mjsC0haaEtUG6e7odLmujLd2degXFFw7cbNnB5itVZDD5g 5fJ+UluB+9jmxHjiKJWGMeKt3e6OEynPMfT4BkQYCKFnSzp/2Me8TbIRTqLC0MtXMT2z ZwamOyEZt+lmd6NxZ33dnZj+bJehVS23H+WHadREhd5E0QUTZxF/sbt+4JFF9MR1lRG3 Tw0ceLlcp+v2ESq4AW8cWslr3hwPsNrelawegeK7n2159wUJq0gMfaNc/CwQR0kFiVu/ o0BC5aSJDF/M5Zj6jNxGc6yCJQgsDkrJ9CdDNUb1Y6r4fl4YDvD4fmclpaKkl4U126RB kuZQ== X-Gm-Message-State: AFqh2kq4+vleJO7Q8xeREfuwvicuCtfE4QyNrvqznQTerdhwWPQ2CPt9 +wJDcT565jWmm9u0n+YwuwbbeUH4ryrY4ufv0Ks= X-Received: by 2002:a92:d481:0:b0:30c:35b3:fa02 with SMTP id p1-20020a92d481000000b0030c35b3fa02mr166613ilg.145.1672428742400; Fri, 30 Dec 2022 11:32:22 -0800 (PST) MIME-Version: 1.0 References: <20221229125957.45923-1-andriy.shevchenko@linux.intel.com> <20221229125957.45923-2-andriy.shevchenko@linux.intel.com> In-Reply-To: From: "Rafael J. Wysocki" Date: Fri, 30 Dec 2022 20:32:10 +0100 Message-ID: Subject: Re: [PATCH v1 1/3] pm: Introduce DEFINE_NOIRQ_DEV_PM_OPS() helper To: Andy Shevchenko Cc: "Rafael J. Wysocki" , Andy Shevchenko , Mika Westerberg , "Rafael J. Wysocki" , Paul Cercueil , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Andy Shevchenko , Linus Walleij , Len Brown , Pavel Machek Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS 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 Fri, Dec 30, 2022 at 8:23 PM Andy Shevchenko wrote: > > On Fri, Dec 30, 2022 at 8:43 PM Rafael J. Wysocki wrote: > > On Thu, Dec 29, 2022 at 1:59 PM Andy Shevchenko > > wrote: > > > > > > There are a few drivers and might be more in the future that > > > open code the functionality of proposed DEFINE_NOIRQ_DEV_PM_OPS() > > > helper. From now on they may switch to the new helper and save > > > a few lines of code. > > ... > > > > +#define DEFINE_NOIRQ_DEV_PM_OPS(name, suspend_fn, resume_fn) \ > > > +const struct dev_pm_ops name = { \ > > > + NOIRQ_SYSTEM_SLEEP_PM_OPS(suspend_fn, resume_fn) \ > > > +} > > > > There is NOIRQ_SYSTEM_SLEEP_PM_OPS(), so why is the above needed in addition? > > It defines the constant object of struct dev_pm_ops type with this > included and as the commit message says, allows to save a few lines of > code in each of the drivers that uses NOIRQ_SYSTEM_SLEEP_PM_OPS() > currently. The examples on how to convert are provided in the patches > 2 and 3. So this is in analogy with _DEFINE_DEV_PM_OPS(), isn't it? It would be good to mention this in the changelog. IMO the changelog is rather hard to follow in general and it should not refer to the changes made in order to understand what's going on.