Skip to content

Commit 318c893

Browse files
committed
Merge branch 'akpm' (patches from Andrew)
Merge more fixes from Andrew Morton: "3 fixes" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: kcov: add missing #include <linux/sched.h> radix tree test suite: fix compilation zram: restrict add/remove attributes to root only
2 parents ea5a9ef + 166ad0e commit 318c893

5 files changed

Lines changed: 9 additions & 31 deletions

File tree

drivers/block/zram/zram_drv.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1413,8 +1413,14 @@ static ssize_t hot_remove_store(struct class *class,
14131413
return ret ? ret : count;
14141414
}
14151415

1416+
/*
1417+
* NOTE: hot_add attribute is not the usual read-only sysfs attribute. In a
1418+
* sense that reading from this file does alter the state of your system -- it
1419+
* creates a new un-initialized zram device and returns back this device's
1420+
* device_id (or an error code if it fails to create a new device).
1421+
*/
14161422
static struct class_attribute zram_control_class_attrs[] = {
1417-
__ATTR_RO(hot_add),
1423+
__ATTR(hot_add, 0400, hot_add_show, NULL),
14181424
__ATTR_WO(hot_remove),
14191425
__ATTR_NULL,
14201426
};

kernel/kcov.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <linux/fs.h>
88
#include <linux/mm.h>
99
#include <linux/printk.h>
10+
#include <linux/sched.h>
1011
#include <linux/slab.h>
1112
#include <linux/spinlock.h>
1213
#include <linux/vmalloc.h>

lib/radix-tree.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#include <linux/percpu.h>
3131
#include <linux/slab.h>
3232
#include <linux/kmemleak.h>
33-
#include <linux/notifier.h>
3433
#include <linux/cpu.h>
3534
#include <linux/string.h>
3635
#include <linux/bitops.h>
Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1 @@
1-
2-
#define hotcpu_notifier(a, b)
3-
4-
#define CPU_ONLINE 0x0002 /* CPU (unsigned)v is up */
5-
#define CPU_UP_PREPARE 0x0003 /* CPU (unsigned)v coming up */
6-
#define CPU_UP_CANCELED 0x0004 /* CPU (unsigned)v NOT coming up */
7-
#define CPU_DOWN_PREPARE 0x0005 /* CPU (unsigned)v going down */
8-
#define CPU_DOWN_FAILED 0x0006 /* CPU (unsigned)v NOT going down */
9-
#define CPU_DEAD 0x0007 /* CPU (unsigned)v dead */
10-
#define CPU_POST_DEAD 0x0009 /* CPU (unsigned)v dead, cpu_hotplug
11-
* lock is dropped */
12-
#define CPU_BROKEN 0x000C /* CPU (unsigned)v did not die properly,
13-
* perhaps due to preemption. */
14-
#define CPU_TASKS_FROZEN 0x0010
15-
16-
#define CPU_ONLINE_FROZEN (CPU_ONLINE | CPU_TASKS_FROZEN)
17-
#define CPU_UP_PREPARE_FROZEN (CPU_UP_PREPARE | CPU_TASKS_FROZEN)
18-
#define CPU_UP_CANCELED_FROZEN (CPU_UP_CANCELED | CPU_TASKS_FROZEN)
19-
#define CPU_DOWN_PREPARE_FROZEN (CPU_DOWN_PREPARE | CPU_TASKS_FROZEN)
20-
#define CPU_DOWN_FAILED_FROZEN (CPU_DOWN_FAILED | CPU_TASKS_FROZEN)
21-
#define CPU_DEAD_FROZEN (CPU_DEAD | CPU_TASKS_FROZEN)
1+
#define cpuhp_setup_state_nocalls(a, b, c, d) (0)

tools/testing/radix-tree/linux/notifier.h

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)