Skip to content

Commit 0be7517

Browse files
committed
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
2 parents 8f28472 + 523aa35 commit 0be7517

File tree

6 files changed

+29
-9
lines changed

6 files changed

+29
-9
lines changed

Documentation/ABI/testing/sysfs-devices-system-cpu

+7
Original file line numberDiff line numberDiff line change
@@ -366,3 +366,10 @@ Contact: Linux ARM Kernel Mailing list <[email protected]>
366366
Description: AArch64 CPU registers
367367
'identification' directory exposes the CPU ID registers for
368368
identifying model and revision of the CPU.
369+
370+
What: /sys/devices/system/cpu/cpu#/cpu_capacity
371+
Date: December 2016
372+
Contact: Linux kernel mailing list <[email protected]>
373+
Description: information about CPUs heterogeneity.
374+
375+
cpu_capacity: capacity of cpu#.

Documentation/kref.txt

+1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ int my_data_handler(void)
8484
task = kthread_run(more_data_handling, data, "more_data_handling");
8585
if (task == ERR_PTR(-ENOMEM)) {
8686
rv = -ENOMEM;
87+
kref_put(&data->refcount, data_release);
8788
goto out;
8889
}
8990

drivers/base/core.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1607,7 +1607,7 @@ int device_private_init(struct device *dev)
16071607
*/
16081608
int device_add(struct device *dev)
16091609
{
1610-
struct device *parent = NULL;
1610+
struct device *parent;
16111611
struct kobject *kobj;
16121612
struct class_interface *class_intf;
16131613
int error = -EINVAL;

drivers/base/dma-mapping.c

+2-3
Original file line numberDiff line numberDiff line change
@@ -309,14 +309,13 @@ void *dma_common_contiguous_remap(struct page *page, size_t size,
309309
int i;
310310
struct page **pages;
311311
void *ptr;
312-
unsigned long pfn;
313312

314313
pages = kmalloc(sizeof(struct page *) << get_order(size), GFP_KERNEL);
315314
if (!pages)
316315
return NULL;
317316

318-
for (i = 0, pfn = page_to_pfn(page); i < (size >> PAGE_SHIFT); i++)
319-
pages[i] = pfn_to_page(pfn + i);
317+
for (i = 0; i < (size >> PAGE_SHIFT); i++)
318+
pages[i] = nth_page(page, i);
320319

321320
ptr = dma_common_pages_remap(pages, size, vm_flags, prot, caller);
322321

include/linux/debugfs.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ static const struct file_operations __fops = { \
7474
.release = simple_attr_release, \
7575
.read = debugfs_attr_read, \
7676
.write = debugfs_attr_write, \
77-
.llseek = generic_file_llseek, \
77+
.llseek = no_llseek, \
7878
}
7979

8080
#if defined(CONFIG_DEBUG_FS)

include/uapi/linux/eventpoll.h

+17-4
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,21 @@
2626
#define EPOLL_CTL_DEL 2
2727
#define EPOLL_CTL_MOD 3
2828

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+
2942
/* Set exclusive wakeup mode for the target file descriptor */
30-
#define EPOLLEXCLUSIVE (1 << 28)
43+
#define EPOLLEXCLUSIVE (1U << 28)
3144

3245
/*
3346
* Request the handling of system wakeup events so as to prevent system suspends
@@ -39,13 +52,13 @@
3952
*
4053
* Requires CAP_BLOCK_SUSPEND
4154
*/
42-
#define EPOLLWAKEUP (1 << 29)
55+
#define EPOLLWAKEUP (1U << 29)
4356

4457
/* Set the One Shot behaviour for the target file descriptor */
45-
#define EPOLLONESHOT (1 << 30)
58+
#define EPOLLONESHOT (1U << 30)
4659

4760
/* Set the Edge Triggered behaviour for the target file descriptor */
48-
#define EPOLLET (1 << 31)
61+
#define EPOLLET (1U << 31)
4962

5063
/*
5164
* On x86-64 make the 64bit structure have the same alignment as the

0 commit comments

Comments
 (0)