Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7629396rwl; Fri, 30 Dec 2022 11:24:40 -0800 (PST) X-Google-Smtp-Source: AMrXdXsv63SsGtSI5e7iejJ3r8dNnRmFL3ITOb799KLiuL5Pp80Cw8hPzD1kE+P0RNpPOgTvsVKS X-Received: by 2002:a17:907:a789:b0:7c0:bbab:22e5 with SMTP id vx9-20020a170907a78900b007c0bbab22e5mr29221682ejc.16.1672428280470; Fri, 30 Dec 2022 11:24:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672428280; cv=none; d=google.com; s=arc-20160816; b=l4nnErq0bO3InOynrqfo0W98BUu8yBcdtJO/7eKr2uHDMueY04gZFIJ2PnUI65QXPw 0rJz+DsUacLilMLqqg47/nGOIE9LeoFuJTsZBgO6vjN2LqgPZuJtfFPjHTj+Iic+ozvW PumfNs8ySf7T15n7/GpYR3y8w5HzJNmPSNWHTNURH8OXfrLn5u3r3e/JJJc+5MX54Ad1 2G6vF1YSkHaLPwNXCIYLF4hwtQpUFPSZBHGP1FDWYEMXMyyxeJ8aRmMd6UazhobuqEay qnZTWdsCewqLffI6ezvBbnfHUqkbWhxvqEkSGEYEX5bQIKVuVmP2P7DQcUyYwkzFuXOM ILxA== 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=Bo9uiJL+jQwXg/fmSBNdw4FLuv03OF+8Leb88B6BpXY=; b=vpMemmnQyH2H5Zgh5uSc2PS0fDphq4WZ7/vALRoCvSXO5wfq6DUwuoQc0EV/ZFc1Vy AWl0ntSyM0cE1YHXjqblndzTZu/0EGKDfEHLAO8z/Vdn4fVdoHVQdEm3PCQfEgTmXR2C pX5oAXYudmS8gpGgxM7p211PXyBNh3MNaHpr6lWGXiiv/P4zfBrM4dyBZmCW+w+l36i1 9VEcxmEyNQGDq5AGYSYRejyjaW8SGsJYRn7L5v+6BybbAb9Ch90G2fjKoFuD4pDAV2k0 LVaGpCAiUMZ4jKwER3IPne20mceun4qlUxJ4RAfAXhwgQwpElrPImCZa62K1fQvbDfiX 8HpQ== 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 ds14-20020a170907724e00b00787bacce740si19984989ejc.537.2022.12.30.11.24.25; Fri, 30 Dec 2022 11:24:40 -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 S235335AbiL3SnU (ORCPT + 63 others); Fri, 30 Dec 2022 13:43:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231210AbiL3SnR (ORCPT ); Fri, 30 Dec 2022 13:43:17 -0500 Received: from mail-io1-f46.google.com (mail-io1-f46.google.com [209.85.166.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A4ED193D5; Fri, 30 Dec 2022 10:43:17 -0800 (PST) Received: by mail-io1-f46.google.com with SMTP id g20so11518317iob.2; Fri, 30 Dec 2022 10:43:17 -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=Bo9uiJL+jQwXg/fmSBNdw4FLuv03OF+8Leb88B6BpXY=; b=acNNmHz0N5oMexsM6/3PY1qYtj12Nah/kOlT/408nzaSdoqwyIY5c1gMJFwoM/d206 N8vsnNstAOS1fDGrEbdbq7KQUZGNpKyI5HTWyAP370/CfhDAR/a7mEFaKO6/mhbif0wk C8qA5xRoGwhiViJmP6q0MsYnt8MOUaEBK3pooXQmfHn2UAZxYM2vUDspNegpTWor234t gr/riKz7LYpcMyzm19nPoHZ0VT9/KHYOPxgFdmPXVt8itkZt6xGK8WyATrMqH4ivx4QX Y7tNhwZ6lsfkmfgu1EJtkBTYLmAHhoYIAAKTRNyB9knSLTQdCeTBe7q+P9YHd5Meiv3+ clPA== X-Gm-Message-State: AFqh2koIQbWLxrQBdc4Q28qqoWQi2rJLmII7Sqh+VBi19x3+gvYeCDvQ Dfg7EeLRvwxISpVdRzB7A7j8ixr5alog1s0Qals= X-Received: by 2002:a05:6638:8d:b0:38a:3357:8a4 with SMTP id v13-20020a056638008d00b0038a335708a4mr2599316jao.53.1672425796354; Fri, 30 Dec 2022 10:43:16 -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: <20221229125957.45923-2-andriy.shevchenko@linux.intel.com> From: "Rafael J. Wysocki" Date: Fri, 30 Dec 2022 19:43:04 +0100 Message-ID: Subject: Re: [PATCH v1 1/3] pm: Introduce DEFINE_NOIRQ_DEV_PM_OPS() helper To: Andy Shevchenko Cc: 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 , "Rafael J. Wysocki" , 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 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. > > Signed-off-by: Andy Shevchenko > --- > include/linux/pm.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/include/linux/pm.h b/include/linux/pm.h > index 93cd34f00822..eba96822b1d9 100644 > --- a/include/linux/pm.h > +++ b/include/linux/pm.h > @@ -444,6 +444,11 @@ const struct dev_pm_ops __maybe_unused name = { \ > SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn) \ > } > > +#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? > + > #define pm_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_PM), (_ptr)) > #define pm_sleep_ptr(_ptr) PTR_IF(IS_ENABLED(CONFIG_PM_SLEEP), (_ptr)) > > --