aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-05-21 00:26:15 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-21 00:26:15 -0400
commit3aa2fc1667acdd9cca816a2bc9529f494bd61b05 (patch)
tree2379f33e47edacbc7a4bdf19607642d9c53caa11 /scripts
parent5af2344013454640e0133bb62e8cf2e30190a472 (diff)
parentc6e360a0d9d282e9c8688dcdabdc3669912b66ef (diff)
Merge tag 'driver-core-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core updates from Greg KH: "Here's the "big" driver core update for 4.7-rc1. Mostly just debugfs changes, the long-known and messy races with removing debugfs files should be fixed thanks to the great work of Nicolai Stange. We also have some isa updates in here (the x86 maintainers told me to take it through this tree), a new warning when we run out of dynamic char major numbers, and a few other assorted changes, details in the shortlog. All have been in linux-next for some time with no reported issues" * tag 'driver-core-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (32 commits) Revert "base: dd: don't remove driver_data in -EPROBE_DEFER case" gpio: ws16c48: Utilize the ISA bus driver gpio: 104-idio-16: Utilize the ISA bus driver gpio: 104-idi-48: Utilize the ISA bus driver gpio: 104-dio-48e: Utilize the ISA bus driver watchdog: ebc-c384_wdt: Utilize the ISA bus driver iio: stx104: Utilize the module_isa_driver and max_num_isa_dev macros iio: stx104: Add X86 dependency to STX104 Kconfig option Documentation: Add ISA bus driver documentation isa: Implement the max_num_isa_dev macro isa: Implement the module_isa_driver macro pnp: pnpbios: Add explicit X86_32 dependency to PNPBIOS isa: Decouple X86_32 dependency from the ISA Kconfig option driver-core: use 'dev' argument in dev_dbg_ratelimited stub base: dd: don't remove driver_data in -EPROBE_DEFER case kernfs: Move faulting copy_user operations outside of the mutex devcoredump: add scatterlist support debugfs: unproxify files created through debugfs_create_u32_array() debugfs: unproxify files created through debugfs_create_blob() debugfs: unproxify files created through debugfs_create_bool() ...
Diffstat (limited to 'scripts')
-rw-r--r--scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci67
1 files changed, 67 insertions, 0 deletions
diff --git a/scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci b/scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci
new file mode 100644
index 000000000000..85cf5408d378
--- /dev/null
+++ b/scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci
@@ -0,0 +1,67 @@
1/// Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE
2/// for debugfs files.
3///
4//# Rationale: DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file()
5//# imposes some significant overhead as compared to
6//# DEFINE_DEBUGFS_ATTRIBUTE + debugfs_create_file_unsafe().
7//
8// Copyright (C): 2016 Nicolai Stange
9// Options: --no-includes
10//
11
12virtual context
13virtual patch
14virtual org
15virtual report
16
17@dsa@
18declarer name DEFINE_SIMPLE_ATTRIBUTE;
19identifier dsa_fops;
20expression dsa_get, dsa_set, dsa_fmt;
21position p;
22@@
23DEFINE_SIMPLE_ATTRIBUTE@p(dsa_fops, dsa_get, dsa_set, dsa_fmt);
24
25@dcf@
26expression name, mode, parent, data;
27identifier dsa.dsa_fops;
28@@
29debugfs_create_file(name, mode, parent, data, &dsa_fops)
30
31
32@context_dsa depends on context && dcf@
33declarer name DEFINE_DEBUGFS_ATTRIBUTE;
34identifier dsa.dsa_fops;
35expression dsa.dsa_get, dsa.dsa_set, dsa.dsa_fmt;
36@@
37* DEFINE_SIMPLE_ATTRIBUTE(dsa_fops, dsa_get, dsa_set, dsa_fmt);
38
39
40@patch_dcf depends on patch expression@
41expression name, mode, parent, data;
42identifier dsa.dsa_fops;
43@@
44- debugfs_create_file(name, mode, parent, data, &dsa_fops)
45+ debugfs_create_file_unsafe(name, mode, parent, data, &dsa_fops)
46
47@patch_dsa depends on patch_dcf && patch@
48identifier dsa.dsa_fops;
49expression dsa.dsa_get, dsa.dsa_set, dsa.dsa_fmt;
50@@
51- DEFINE_SIMPLE_ATTRIBUTE(dsa_fops, dsa_get, dsa_set, dsa_fmt);
52+ DEFINE_DEBUGFS_ATTRIBUTE(dsa_fops, dsa_get, dsa_set, dsa_fmt);
53
54
55@script:python depends on org && dcf@
56fops << dsa.dsa_fops;
57p << dsa.p;
58@@
59msg="%s should be defined with DEFINE_DEBUGFS_ATTRIBUTE" % (fops)
60coccilib.org.print_todo(p[0], msg)
61
62@script:python depends on report && dcf@
63fops << dsa.dsa_fops;
64p << dsa.p;
65@@
66msg="WARNING: %s should be defined with DEFINE_DEBUGFS_ATTRIBUTE" % (fops)
67coccilib.report.print_report(p[0], msg)