diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-26 17:51:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-26 17:51:15 -0400 |
commit | d87823813fe498fdd47894bd28e460a9dee8d771 (patch) | |
tree | 214eaf3babd0d61f08022fc1edd99a5128616548 /scripts | |
parent | e382608254e06c8109f40044f5e693f2e04f3899 (diff) | |
parent | 3dc196eae1db548f05e53e5875ff87b8ff79f249 (diff) |
Merge tag 'char-misc-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver updates from Greg KH:
"Here's the big char/misc driver pull request for 4.2-rc1.
Lots of mei, extcon, coresight, uio, mic, and other driver updates in
here. Full details in the shortlog. All of these have been in
linux-next for some time with no reported problems"
* tag 'char-misc-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (176 commits)
mei: me: wait for power gating exit confirmation
mei: reset flow control on the last client disconnection
MAINTAINERS: mei: add mei_cl_bus.h to maintained file list
misc: sram: sort and clean up included headers
misc: sram: move reserved block logic out of probe function
misc: sram: add private struct device and virt_base members
misc: sram: report correct SRAM pool size
misc: sram: bump error message level on unclean driver unbinding
misc: sram: fix device node reference leak on error
misc: sram: fix enabled clock leak on error path
misc: mic: Fix reported static checker warning
misc: mic: Fix randconfig build error by including errno.h
uio: pruss: Drop depends on ARCH_DAVINCI_DA850 from config
uio: pruss: Add CONFIG_HAS_IOMEM dependence
uio: pruss: Include <linux/sizes.h>
extcon: Redefine the unique id of supported external connectors without 'enum extcon' type
char:xilinx_hwicap:buffer_icap - change 1/0 to true/false for bool type variable in function buffer_icap_set_configuration().
Drivers: hv: vmbus: Allocate ring buffer memory in NUMA aware fashion
parport: check exclusive access before register
w1: use correct lock on error in w1_seq_show()
...
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/checkkconfigsymbols.py | 34 | ||||
-rw-r--r-- | scripts/mod/devicetable-offsets.c | 1 | ||||
-rw-r--r-- | scripts/mod/file2alias.c | 21 |
3 files changed, 47 insertions, 9 deletions
diff --git a/scripts/checkkconfigsymbols.py b/scripts/checkkconfigsymbols.py index 74086a583d8d..c89fdcaf06e8 100755 --- a/scripts/checkkconfigsymbols.py +++ b/scripts/checkkconfigsymbols.py | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/usr/bin/env python | 1 | #!/usr/bin/env python2 |
2 | 2 | ||
3 | """Find Kconfig symbols that are referenced but not defined.""" | 3 | """Find Kconfig symbols that are referenced but not defined.""" |
4 | 4 | ||
@@ -58,6 +58,12 @@ def parse_options(): | |||
58 | "input format bases on Git log's " | 58 | "input format bases on Git log's " |
59 | "\'commmit1..commit2\'.") | 59 | "\'commmit1..commit2\'.") |
60 | 60 | ||
61 | parser.add_option('-i', '--ignore', dest='ignore', action='store', | ||
62 | default="", | ||
63 | help="Ignore files matching this pattern. Note that " | ||
64 | "the pattern needs to be a Python regex. To " | ||
65 | "ignore defconfigs, specify -i '.*defconfig'.") | ||
66 | |||
61 | parser.add_option('', '--force', dest='force', action='store_true', | 67 | parser.add_option('', '--force', dest='force', action='store_true', |
62 | default=False, | 68 | default=False, |
63 | help="Reset current Git tree even when it's dirty.") | 69 | help="Reset current Git tree even when it's dirty.") |
@@ -80,6 +86,12 @@ def parse_options(): | |||
80 | "'--force' if you\nwant to ignore this warning and " | 86 | "'--force' if you\nwant to ignore this warning and " |
81 | "continue.") | 87 | "continue.") |
82 | 88 | ||
89 | if opts.ignore: | ||
90 | try: | ||
91 | re.match(opts.ignore, "this/is/just/a/test.c") | ||
92 | except: | ||
93 | sys.exit("Please specify a valid Python regex.") | ||
94 | |||
83 | return opts | 95 | return opts |
84 | 96 | ||
85 | 97 | ||
@@ -105,11 +117,11 @@ def main(): | |||
105 | 117 | ||
106 | # get undefined items before the commit | 118 | # get undefined items before the commit |
107 | execute("git reset --hard %s" % commit_a) | 119 | execute("git reset --hard %s" % commit_a) |
108 | undefined_a = check_symbols() | 120 | undefined_a = check_symbols(opts.ignore) |
109 | 121 | ||
110 | # get undefined items for the commit | 122 | # get undefined items for the commit |
111 | execute("git reset --hard %s" % commit_b) | 123 | execute("git reset --hard %s" % commit_b) |
112 | undefined_b = check_symbols() | 124 | undefined_b = check_symbols(opts.ignore) |
113 | 125 | ||
114 | # report cases that are present for the commit but not before | 126 | # report cases that are present for the commit but not before |
115 | for feature in sorted(undefined_b): | 127 | for feature in sorted(undefined_b): |
@@ -129,7 +141,7 @@ def main(): | |||
129 | 141 | ||
130 | # default to check the entire tree | 142 | # default to check the entire tree |
131 | else: | 143 | else: |
132 | undefined = check_symbols() | 144 | undefined = check_symbols(opts.ignore) |
133 | for feature in sorted(undefined): | 145 | for feature in sorted(undefined): |
134 | files = sorted(undefined.get(feature)) | 146 | files = sorted(undefined.get(feature)) |
135 | print "%s\t%s" % (feature, ", ".join(files)) | 147 | print "%s\t%s" % (feature, ", ".join(files)) |
@@ -160,9 +172,10 @@ def get_head(): | |||
160 | return stdout.strip('\n') | 172 | return stdout.strip('\n') |
161 | 173 | ||
162 | 174 | ||
163 | def check_symbols(): | 175 | def check_symbols(ignore): |
164 | """Find undefined Kconfig symbols and return a dict with the symbol as key | 176 | """Find undefined Kconfig symbols and return a dict with the symbol as key |
165 | and a list of referencing files as value.""" | 177 | and a list of referencing files as value. Files matching %ignore are not |
178 | checked for undefined symbols.""" | ||
166 | source_files = [] | 179 | source_files = [] |
167 | kconfig_files = [] | 180 | kconfig_files = [] |
168 | defined_features = set() | 181 | defined_features = set() |
@@ -185,10 +198,17 @@ def check_symbols(): | |||
185 | source_files.append(gitfile) | 198 | source_files.append(gitfile) |
186 | 199 | ||
187 | for sfile in source_files: | 200 | for sfile in source_files: |
201 | if ignore and re.match(ignore, sfile): | ||
202 | # do not check files matching %ignore | ||
203 | continue | ||
188 | parse_source_file(sfile, referenced_features) | 204 | parse_source_file(sfile, referenced_features) |
189 | 205 | ||
190 | for kfile in kconfig_files: | 206 | for kfile in kconfig_files: |
191 | parse_kconfig_file(kfile, defined_features, referenced_features) | 207 | if ignore and re.match(ignore, kfile): |
208 | # do not collect references for files matching %ignore | ||
209 | parse_kconfig_file(kfile, defined_features, dict()) | ||
210 | else: | ||
211 | parse_kconfig_file(kfile, defined_features, referenced_features) | ||
192 | 212 | ||
193 | undefined = {} # {feature: [files]} | 213 | undefined = {} # {feature: [files]} |
194 | for feature in sorted(referenced_features): | 214 | for feature in sorted(referenced_features): |
diff --git a/scripts/mod/devicetable-offsets.c b/scripts/mod/devicetable-offsets.c index fce36d0f6898..091f6290a651 100644 --- a/scripts/mod/devicetable-offsets.c +++ b/scripts/mod/devicetable-offsets.c | |||
@@ -182,6 +182,7 @@ int main(void) | |||
182 | 182 | ||
183 | DEVID(mei_cl_device_id); | 183 | DEVID(mei_cl_device_id); |
184 | DEVID_FIELD(mei_cl_device_id, name); | 184 | DEVID_FIELD(mei_cl_device_id, name); |
185 | DEVID_FIELD(mei_cl_device_id, uuid); | ||
185 | 186 | ||
186 | DEVID(rio_device_id); | 187 | DEVID(rio_device_id); |
187 | DEVID_FIELD(rio_device_id, did); | 188 | DEVID_FIELD(rio_device_id, did); |
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 78691d51a479..718b2a29bd43 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c | |||
@@ -34,6 +34,9 @@ typedef Elf64_Addr kernel_ulong_t; | |||
34 | typedef uint32_t __u32; | 34 | typedef uint32_t __u32; |
35 | typedef uint16_t __u16; | 35 | typedef uint16_t __u16; |
36 | typedef unsigned char __u8; | 36 | typedef unsigned char __u8; |
37 | typedef struct { | ||
38 | __u8 b[16]; | ||
39 | } uuid_le; | ||
37 | 40 | ||
38 | /* Big exception to the "don't include kernel headers into userspace, which | 41 | /* Big exception to the "don't include kernel headers into userspace, which |
39 | * even potentially has different endianness and word sizes, since | 42 | * even potentially has different endianness and word sizes, since |
@@ -131,6 +134,15 @@ static inline void add_wildcard(char *str) | |||
131 | strcat(str + len, "*"); | 134 | strcat(str + len, "*"); |
132 | } | 135 | } |
133 | 136 | ||
137 | static inline void add_uuid(char *str, uuid_le uuid) | ||
138 | { | ||
139 | int len = strlen(str); | ||
140 | int i; | ||
141 | |||
142 | for (i = 0; i < 16; i++) | ||
143 | sprintf(str + len + (i << 1), "%02x", uuid.b[i]); | ||
144 | } | ||
145 | |||
134 | /** | 146 | /** |
135 | * Check that sizeof(device_id type) are consistent with size of section | 147 | * Check that sizeof(device_id type) are consistent with size of section |
136 | * in .o file. If in-consistent then userspace and kernel does not agree | 148 | * in .o file. If in-consistent then userspace and kernel does not agree |
@@ -1160,13 +1172,18 @@ static int do_cpu_entry(const char *filename, void *symval, char *alias) | |||
1160 | } | 1172 | } |
1161 | ADD_TO_DEVTABLE("cpu", cpu_feature, do_cpu_entry); | 1173 | ADD_TO_DEVTABLE("cpu", cpu_feature, do_cpu_entry); |
1162 | 1174 | ||
1163 | /* Looks like: mei:S */ | 1175 | /* Looks like: mei:S:uuid */ |
1164 | static int do_mei_entry(const char *filename, void *symval, | 1176 | static int do_mei_entry(const char *filename, void *symval, |
1165 | char *alias) | 1177 | char *alias) |
1166 | { | 1178 | { |
1167 | DEF_FIELD_ADDR(symval, mei_cl_device_id, name); | 1179 | DEF_FIELD_ADDR(symval, mei_cl_device_id, name); |
1180 | DEF_FIELD_ADDR(symval, mei_cl_device_id, uuid); | ||
1181 | |||
1182 | sprintf(alias, MEI_CL_MODULE_PREFIX); | ||
1183 | sprintf(alias + strlen(alias), "%s:", (*name)[0] ? *name : "*"); | ||
1184 | add_uuid(alias, *uuid); | ||
1168 | 1185 | ||
1169 | sprintf(alias, MEI_CL_MODULE_PREFIX "%s", *name); | 1186 | strcat(alias, ":*"); |
1170 | 1187 | ||
1171 | return 1; | 1188 | return 1; |
1172 | } | 1189 | } |