From patchwork Mon Sep 18 08:09:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raag Jadav X-Patchwork-Id: 14200 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp3279804vqi; Tue, 19 Sep 2023 03:40:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFl0T0RDoC713Re31uW4a3SENV1QYvi5Rwo55EmC9QwOq9C6Exa0u58VH4NLDvid1w2wdFC X-Received: by 2002:a17:90a:17cb:b0:274:8f11:96c9 with SMTP id q69-20020a17090a17cb00b002748f1196c9mr8822768pja.44.1695120025556; Tue, 19 Sep 2023 03:40:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695120025; cv=none; d=google.com; s=arc-20160816; b=yuGCKgIgXK3FlHeDPGlTArjyApjQmwKf1CoPWjf88xeVNZ8ElKb2t0K2Qb9OMMUSq5 bY0dQAS2IDdG3owPi7lgeiv5yRtdKTYBPAUtMEXM0Tz4AO+JRYDI2S3PERbqdseIjJb+ AEEIr9l8pKXUYN4ETv7R9FoWqMdkrKy8gxxviQC2JLFHHGjmBIqMJgn2Lgkt2EDYQMHr 1jv2/sehAZOzCg4tohnga9rh9N69g2yVzDeOyTAJj9V4/9TtZc6kR4xgPI8FZK/bBdjI J8rKI6Ir8X/9PkCMxkWtUawxtihsYhAZzxYtf7/QFcllA+T9VmO2NkgKl1ZhdkIZnCoU hmSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=rtvtQBgPetPNbeZYKJpgmHQFnOGRenkX2Y8DCoe6lG0=; fh=1QsehnRRXzgQVMnszcmG8t4pVcJCGn85JlNaIfZPQ9Q=; b=h41MdqFUNhKg+hCe0ZLtRFSoL2w3uPyBDv8hdXyU1OlcwpHqeHApKRkTWz+DfKBiXJ g9dHEG/NIcXpUA/Bb9LNeSZ5E5kE4Zne0Q0csaKxahEkkRyGRYdIL184+JIRIIbyCDWB tQxzbPcOTjf8le4EoXJSJD9rgUzbqaVM2Fk6Z+XFh13ZjbGsdHFZaS92M3V5Td7tc5pk KJXQJN3oLb0mGPWg6DUF61KLxFGWgkubjm4gGuErLN8Z/BgOlHxVKlJC9vIU3iZayswi o16QAHyLbMqMeJTpan5p7zjw+xCyXMYqPWl6BXEsMp7pORF0ejDv+U39doz4zn8xOJ0u Hmag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=G9LJdc+R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id ob8-20020a17090b390800b0026376acd6fesi691772pjb.22.2023.09.19.03.40.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 03:40:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=G9LJdc+R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id BD35780BE3C2; Mon, 18 Sep 2023 01:12:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240614AbjIRIKx (ORCPT + 27 others); Mon, 18 Sep 2023 04:10:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240534AbjIRIK3 (ORCPT ); Mon, 18 Sep 2023 04:10:29 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D51499; Mon, 18 Sep 2023 01:10:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695024624; x=1726560624; h=from:to:cc:subject:date:message-id; bh=z53DQi3OMtw1hJWbbZsWKA60P424xUL1Xq/vuIDGPRw=; b=G9LJdc+RmSbo1DOm8yvcT21HUTTi/X8zmjp7+3RyhCXh75z7k52NXzxM 15R5t2xs9/Q8+xzGm9ZvVxRk3HsfeyzFLMiW+9DnFk1nSqRXnJL8lQgBH UZy8znv9F5+y/YJzuIhFuNmWqcedyKm2oXFUQW8ofz6cE86c5pUydhjc2 eSFyV7j7L2oYsgjyHSivSPqpXW8vZD6Wl2FSp1Fu4pgtUQhV1Yy7c16OL fstLZvd6ajlOxM+EV7f2q3xcJ3UNt8I476I4VUe4TBHwqrGYEmcdfW04B 1B5OqBdr/WO9PedxJ+buufRNommgv6dxw4JdTmkn+oo5mwLCXePTpRQRC g==; X-IronPort-AV: E=McAfee;i="6600,9927,10836"; a="410550826" X-IronPort-AV: E=Sophos;i="6.02,156,1688454000"; d="scan'208";a="410550826" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2023 01:10:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10836"; a="695442254" X-IronPort-AV: E=Sophos;i="6.02,156,1688454000"; d="scan'208";a="695442254" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by orsmga003.jf.intel.com with ESMTP; 18 Sep 2023 01:10:10 -0700 From: Raag Jadav To: rafael@kernel.org, len.brown@intel.com, pavel@ucw.cz, Jonathan.Cameron@huawei.com, paul@crapouillou.net, andriy.shevchenko@linux.intel.com, lars@metafoo.de, rmfrfs@gmail.com, jean-baptiste.maneyrol@tdk.com, lee@kernel.org, laurentiu.palcu@oss.nxp.com, l.stach@pengutronix.de, james.schulman@cirrus.com, david.rhodes@cirrus.com, rf@opensource.cirrus.com Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, dri-devel@lists.freedesktop.org, patches@opensource.cirrus.com, mallikarjunappa.sangannavar@intel.com, bala.senthil@intel.com, Raag Jadav Subject: [PATCH for-next v2 00/10] Fix symbol export for _SIMPLE_ variants of _PM_OPS() Date: Mon, 18 Sep 2023 13:39:41 +0530 Message-Id: <20230918080951.3615-1-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 18 Sep 2023 01:12:27 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777462175768327255 X-GMAIL-MSGID: 1777462175768327255 Currently EXPORT_*_SIMPLE_DEV_PM_OPS() use EXPORT_*_DEV_PM_OPS() set of macros to export dev_pm_ops symbol, which export the symbol in case CONFIG_PM=y but don't take CONFIG_PM_SLEEP into consideration. Since _SIMPLE_ variants of _PM_OPS() do not include runtime PM handles and are only used in case CONFIG_PM_SLEEP=y, we should not be exporting dev_pm_ops symbol for them in case CONFIG_PM_SLEEP=n. This can be fixed by having two distinct set of export macros for both _RUNTIME_ and _SIMPLE_ variants of _PM_OPS(), such that the export of dev_pm_ops symbol used in each variant depends on CONFIG_PM and CONFIG_PM_SLEEP respectively. Changes since v1: - Update drivers to new set of macros Raag Jadav (10): PM: Introduce export macros for _SIMPLE_ variants of _PM_OPS() PM: Update EXPORT_*_DEV_PM_OPS() to EXPORT_*_RUNTIME_PM_OPS() iio: accel: fxls8962af: convert to EXPORT_NS_GPL_RUNTIME_PM_OPS() iio: gyro: fxas21002c: convert to EXPORT_NS_GPL_RUNTIME_PM_OPS() iio: imu: inv_icm42600: convert to EXPORT_NS_GPL_RUNTIME_PM_OPS() iio: imu: inv_mpu: convert to EXPORT_NS_GPL_RUNTIME_PM_OPS() drm/imx/dcss: convert to EXPORT_GPL_RUNTIME_PM_OPS() mfd: arizona: convert to EXPORT_GPL_RUNTIME_PM_OPS() mfd: cs42l43: convert to EXPORT_NS_GPL_RUNTIME_PM_OPS() ASoC: cs35l41: convert to EXPORT_GPL_RUNTIME_PM_OPS() drivers/gpu/drm/imx/dcss/dcss-dev.c | 2 +- drivers/iio/accel/fxls8962af-core.c | 2 +- drivers/iio/gyro/fxas21002c_core.c | 2 +- .../iio/imu/inv_icm42600/inv_icm42600_core.c | 2 +- drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 2 +- drivers/mfd/arizona-core.c | 2 +- drivers/mfd/cs42l43.c | 2 +- include/linux/pm.h | 38 ++++++++++++------- include/linux/pm_runtime.h | 13 +++++-- sound/soc/codecs/cs35l41.c | 2 +- 10 files changed, 41 insertions(+), 26 deletions(-)