aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-05-04 21:27:46 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-05-04 21:27:46 -0400
commit0be75179df5e20306528800fc7c6a504b12b97db (patch)
tree726e88308f0a08384523bcb542bda510ca723748
parent8f28472a739e8e39adc6e64ee5b460df039f0e4f (diff)
parent523aa3586ffb1fc11a9bf88f77ebaf71a15eb998 (diff)
Merge tag 'driver-core-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core updates from Greg KH: "Very tiny pull request for 4.12-rc1 for the driver core this time around. There are some documentation fixes, an eventpoll.h fixup to make it easier for the libc developers to take our header files directly, and some very minor driver core fixes and changes. All have been in linux-next for a very long time with no reported issues" * tag 'driver-core-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: Revert "kref: double kref_put() in my_data_handler()" driver core: don't initialize 'parent' in device_add() drivers: base: dma-mapping: use nth_page helper Documentation/ABI: add information about cpu_capacity debugfs: set no_llseek in DEFINE_DEBUGFS_ATTRIBUTE eventpoll.h: add missing epoll event masks eventpoll.h: fix epoll event masks
-rw-r--r--Documentation/ABI/testing/sysfs-devices-system-cpu7
-rw-r--r--Documentation/kref.txt1
-rw-r--r--drivers/base/core.c2
-rw-r--r--drivers/base/dma-mapping.c5
-rw-r--r--include/linux/debugfs.h2
-rw-r--r--include/uapi/linux/eventpoll.h21
6 files changed, 29 insertions, 9 deletions
diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu
index 2a4a423d08e0..f3d5817c4ef0 100644
--- a/Documentation/ABI/testing/sysfs-devices-system-cpu
+++ b/Documentation/ABI/testing/sysfs-devices-system-cpu
@@ -366,3 +366,10 @@ Contact: Linux ARM Kernel Mailing list <linux-arm-kernel@lists.infradead.org>
366Description: AArch64 CPU registers 366Description: AArch64 CPU registers
367 'identification' directory exposes the CPU ID registers for 367 'identification' directory exposes the CPU ID registers for
368 identifying model and revision of the CPU. 368 identifying model and revision of the CPU.
369
370What: /sys/devices/system/cpu/cpu#/cpu_capacity
371Date: December 2016
372Contact: Linux kernel mailing list <linux-kernel@vger.kernel.org>
373Description: information about CPUs heterogeneity.
374
375 cpu_capacity: capacity of cpu#.
diff --git a/Documentation/kref.txt b/Documentation/kref.txt
index ddf85a5dde0c..d26a27ca964d 100644
--- a/Documentation/kref.txt
+++ b/Documentation/kref.txt
@@ -84,6 +84,7 @@ int my_data_handler(void)
84 task = kthread_run(more_data_handling, data, "more_data_handling"); 84 task = kthread_run(more_data_handling, data, "more_data_handling");
85 if (task == ERR_PTR(-ENOMEM)) { 85 if (task == ERR_PTR(-ENOMEM)) {
86 rv = -ENOMEM; 86 rv = -ENOMEM;
87 kref_put(&data->refcount, data_release);
87 goto out; 88 goto out;
88 } 89 }
89 90
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 6bb60fb6a30b..bbecaf9293be 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -1607,7 +1607,7 @@ int device_private_init(struct device *dev)
1607 */ 1607 */
1608int device_add(struct device *dev) 1608int device_add(struct device *dev)
1609{ 1609{
1610 struct device *parent = NULL; 1610 struct device *parent;
1611 struct kobject *kobj; 1611 struct kobject *kobj;
1612 struct class_interface *class_intf; 1612 struct class_interface *class_intf;
1613 int error = -EINVAL; 1613 int error = -EINVAL;
diff --git a/drivers/base/dma-mapping.c b/drivers/base/dma-mapping.c
index efd71cf4fdea..51b7061ff7c0 100644
--- a/drivers/base/dma-mapping.c
+++ b/drivers/base/dma-mapping.c
@@ -309,14 +309,13 @@ void *dma_common_contiguous_remap(struct page *page, size_t size,
309 int i; 309 int i;
310 struct page **pages; 310 struct page **pages;
311 void *ptr; 311 void *ptr;
312 unsigned long pfn;
313 312
314 pages = kmalloc(sizeof(struct page *) << get_order(size), GFP_KERNEL); 313 pages = kmalloc(sizeof(struct page *) << get_order(size), GFP_KERNEL);
315 if (!pages) 314 if (!pages)
316 return NULL; 315 return NULL;
317 316
318 for (i = 0, pfn = page_to_pfn(page); i < (size >> PAGE_SHIFT); i++) 317 for (i = 0; i < (size >> PAGE_SHIFT); i++)
319 pages[i] = pfn_to_page(pfn + i); 318 pages[i] = nth_page(page, i);
320 319
321 ptr = dma_common_pages_remap(pages, size, vm_flags, prot, caller); 320 ptr = dma_common_pages_remap(pages, size, vm_flags, prot, caller);
322 321
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index 7dff776e6d16..9174b0d28582 100644
--- a/include/linux/debugfs.h
+++ b/include/linux/debugfs.h
@@ -74,7 +74,7 @@ static const struct file_operations __fops = { \
74 .release = simple_attr_release, \ 74 .release = simple_attr_release, \
75 .read = debugfs_attr_read, \ 75 .read = debugfs_attr_read, \
76 .write = debugfs_attr_write, \ 76 .write = debugfs_attr_write, \
77 .llseek = generic_file_llseek, \ 77 .llseek = no_llseek, \
78} 78}
79 79
80#if defined(CONFIG_DEBUG_FS) 80#if defined(CONFIG_DEBUG_FS)
diff --git a/include/uapi/linux/eventpoll.h b/include/uapi/linux/eventpoll.h
index 1c3154913a39..f4d5c998cc2b 100644
--- a/include/uapi/linux/eventpoll.h
+++ b/include/uapi/linux/eventpoll.h
@@ -26,8 +26,21 @@
26#define EPOLL_CTL_DEL 2 26#define EPOLL_CTL_DEL 2
27#define EPOLL_CTL_MOD 3 27#define EPOLL_CTL_MOD 3
28 28
29/* Epoll event masks */
30#define EPOLLIN 0x00000001
31#define EPOLLPRI 0x00000002
32#define EPOLLOUT 0x00000004
33#define EPOLLERR 0x00000008
34#define EPOLLHUP 0x00000010
35#define EPOLLRDNORM 0x00000040
36#define EPOLLRDBAND 0x00000080
37#define EPOLLWRNORM 0x00000100
38#define EPOLLWRBAND 0x00000200
39#define EPOLLMSG 0x00000400
40#define EPOLLRDHUP 0x00002000
41
29/* Set exclusive wakeup mode for the target file descriptor */ 42/* Set exclusive wakeup mode for the target file descriptor */
30#define EPOLLEXCLUSIVE (1 << 28) 43#define EPOLLEXCLUSIVE (1U << 28)
31 44
32/* 45/*
33 * Request the handling of system wakeup events so as to prevent system suspends 46 * Request the handling of system wakeup events so as to prevent system suspends
@@ -39,13 +52,13 @@
39 * 52 *
40 * Requires CAP_BLOCK_SUSPEND 53 * Requires CAP_BLOCK_SUSPEND
41 */ 54 */
42#define EPOLLWAKEUP (1 << 29) 55#define EPOLLWAKEUP (1U << 29)
43 56
44/* Set the One Shot behaviour for the target file descriptor */ 57/* Set the One Shot behaviour for the target file descriptor */
45#define EPOLLONESHOT (1 << 30) 58#define EPOLLONESHOT (1U << 30)
46 59
47/* Set the Edge Triggered behaviour for the target file descriptor */ 60/* Set the Edge Triggered behaviour for the target file descriptor */
48#define EPOLLET (1 << 31) 61#define EPOLLET (1U << 31)
49 62
50/* 63/*
51 * On x86-64 make the 64bit structure have the same alignment as the 64 * On x86-64 make the 64bit structure have the same alignment as the