Message ID | 20230427050603.612145-1-kai.heng.feng@canonical.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp45835vqo; Wed, 26 Apr 2023 22:28:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6XhgxEK9aacZsxIo/PKNFw9YsKxp4avjzZIh4Mrp2YuTZN+IER0Gx4NwUqKhzgisAi6cbS X-Received: by 2002:a17:902:b714:b0:1a9:433e:41e7 with SMTP id d20-20020a170902b71400b001a9433e41e7mr228217pls.43.1682573322621; Wed, 26 Apr 2023 22:28:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682573322; cv=none; d=google.com; s=arc-20160816; b=irIAFVYM89KlsAzOyCW7+RW2l59yXGMUh6M+sN9kBKnC7/ZZvmHhwFbBaxdbJLJYbq gmEfOzobsyui1lrCWj83uG+OfQH5pW8OPXh2GsaC+Cp3eMVwLo8xCVX2PuBtQQjHgSH7 79Ix1b/JXdzdabPBvLkSiY5lLXO2amgkZvOfGiVr/4ZlRaXS/KCmyqpBih/fepV1i9dH u2KK2M1Vxlo//PhRjF0g+sPVYCldxK+TiQS4BROEz3WlEapx6xpn/ey4hd+jur3Z8IHz S5j/FG30+4BTxhOekd4Ah6+LGuoIZXnXiTLQus9rcvBAFvGXiSdrV8GUfJg93u0qCt5c ABvA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=Um4+OC4JDEVt05S+LCTCt99oXpjyoXPU9VkPlqtBcoA=; b=vUwTiP08vJmpvn+UYCtngTUEPiXQ01IHD4GBrLliTQSUsztmL+sKqBmg7YL+oYwOnj epE00BmPVg6vvdaPzVBpLJAPwh2WbF6+B0PFe61lFX2twONYYdoV/FhUd8fnNqV3Wv5w bCNEjqH/3m+JCWwCanqoEyDkSzN9sagj91AcXE4dLz0aRmNUIASgnrqjouIg8O13HcPQ bi2ksxl995XzVek925yG+FIzL+VaJ0lKu8kkchKZpPPbq7XL3k2b0LV+vkVHeviMf5VX CPzAWkzJY6KMlMxxLHMxHsMD+tttmP64csdpAMLHtzO9qzI7wB7vhTGZHQFSF7+Fnr48 EmZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b="NUN/EeHz"; 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=canonical.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m9-20020a170902db0900b001a1b75674bdsi19003248plx.207.2023.04.26.22.28.27; Wed, 26 Apr 2023 22:28:42 -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; dkim=pass header.i=@canonical.com header.s=20210705 header.b="NUN/EeHz"; 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=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242701AbjD0FHA (ORCPT <rfc822;zxc52fgh@gmail.com> + 99 others); Thu, 27 Apr 2023 01:07:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229665AbjD0FG7 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 27 Apr 2023 01:06:59 -0400 Received: from smtp-relay-canonical-0.canonical.com (smtp-relay-canonical-0.canonical.com [185.125.188.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5ED640F7; Wed, 26 Apr 2023 22:06:55 -0700 (PDT) Received: from localhost.localdomain (unknown [10.101.196.174]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id BBA3A3F187; Thu, 27 Apr 2023 05:06:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1682572013; bh=Um4+OC4JDEVt05S+LCTCt99oXpjyoXPU9VkPlqtBcoA=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=NUN/EeHzvK+qCID+EhVO+gHdODXIEcugevw+jxoFwr7SbkeAExVr3i/OYsWZyU3Yl CUSUHrVxasvjAmWPKes/wBuFVlhrESRCXazrhSNZ2VefnF0wSZV0NAkb8kO7C8FVqU v1t7NPNnC0ITru1IvjUOXyx2ttqMB7zCCfuFIs88iLc5BGR4Xt+QpEHH2FNa43BE6V PxAJEmyHK1ZnthO1xoZIsd2X9I/FI/EdUA2URxWphf7+TZrgi6E0ATjk2u4fuYdODg IGTfi9myYeUVGzNUYc2oIHw7siioI5+zfdkGtUfgrfy5cYoYkOvtEGISanX7sJDEOR 1LN0y5pju8noA== From: Kai-Heng Feng <kai.heng.feng@canonical.com> To: jejb@linux.ibm.com, martin.petersen@oracle.com Cc: bblock@linux.ibm.com, acelan.kao@canonical.com, Kai-Heng Feng <kai.heng.feng@canonical.com>, "Rafael J. Wysocki" <rafael@kernel.org>, Pavel Machek <pavel@ucw.cz>, Len Brown <len.brown@intel.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 1/2] PM: suspend: Define pm_suspend_target_state Date: Thu, 27 Apr 2023 13:06:02 +0800 Message-Id: <20230427050603.612145-1-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764306004024375575?= X-GMAIL-MSGID: =?utf-8?q?1764306004024375575?= |
Series |
[v3,1/2] PM: suspend: Define pm_suspend_target_state
|
|
Commit Message
Kai-Heng Feng
April 27, 2023, 5:06 a.m. UTC
Define pm_suspend_target_state so it can still be used when
CONFIG_SUSPEND or CONFIG_PM_SLEEP is not set.
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
v3:
- New patch to resolve undefined pm_suspend_target_state.
drivers/base/power/wakeup.c | 5 -----
include/linux/suspend.h | 1 +
2 files changed, 1 insertion(+), 5 deletions(-)
Comments
Hi Kai-Heng, kernel test robot noticed the following build errors: [auto build test ERROR on rafael-pm/linux-next] [also build test ERROR on linus/master pavel-leds/for-next v6.3 next-20230426] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Kai-Heng-Feng/ata-libata-Defer-rescan-on-suspended-device/20230427-130726 base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next patch link: https://lore.kernel.org/r/20230427050603.612145-1-kai.heng.feng%40canonical.com patch subject: [PATCH v3 1/2] PM: suspend: Define pm_suspend_target_state config: mips-randconfig-r002-20230427 (https://download.01.org/0day-ci/archive/20230427/202304271651.DsSWc2rx-lkp@intel.com/config) compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 437b7602e4a998220871de78afcb020b9c14a661) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install mips cross compiling tool for clang build # apt-get install binutils-mipsel-linux-gnu # https://github.com/intel-lab-lkp/linux/commit/03ca901d88f622ddd3bfd75b9f1b62d99881e430 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Kai-Heng-Feng/ata-libata-Defer-rescan-on-suspended-device/20230427-130726 git checkout 03ca901d88f622ddd3bfd75b9f1b62d99881e430 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> | Link: https://lore.kernel.org/oe-kbuild-all/202304271651.DsSWc2rx-lkp@intel.com/ All errors (new ones prefixed by >>): >> ld.lld: error: undefined symbol: pm_suspend_target_state >>> referenced by wakeup.c >>> drivers/base/power/wakeup.o:(device_wakeup_enable) in archive vmlinux.a >>> referenced by wakeup.c >>> drivers/base/power/wakeup.o:(device_wakeup_enable) in archive vmlinux.a
diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c index 7cc0c0cf8eaa..a917219feea6 100644 --- a/drivers/base/power/wakeup.c +++ b/drivers/base/power/wakeup.c @@ -19,11 +19,6 @@ #include "power.h" -#ifndef CONFIG_SUSPEND -suspend_state_t pm_suspend_target_state; -#define pm_suspend_target_state (PM_SUSPEND_ON) -#endif - #define list_for_each_entry_rcu_locked(pos, head, member) \ list_for_each_entry_rcu(pos, head, member, \ srcu_read_lock_held(&wakeup_srcu)) diff --git a/include/linux/suspend.h b/include/linux/suspend.h index cfe19a028918..ff64a596be4b 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -530,6 +530,7 @@ static inline void ksys_sync_helper(void) {} #define pm_notifier(fn, pri) do { (void)(fn); } while (0) +#define pm_suspend_target_state (PM_SUSPEND_ON) static inline bool pm_wakeup_pending(void) { return false; } static inline void pm_system_wakeup(void) {} static inline void pm_wakeup_clear(bool reset) {}