[rafael-pm:bleeding-edge 10/36] drivers/char/apm-emulation.c:91:2: error: redefinition of enumerator 'SUSPEND_NONE'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git bleeding-edge
head:   7f82463a4ec5fd466fa00e93d627b38da5d43ae2
commit: 0897a442fca735890658fe84ace34bdac0e7bcce [10/36] PM: sleep: stats: Use array of suspend step names
config: arm-randconfig-001-20240203 (https://download.01.org/0day-ci/archive/20240204/202402041425.jNvSR8Q1-lkp@xxxxxxxxx/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 7dd790db8b77c4a833c06632e903dc4f13877a64)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240204/202402041425.jNvSR8Q1-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202402041425.jNvSR8Q1-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

>> drivers/char/apm-emulation.c:91:2: error: redefinition of enumerator 'SUSPEND_NONE'
      91 |         SUSPEND_NONE,
         |         ^
   include/linux/suspend.h:44:2: note: previous definition is here
      44 |         SUSPEND_NONE = 0,
         |         ^
   drivers/char/apm-emulation.c:319:23: warning: implicit conversion from enumeration type 'enum suspend_stat_step' to different enumeration type 'enum apm_suspend_state' [-Wenum-conversion]
     319 |                 as->suspend_state = SUSPEND_NONE;
         |                                   ~ ^~~~~~~~~~~~
   1 warning and 1 error generated.


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@xxxxxxxxxxxxxxxx>
:::::: CC: Andi Kleen <andi@xxxxxxxxxxxxxxxxx>

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




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux