kernel-hacking-2024-linux-s.../drivers/base
Tang Chen 4f7c6b49c4 mem-hotplug: introduce MMOP_OFFLINE to replace the hard coding -1
In store_mem_state(), we have:

  ...
  334         else if (!strncmp(buf, "offline", min_t(int, count, 7)))
  335                 online_type = -1;
  ...
  355         case -1:
  356                 ret = device_offline(&mem->dev);
  357                 break;
  ...

Here, "offline" is hard coded as -1.

This patch does the following renaming:

 ONLINE_KEEP     ->  MMOP_ONLINE_KEEP
 ONLINE_KERNEL   ->  MMOP_ONLINE_KERNEL
 ONLINE_MOVABLE  ->  MMOP_ONLINE_MOVABLE

and introduces MMOP_OFFLINE = -1 to avoid hard coding.

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
Cc: Hu Tao <hutao@cn.fujitsu.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Cc: Gu Zheng <guz.fnst@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-08-06 18:01:16 -07:00
..
power Merge branch 'pm-sleep' 2014-06-12 13:43:08 +02:00
regmap regmap: Allow regmap_get_device() to be used by modules 2014-07-25 18:30:31 +01:00
attribute_container.c
base.h driver core: Move driver_data back to struct device 2014-05-27 12:37:18 -07:00
bus.c
class.c
component.c component: fix bug with legacy API 2014-07-04 18:05:05 +01:00
container.c
core.c
cpu.c
dd.c driver core: Inline dev_set/get_drvdata 2014-05-27 13:46:59 -07:00
devres.c devres: Add devm_kasprintf and devm_kvasprintf API 2014-07-17 18:26:44 -07:00
devtmpfs.c
dma-coherent.c DMA-API: Change dma_declare_coherent_memory() CPU address to phys_addr_t 2014-05-20 16:55:23 -06:00
dma-contiguous.c DMA, CMA: fix possible memory leak 2014-06-23 16:47:44 -07:00
dma-mapping.c DMA-API: Change dma_declare_coherent_memory() CPU address to phys_addr_t 2014-05-20 16:55:23 -06:00
driver.c
firmware.c
firmware_class.c Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2014-08-06 08:06:39 -07:00
hypervisor.c
init.c
isa.c
Kconfig firmware loader: allow disabling of udev as firmware loader 2014-07-08 15:24:39 -07:00
Makefile dma-buf: move to drivers/dma-buf 2014-07-08 10:51:06 -07:00
map.c
memory.c mem-hotplug: introduce MMOP_OFFLINE to replace the hard coding -1 2014-08-06 18:01:16 -07:00
module.c
node.c
pinctrl.c
platform.c Driver core patches for 3.17-rc1 2014-08-04 18:34:04 -07:00
soc.c
syscore.c PM / sleep: trace events for suspend/resume 2014-06-07 00:18:07 +02:00
topology.c
transport_class.c