public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: oe-kbuild-all@lists.linux.dev, linux-acpi@vger.kernel.org,
	devel@acpica.org, linux-pm@vger.kernel.org,
	Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>,
	Ulf Hansson <ulf.hansson@linaro.org>
Subject: [rafael-pm:bleeding-edge 8/30] drivers/char/apm-emulation.c:91:9: error: redeclaration of enumerator 'SUSPEND_NONE'
Date: Thu, 1 Feb 2024 06:15:08 +0800	[thread overview]
Message-ID: <202402010647.vqP6EYJu-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge
head:   bd0e3c391ff3c3c5c9b41227d6b7433fcf4d9c61
commit: 0897a442fca735890658fe84ace34bdac0e7bcce [8/30] PM: sleep: stats: Use array of suspend step names
config: arm-randconfig-002-20240201 (https://download.01.org/0day-ci/archive/20240201/202402010647.vqP6EYJu-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240201/202402010647.vqP6EYJu-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202402010647.vqP6EYJu-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/char/apm-emulation.c:91:9: error: redeclaration of enumerator 'SUSPEND_NONE'
      91 |         SUSPEND_NONE,
         |         ^~~~~~~~~~~~
   In file included from drivers/char/apm-emulation.c:24:
   include/linux/suspend.h:44:9: note: previous definition of 'SUSPEND_NONE' with type 'enum suspend_stat_step'
      44 |         SUSPEND_NONE = 0,
         |         ^~~~~~~~~~~~


vim +/SUSPEND_NONE +91 drivers/char/apm-emulation.c

7726942fb15edd Ralf Baechle  2007-02-09  50  
d20a4dca47d2cd Johannes Berg 2008-06-11  51  /*
d20a4dca47d2cd Johannes Berg 2008-06-11  52   * thread states (for threads using a writable /dev/apm_bios fd):
d20a4dca47d2cd Johannes Berg 2008-06-11  53   *
d20a4dca47d2cd Johannes Berg 2008-06-11  54   * SUSPEND_NONE:	nothing happening
d20a4dca47d2cd Johannes Berg 2008-06-11  55   * SUSPEND_PENDING:	suspend event queued for thread and pending to be read
d20a4dca47d2cd Johannes Berg 2008-06-11  56   * SUSPEND_READ:	suspend event read, pending acknowledgement
d20a4dca47d2cd Johannes Berg 2008-06-11  57   * SUSPEND_ACKED:	acknowledgement received from thread (via ioctl),
d20a4dca47d2cd Johannes Berg 2008-06-11  58   *			waiting for resume
d20a4dca47d2cd Johannes Berg 2008-06-11  59   * SUSPEND_ACKTO:	acknowledgement timeout
d20a4dca47d2cd Johannes Berg 2008-06-11  60   * SUSPEND_DONE:	thread had acked suspend and is now notified of
d20a4dca47d2cd Johannes Berg 2008-06-11  61   *			resume
d20a4dca47d2cd Johannes Berg 2008-06-11  62   *
d20a4dca47d2cd Johannes Berg 2008-06-11  63   * SUSPEND_WAIT:	this thread invoked suspend and is waiting for resume
d20a4dca47d2cd Johannes Berg 2008-06-11  64   *
d20a4dca47d2cd Johannes Berg 2008-06-11  65   * A thread migrates in one of three paths:
d20a4dca47d2cd Johannes Berg 2008-06-11  66   *	NONE -1-> PENDING -2-> READ -3-> ACKED -4-> DONE -5-> NONE
d20a4dca47d2cd Johannes Berg 2008-06-11  67   *				    -6-> ACKTO -7-> NONE
d20a4dca47d2cd Johannes Berg 2008-06-11  68   *	NONE -8-> WAIT -9-> NONE
d20a4dca47d2cd Johannes Berg 2008-06-11  69   *
d20a4dca47d2cd Johannes Berg 2008-06-11  70   * While in PENDING or READ, the thread is accounted for in the
d20a4dca47d2cd Johannes Berg 2008-06-11  71   * suspend_acks_pending counter.
d20a4dca47d2cd Johannes Berg 2008-06-11  72   *
d20a4dca47d2cd Johannes Berg 2008-06-11  73   * The transitions are invoked as follows:
d20a4dca47d2cd Johannes Berg 2008-06-11  74   *	1: suspend event is signalled from the core PM code
d20a4dca47d2cd Johannes Berg 2008-06-11  75   *	2: the suspend event is read from the fd by the userspace thread
d20a4dca47d2cd Johannes Berg 2008-06-11  76   *	3: userspace thread issues the APM_IOC_SUSPEND ioctl (as ack)
d20a4dca47d2cd Johannes Berg 2008-06-11  77   *	4: core PM code signals that we have resumed
d20a4dca47d2cd Johannes Berg 2008-06-11  78   *	5: APM_IOC_SUSPEND ioctl returns
d20a4dca47d2cd Johannes Berg 2008-06-11  79   *
d20a4dca47d2cd Johannes Berg 2008-06-11  80   *	6: the notifier invoked from the core PM code timed out waiting
d20a4dca47d2cd Johannes Berg 2008-06-11  81   *	   for all relevant threds to enter ACKED state and puts those
d20a4dca47d2cd Johannes Berg 2008-06-11  82   *	   that haven't into ACKTO
d20a4dca47d2cd Johannes Berg 2008-06-11  83   *	7: those threads issue APM_IOC_SUSPEND ioctl too late,
d20a4dca47d2cd Johannes Berg 2008-06-11  84   *	   get an error
d20a4dca47d2cd Johannes Berg 2008-06-11  85   *
d20a4dca47d2cd Johannes Berg 2008-06-11  86   *	8: userspace thread issues the APM_IOC_SUSPEND ioctl (to suspend),
d20a4dca47d2cd Johannes Berg 2008-06-11  87   *	   ioctl code invokes pm_suspend()
d20a4dca47d2cd Johannes Berg 2008-06-11  88   *	9: pm_suspend() returns indicating resume
d20a4dca47d2cd Johannes Berg 2008-06-11  89   */
d20a4dca47d2cd Johannes Berg 2008-06-11  90  enum apm_suspend_state {
d20a4dca47d2cd Johannes Berg 2008-06-11 @91  	SUSPEND_NONE,
d20a4dca47d2cd Johannes Berg 2008-06-11  92  	SUSPEND_PENDING,
d20a4dca47d2cd Johannes Berg 2008-06-11  93  	SUSPEND_READ,
d20a4dca47d2cd Johannes Berg 2008-06-11  94  	SUSPEND_ACKED,
d20a4dca47d2cd Johannes Berg 2008-06-11  95  	SUSPEND_ACKTO,
d20a4dca47d2cd Johannes Berg 2008-06-11  96  	SUSPEND_WAIT,
d20a4dca47d2cd Johannes Berg 2008-06-11  97  	SUSPEND_DONE,
d20a4dca47d2cd Johannes Berg 2008-06-11  98  };
d20a4dca47d2cd Johannes Berg 2008-06-11  99  

:::::: The code at line 91 was first introduced by commit
:::::: d20a4dca47d2cd027ed58a13f91b424affd1f449 APM emulation: Notify about all suspend events, not just APM invoked ones (v2)

:::::: TO: Johannes Berg <johannes@sipsolutions.net>
:::::: CC: Andi Kleen <andi@basil.nowhere.org>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2024-01-31 22:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202402010647.vqP6EYJu-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=devel@acpica.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rjw@rjwysocki.net \
    --cc=stanislaw.gruszka@linux.intel.com \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox