History

Merge tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev_<level>_once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ...

Linus Torvalds committed 11 years ago

Commit e6b5be22 parents 37da7bb f1c488a1692 files · +1439 −2137Browse files

Showing the changes to scripts (1 of 1692 files). Show all

Unified · Split

scripts/coccinelle/api/platform_no_drv_owner.cocci+106−0
@@ -0,0 +1,106 @@
1/// Remove .owner field if calls are used which set it automatically
2///
3// Confidence: High
4// Copyright: (C) 2014 Wolfram Sang. GPL v2.
5
6virtual patch
7virtual context
8virtual org
9virtual report
10
11@match1@
12declarer name module_platform_driver;
13declarer name module_platform_driver_probe;
14identifier __driver;
15@@
16(
17 module_platform_driver(__driver);
18|
19 module_platform_driver_probe(__driver, ...);
20)
21
22@fix1 depends on match1 && patch && !context && !org && !report@
23identifier match1.__driver;
24@@
25 static struct platform_driver __driver = {
26 .driver = {
27- .owner = THIS_MODULE,
28 }
29 };
30
31@match2@
32identifier __driver;
33@@
34(
35 platform_driver_register(&__driver)
36|
37 platform_driver_probe(&__driver, ...)
38|
39 platform_create_bundle(&__driver, ...)
40)
41
42@fix2 depends on match2 && patch && !context && !org && !report@
43identifier match2.__driver;
44@@
45 static struct platform_driver __driver = {
46 .driver = {
47- .owner = THIS_MODULE,
48 }
49 };
50
51// ----------------------------------------------------------------------------
52
53@fix1_context depends on match1 && !patch && (context || org || report)@
54identifier match1.__driver;
55position j0;
56@@
57
58 static struct platform_driver __driver = {
59 .driver = {
60* .owner@j0 = THIS_MODULE,
61 }
62 };
63
64@fix2_context depends on match2 && !patch && (context || org || report)@
65identifier match2.__driver;
66position j0;
67@@
68
69 static struct platform_driver __driver = {
70 .driver = {
71* .owner@j0 = THIS_MODULE,
72 }
73 };
74
75// ----------------------------------------------------------------------------
76
77@script:python fix1_org depends on org@
78j0 << fix1_context.j0;
79@@
80
81msg = "No need to set .owner here. The core will do it."
82coccilib.org.print_todo(j0[0], msg)
83
84@script:python fix2_org depends on org@
85j0 << fix2_context.j0;
86@@
87
88msg = "No need to set .owner here. The core will do it."
89coccilib.org.print_todo(j0[0], msg)
90
91// ----------------------------------------------------------------------------
92
93@script:python fix1_report depends on report@
94j0 << fix1_context.j0;
95@@
96
97msg = "No need to set .owner here. The core will do it."
98coccilib.report.print_report(j0[0], msg)
99
100@script:python fix2_report depends on report@
101j0 << fix2_context.j0;
102@@
103
104msg = "No need to set .owner here. The core will do it."
105coccilib.report.print_report(j0[0], msg)
106