Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7646638rwl; Fri, 30 Dec 2022 11:46:26 -0800 (PST) X-Google-Smtp-Source: AMrXdXurvvPkobYLB4RksXNUSFOz7YejU5CDuAh323LI7r3pV58pPkVyviE9GnMPfU4FoMXPg3aA X-Received: by 2002:a17:906:eda7:b0:7c4:f402:9769 with SMTP id sa7-20020a170906eda700b007c4f4029769mr36527600ejb.76.1672429585875; Fri, 30 Dec 2022 11:46:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672429585; cv=none; d=google.com; s=arc-20160816; b=GMfMEVTmisykxHaUOx8FG4N25YmBenF7cLgLxsNzDiqr1k3vJX4OMBxfN7zO18HS8z kA/Z+sppB+6+zPzDZJUaHpkyTAX0u/MhVxzhLWumEqTSjN/ur4cNt3woA50KhLeucoGc 48KxK7G4onYCHe8WXMHQtaSjXTHL2Exwkg/AYj6bBMRof4KJUWqVaWjVETb3tt/0pLgj CJ6KomrJdCWzLM951IujXLlpJAFOecnNog1IxgRUezua2UNOjUpQbhAi5k66d8KXLKzA 9gKibQWChkHy6Xt/yFKS4C6YCbU5NALqaFKT9cd2f2c0Jmf/nFHB5YUhYJdZCS6C9vkP OgYQ== 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=D84WOL4GXwiTJJrpeQ62xovhe59CcQCnUedXOg/LW00=; b=ChN9YcpZoVMIIbqgKwS0TjSYlvBxiLTvobTP3uaGowZMUDPzY2YQJdqT7bNALveAeI 6BXjfQE2FG3PnTF4dkj5j+rcPBeXf7wNS2gNB82eVARqdFKMbTNRYghoTtRWChlPBFZZ G1jZAnWdB/OOjNqaH6g9XNO1YInB5k1kJzo8SPkFys0XiVqzWS85Lp7AbZ60vytW1QLn dOWYfBy/vtAHNMmP8+Ys1EKQnFHp0M342TqGSHUxUS97stcfS+8X22VPQodm6/QTHnEW u3B3y/APYlCg+/ubzyw4QWAFE54O9rpqYqv2oKEynthI8KPieBMQMc0b84tP1Ed7Hy/m St9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=EuHJC6PQ; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id be3-20020a1709070a4300b007c10640d8e0si18405653ejc.723.2022.12.30.11.46.07; Fri, 30 Dec 2022 11:46: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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=EuHJC6PQ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235273AbiL3TX6 (ORCPT + 63 others); Fri, 30 Dec 2022 14:23:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231443AbiL3TXx (ORCPT ); Fri, 30 Dec 2022 14:23:53 -0500 Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D82791C109; Fri, 30 Dec 2022 11:23:52 -0800 (PST) Received: by mail-qk1-x72e.google.com with SMTP id pe2so10737978qkn.1; Fri, 30 Dec 2022 11:23:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=D84WOL4GXwiTJJrpeQ62xovhe59CcQCnUedXOg/LW00=; b=EuHJC6PQvaT3bny/WLU7UySyxKy95WJVrh6K52HROLylITYzIzx8pU2j83UreqPVEc PqDU7/HtRPUwJDIfShHAI30gshq21vjYX8Ya4wYqfv29tAtZrHnWIoc+6ySZCllxu5Px BuCJHLe/JkpcjSkgVJ5e4qYjRZjsuavGN+oFEyYa5BCL5RjUJdCG+j2ZMZMapUQjuTef x3h73DVJucewKBWWkKey5PHchnWCX10wy3YUL4YpA1E2v+3D0ElkSFl/6rO5JX9pAX7d AmPx+cgpvQEifQ0yph+liQ0/LxcX9GXjMgQlP8u5dCcivLlWgL/Kb3cNTmhzTt2sMzyA BQ/A== 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=D84WOL4GXwiTJJrpeQ62xovhe59CcQCnUedXOg/LW00=; b=iOcamezx6w+qDAsFoAsG0JsaudwINpRu0M3LVRZfd8mPif1eOqUtJC4516QsyCkYBs sY3NNFAVCLns98tJeU4fYByIuq93hnp0Ie4BetYXUd7BV2+X+5bUMkB1Up+SIYLMsgBg zkx7DRJ8HyHZjGXSuzWbV0js+FPuMYsM509yjAvvHW+MclD0K7x47E+XXONmsesgGKrB e/9+OmyDDpGz3T8/BQg2CjR/gAvXfc7a3AmljOmgIl9S6nnqqRyR6seUzCvImsmJn/r0 sHqmTfmjtiiqITZrv+JgK1m8fh84oL4ZEjklKsJtPLeDmwjTZdscp572v9EbV/YKxmpk 1R7w== X-Gm-Message-State: AFqh2kqVirx77ry0MPMXOx//FcRYfh7x3nTnrcB07wSQbHy/IyyK3jok oxeyUATsLNELRQFnOc3PzFZiI757tmM0xkSIyUA= X-Received: by 2002:a37:a96:0:b0:6ff:3ebb:500 with SMTP id 144-20020a370a96000000b006ff3ebb0500mr1836335qkk.320.1672428231949; Fri, 30 Dec 2022 11:23:51 -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: Andy Shevchenko Date: Fri, 30 Dec 2022 21:23:15 +0200 Message-ID: Subject: Re: [PATCH v1 1/3] pm: Introduce DEFINE_NOIRQ_DEV_PM_OPS() helper To: "Rafael J. Wysocki" Cc: 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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 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. -- With Best Regards, Andy Shevchenko