diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/asn1_compiler.c | 2 | ||||
-rwxr-xr-x | scripts/bloat-o-meter | 7 | ||||
-rwxr-xr-x | scripts/checkpatch.pl | 1 | ||||
-rw-r--r-- | scripts/coccinelle/api/devm_request_and_ioremap.cocci | 105 | ||||
-rw-r--r-- | scripts/kallsyms.c | 6 | ||||
-rw-r--r-- | scripts/kconfig/expr.h | 2 | ||||
-rw-r--r-- | scripts/kconfig/mconf.c | 60 | ||||
-rw-r--r-- | scripts/kconfig/menu.c | 11 | ||||
-rw-r--r-- | scripts/kconfig/qconf.cc | 5 | ||||
-rw-r--r-- | scripts/kconfig/qconf.h | 1 | ||||
-rw-r--r-- | scripts/kconfig/symbol.c | 2 | ||||
-rw-r--r-- | scripts/kconfig/zconf.l | 1 | ||||
-rwxr-xr-x | scripts/kernel-doc | 3 | ||||
-rw-r--r-- | scripts/mod/sumversion.c | 2 | ||||
-rwxr-xr-x | scripts/recordmcount.pl | 4 | ||||
-rwxr-xr-x | scripts/show_delta | 12 | ||||
-rwxr-xr-x | scripts/tags.sh | 9 |
17 files changed, 71 insertions, 162 deletions
diff --git a/scripts/asn1_compiler.c b/scripts/asn1_compiler.c index db0e5cd34c70..91c4117637ae 100644 --- a/scripts/asn1_compiler.c +++ b/scripts/asn1_compiler.c @@ -1353,6 +1353,8 @@ static void render_out_of_line_list(FILE *out) render_opcode(out, "ASN1_OP_END_SET_OF%s,\n", act); render_opcode(out, "_jump_target(%u),\n", entry); break; + default: + break; } if (e->action) render_opcode(out, "_action(ACT_%s),\n", diff --git a/scripts/bloat-o-meter b/scripts/bloat-o-meter index 6129020c41a9..549d0ab8c662 100755 --- a/scripts/bloat-o-meter +++ b/scripts/bloat-o-meter @@ -19,9 +19,10 @@ def getsizes(file): size, type, name = l[:-1].split() if type in "tTdDbBrR": # strip generated symbols - if name[:6] == "__mod_": continue - # function names begin with '.' on 64-bit powerpc - if "." in name[1:]: name = "static." + name.split(".")[0] + if name.startswith("__mod_"): continue + if name == "linux_banner": continue + # statics and some other optimizations adds random .NUMBER + name = re.sub(r'\.[0-9]+', '', name) sym[name] = sym.get(name, 0) + int(size, 16) return sym diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 61090e0ff613..9c9810030377 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3289,6 +3289,7 @@ sub process { } } if (!defined $suppress_whiletrailers{$linenr} && + defined($stat) && defined($cond) && $line =~ /\b(?:if|while|for)\s*\(/ && $line !~ /^.\s*#/) { my ($s, $c) = ($stat, $cond); diff --git a/scripts/coccinelle/api/devm_request_and_ioremap.cocci b/scripts/coccinelle/api/devm_request_and_ioremap.cocci deleted file mode 100644 index 562ec88b6352..000000000000 --- a/scripts/coccinelle/api/devm_request_and_ioremap.cocci +++ /dev/null @@ -1,105 +0,0 @@ -/// Reimplement a call to devm_request_mem_region followed by a call to ioremap -/// or ioremap_nocache by a call to devm_request_and_ioremap. -/// Devm_request_and_ioremap was introduced in -/// 72f8c0bfa0de64c68ee59f40eb9b2683bffffbb0. It makes the code much more -/// concise. -/// -/// -// Confidence: High -// Copyright: (C) 2011 Julia Lawall, INRIA/LIP6. GPLv2. -// Copyright: (C) 2011 Gilles Muller, INRIA/LiP6. GPLv2. -// URL: http://coccinelle.lip6.fr/ -// Comments: -// Options: --no-includes --include-headers - -virtual patch -virtual org -virtual report -virtual context - -@nm@ -expression myname; -identifier i; -@@ - -struct platform_driver i = { .driver = { .name = myname } }; - -@depends on patch@ -expression dev,res,size; -@@ - --if (!devm_request_mem_region(dev, res->start, size, -- \(res->name\|dev_name(dev)\))) { -- ... -- return ...; --} -... when != res->start -( --devm_ioremap(dev,res->start,size) -+devm_request_and_ioremap(dev,res) -| --devm_ioremap_nocache(dev,res->start,size) -+devm_request_and_ioremap(dev,res) -) -... when any - when != res->start - -// this rule is separate from the previous one, because a single file can -// have multiple values of myname -@depends on patch@ -expression dev,res,size; -expression nm.myname; -@@ - --if (!devm_request_mem_region(dev, res->start, size,myname)) { -- ... -- return ...; --} -... when != res->start -( --devm_ioremap(dev,res->start,size) -+devm_request_and_ioremap(dev,res) -| --devm_ioremap_nocache(dev,res->start,size) -+devm_request_and_ioremap(dev,res) -) -... when any - when != res->start - - -@pb depends on org || report || context@ -expression dev,res,size; -expression nm.myname; -position p1,p2; -@@ - -*if - (!devm_request_mem_region@p1(dev, res->start, size, - \(res->name\|dev_name(dev)\|myname\))) { - ... - return ...; -} -... when != res->start -( -*devm_ioremap@p2(dev,res->start,size) -| -*devm_ioremap_nocache@p2(dev,res->start,size) -) -... when any - when != res->start - -@script:python depends on org@ -p1 << pb.p1; -p2 << pb.p2; -@@ - -cocci.print_main("INFO: replace by devm_request_and_ioremap",p1) -cocci.print_secs("",p2) - -@script:python depends on report@ -p1 << pb.p1; -p2 << pb.p2; -@@ - -msg = "INFO: devm_request_mem_region followed by ioremap on line %s can be replaced by devm_request_and_ioremap" % (p2[0].line) -coccilib.report.print_report(p1[0],msg) diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index 9a11f9f799f4..10085de886fe 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -115,6 +115,12 @@ static int read_symbol(FILE *in, struct sym_entry *s) fprintf(stderr, "Read error or end of file.\n"); return -1; } + if (strlen(str) > KSYM_NAME_LEN) { + fprintf(stderr, "Symbol %s too long for kallsyms (%zu vs %d).\n" + "Please increase KSYM_NAME_LEN both in kernel and kallsyms.c\n", + str, strlen(str), KSYM_NAME_LEN); + return -1; + } sym = str; /* skip prefix char */ diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h index df198a5f4822..ba663e1dc7e3 100644 --- a/scripts/kconfig/expr.h +++ b/scripts/kconfig/expr.h @@ -93,7 +93,7 @@ struct symbol { #define SYMBOL_CHOICEVAL 0x0020 /* used as a value in a choice block */ #define SYMBOL_VALID 0x0080 /* set when symbol.curr is calculated */ #define SYMBOL_OPTIONAL 0x0100 /* choice is optional - values can be 'n' */ -#define SYMBOL_WRITE 0x0200 /* ? */ +#define SYMBOL_WRITE 0x0200 /* write symbol to file (KCONFIG_CONFIG) */ #define SYMBOL_CHANGED 0x0400 /* ? */ #define SYMBOL_AUTO 0x1000 /* value from environment variable */ #define SYMBOL_CHECKED 0x2000 /* used during dependency checking */ diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c index 2c3963165a0d..59184bb41ef8 100644 --- a/scripts/kconfig/mconf.c +++ b/scripts/kconfig/mconf.c @@ -25,7 +25,7 @@ static const char mconf_readme[] = N_( "Overview\n" "--------\n" -"This interface let you select features and parameters for the build.\n" +"This interface lets you select features and parameters for the build.\n" "Features can either be built-in, modularized, or ignored. Parameters\n" "must be entered in as decimal or hexadecimal numbers or text.\n" "\n" @@ -39,15 +39,15 @@ static const char mconf_readme[] = N_( "\n" "To change any of these features, highlight it with the cursor\n" "keys and press <Y> to build it in, <M> to make it a module or\n" -"<N> to removed it. You may also press the <Space Bar> to cycle\n" -"through the available options (ie. Y->N->M->Y).\n" +"<N> to remove it. You may also press the <Space Bar> to cycle\n" +"through the available options (i.e. Y->N->M->Y).\n" "\n" "Some additional keyboard hints:\n" "\n" "Menus\n" "----------\n" -"o Use the Up/Down arrow keys (cursor keys) to highlight the item\n" -" you wish to change or submenu wish to select and press <Enter>.\n" +"o Use the Up/Down arrow keys (cursor keys) to highlight the item you\n" +" wish to change or the submenu you wish to select and press <Enter>.\n" " Submenus are designated by \"--->\", empty ones by \"----\".\n" "\n" " Shortcut: Press the option's highlighted letter (hotkey).\n" @@ -65,7 +65,7 @@ static const char mconf_readme[] = N_( " there is a delayed response which you may find annoying.\n" "\n" " Also, the <TAB> and cursor keys will cycle between <Select>,\n" -" <Exit> and <Help>.\n" +" <Exit>, <Help>, <Save>, and <Load>.\n" "\n" "o To get help with an item, use the cursor keys to highlight <Help>\n" " and press <ENTER>.\n" @@ -105,7 +105,7 @@ static const char mconf_readme[] = N_( "Text Box (Help Window)\n" "--------\n" "o Use the cursor keys to scroll up/down/left/right. The VI editor\n" -" keys h,j,k,l function here as do <u>, <d>, <SPACE BAR> and <B> for \n" +" keys h,j,k,l function here as do <u>, <d>, <SPACE BAR> and <B> for\n" " those who are familiar with less and lynx.\n" "\n" "o Press <E>, <X>, <q>, <Enter> or <Esc><Esc> to exit.\n" @@ -117,23 +117,21 @@ static const char mconf_readme[] = N_( "those who, for various reasons, find it necessary to switch\n" "between different configurations.\n" "\n" -"At the end of the main menu you will find two options. One is\n" -"for saving the current configuration to a file of your choosing.\n" -"The other option is for loading a previously saved alternate\n" -"configuration.\n" +"The <Save> button will let you save the current configuration to\n" +"a file of your choosing. Use the <Load> button to load a previously\n" +"saved alternate configuration.\n" "\n" -"Even if you don't use alternate configuration files, but you\n" -"find during a Menuconfig session that you have completely messed\n" -"up your settings, you may use the \"Load Alternate...\" option to\n" -"restore your previously saved settings from \".config\" without\n" -"restarting Menuconfig.\n" +"Even if you don't use alternate configuration files, but you find\n" +"during a Menuconfig session that you have completely messed up your\n" +"settings, you may use the <Load> button to restore your previously\n" +"saved settings from \".config\" without restarting Menuconfig.\n" "\n" "Other information\n" "-----------------\n" -"If you use Menuconfig in an XTERM window make sure you have your\n" -"$TERM variable set to point to a xterm definition which supports color.\n" -"Otherwise, Menuconfig will look rather bad. Menuconfig will not\n" -"display correctly in a RXVT window because rxvt displays only one\n" +"If you use Menuconfig in an XTERM window, make sure you have your\n" +"$TERM variable set to point to an xterm definition which supports\n" +"color. Otherwise, Menuconfig will look rather bad. Menuconfig will\n" +"not display correctly in an RXVT window because rxvt displays only one\n" "intensity of color, bright.\n" "\n" "Menuconfig will display larger menus on screens or xterms which are\n" @@ -148,8 +146,8 @@ static const char mconf_readme[] = N_( "\n" "Optional personality available\n" "------------------------------\n" -"If you prefer to have all of the options listed in a single menu, rather\n" -"than the default multimenu hierarchy, run the menuconfig with\n" +"If you prefer to have all of the options listed in a single menu,\n" +"rather than the default multimenu hierarchy, run the menuconfig with\n" "MENUCONFIG_MODE environment variable set to single_menu. Example:\n" "\n" "make MENUCONFIG_MODE=single_menu menuconfig\n" @@ -172,7 +170,7 @@ static const char mconf_readme[] = N_( " mono => selects colors suitable for monochrome displays\n" " blackbg => selects a color scheme with black background\n" " classic => theme with blue background. The classic look\n" -" bluetitle => a LCD friendly version of classic. (default)\n" +" bluetitle => an LCD friendly version of classic. (default)\n" "\n"), menu_instructions[] = N_( "Arrow keys navigate the menu. " @@ -238,24 +236,24 @@ search_help[] = N_( "Symbol: FOO [=m]\n" "Type : tristate\n" "Prompt: Foo bus is used to drive the bar HW\n" - " Defined at drivers/pci/Kconfig:47\n" - " Depends on: X86_LOCAL_APIC && X86_IO_APIC || IA64\n" " Location:\n" " -> Bus options (PCI, PCMCIA, EISA, ISA)\n" " -> PCI support (PCI [=y])\n" "(1) -> PCI access mode (<choice> [=y])\n" + " Defined at drivers/pci/Kconfig:47\n" + " Depends on: X86_LOCAL_APIC && X86_IO_APIC || IA64\n" " Selects: LIBCRC32\n" - " Selected by: BAR\n" + " Selected by: BAR [=n]\n" "-----------------------------------------------------------------\n" "o The line 'Type:' shows the type of the configuration option for\n" " this symbol (boolean, tristate, string, ...)\n" "o The line 'Prompt:' shows the text used in the menu structure for\n" " this symbol\n" - "o The 'Defined at' line tell at what file / line number the symbol\n" + "o The 'Defined at' line tells at what file / line number the symbol\n" " is defined\n" - "o The 'Depends on:' line tell what symbols needs to be defined for\n" + "o The 'Depends on:' line tells what symbols need to be defined for\n" " this symbol to be visible in the menu (selectable)\n" - "o The 'Location:' lines tell where in the menu structure this symbol\n" + "o The 'Location:' lines tells where in the menu structure this symbol\n" " is located\n" " A location followed by a [=y] indicates that this is a\n" " selectable menu item - and the current value is displayed inside\n" @@ -263,9 +261,9 @@ search_help[] = N_( " Press the key in the (#) prefix to jump directly to that\n" " location. You will be returned to the current search results\n" " after exiting this new menu.\n" - "o The 'Selects:' line tell what symbol will be automatically\n" + "o The 'Selects:' line tells what symbols will be automatically\n" " selected if this symbol is selected (y or m)\n" - "o The 'Selected by' line tell what symbol has selected this symbol\n" + "o The 'Selected by' line tells what symbol has selected this symbol\n" "\n" "Only relevant lines are shown.\n" "\n\n" diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index c1d53200c306..db1512ae30cc 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c @@ -119,9 +119,10 @@ void menu_set_type(int type) sym->type = type; return; } - menu_warn(current_entry, "type of '%s' redefined from '%s' to '%s'", - sym->name ? sym->name : "<choice>", - sym_type_name(sym->type), sym_type_name(type)); + menu_warn(current_entry, + "ignoring type redefinition of '%s' from '%s' to '%s'", + sym->name ? sym->name : "<choice>", + sym_type_name(sym->type), sym_type_name(type)); } struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep) @@ -583,7 +584,7 @@ static void get_prompt_str(struct gstr *r, struct property *prop, for (j = 4; --i >= 0; j += 2) { menu = submenu[i]; if (head && location && menu == location) - jump->offset = r->len - 1; + jump->offset = strlen(r->s); str_printf(r, "%*c-> %s", j, ' ', _(menu_get_prompt(menu))); if (menu->sym) { @@ -597,7 +598,7 @@ static void get_prompt_str(struct gstr *r, struct property *prop, } /* - * get peoperty of type P_SYMBOL + * get property of type P_SYMBOL */ static struct property *get_symbol_prop(struct symbol *sym) { diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 1500c38f0cca..9d3b04b0769c 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -69,6 +69,11 @@ static inline QString qgettext(const QString& str) return QString::fromLocal8Bit(gettext(str.latin1())); } +ConfigSettings::ConfigSettings() + : QSettings("kernel.org", "qconf") +{ +} + /** * Reads a list of integer values from the application settings. */ diff --git a/scripts/kconfig/qconf.h b/scripts/kconfig/qconf.h index 3715b3e7212c..bde0c6b6f9e8 100644 --- a/scripts/kconfig/qconf.h +++ b/scripts/kconfig/qconf.h @@ -32,6 +32,7 @@ class ConfigMainWindow; class ConfigSettings : public QSettings { public: + ConfigSettings(); Q3ValueList<int> readSizes(const QString& key, bool *ok); bool writeSizes(const QString& key, const Q3ValueList<int>& value); }; diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c index c9a6775565bf..7caabdb51c64 100644 --- a/scripts/kconfig/symbol.c +++ b/scripts/kconfig/symbol.c @@ -1047,7 +1047,7 @@ sym_re_search_free: * When we check for recursive dependencies we use a stack to save * current state so we can print out relevant info to user. * The entries are located on the call stack so no need to free memory. - * Note inser() remove() must always match to properly clear the stack. + * Note insert() remove() must always match to properly clear the stack. */ static struct dep_stack { struct dep_stack *prev, *next; diff --git a/scripts/kconfig/zconf.l b/scripts/kconfig/zconf.l index 6555a475453b..1a9f53e535ca 100644 --- a/scripts/kconfig/zconf.l +++ b/scripts/kconfig/zconf.l @@ -68,7 +68,6 @@ static void alloc_string(const char *str, int size) } %} -ws [ \n\t] n [A-Za-z0-9_] %% diff --git a/scripts/kernel-doc b/scripts/kernel-doc index dbd3e1ebbdad..da058da413e7 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -2128,8 +2128,7 @@ sub dump_function($$) { create_parameterlist($args, ',', $file); } else { - print STDERR "Error(${file}:$.): cannot understand prototype: '$prototype'\n"; - ++$errors; + print STDERR "Warning(${file}:$.): cannot understand function prototype: '$prototype'\n"; return; } diff --git a/scripts/mod/sumversion.c b/scripts/mod/sumversion.c index 9dfcd6d988da..deb2994b04c4 100644 --- a/scripts/mod/sumversion.c +++ b/scripts/mod/sumversion.c @@ -416,7 +416,7 @@ void get_src_version(const char *modname, char sum[], unsigned sumlen) basename = strrchr(modname, '/') + 1; else basename = modname; - sprintf(filelist, "%s/%.*s.mod", modverdir, + snprintf(filelist, sizeof(filelist), "%s/%.*s.mod", modverdir, (int) strlen(basename) - 2, basename); file = grab_file(filelist, &len); diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl index a674fd5507c1..d0da66396f62 100755 --- a/scripts/recordmcount.pl +++ b/scripts/recordmcount.pl @@ -214,13 +214,13 @@ $local_regex = "^[0-9a-fA-F]+\\s+t\\s+(\\S+)"; $weak_regex = "^[0-9a-fA-F]+\\s+([wW])\\s+(\\S+)"; $section_regex = "Disassembly of section\\s+(\\S+):"; $function_regex = "^([0-9a-fA-F]+)\\s+<(.*?)>:"; -$mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\smcount\$"; +$mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s(mcount|__fentry__)\$"; $section_type = '@progbits'; $mcount_adjust = 0; $type = ".long"; if ($arch eq "x86_64") { - $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\smcount([+-]0x[0-9a-zA-Z]+)?\$"; + $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s(mcount|__fentry__)([+-]0x[0-9a-zA-Z]+)?\$"; $type = ".quad"; $alignment = 8; $mcount_adjust = -1; diff --git a/scripts/show_delta b/scripts/show_delta index 17df3051747a..e25732b5d701 100755 --- a/scripts/show_delta +++ b/scripts/show_delta @@ -13,7 +13,7 @@ import sys import string def usage(): - print """usage: show_delta [<options>] <filename> + print ("""usage: show_delta [<options>] <filename> This program parses the output from a set of printk message lines which have time data prefixed because the CONFIG_PRINTK_TIME option is set, or @@ -35,7 +35,7 @@ ex: $ dmesg >timefile will show times relative to the line in the kernel output starting with "NET4". -""" +""") sys.exit(1) # returns a tuple containing the seconds and text for each message line @@ -94,11 +94,11 @@ def main(): try: lines = open(filein,"r").readlines() except: - print "Problem opening file: %s" % filein + print ("Problem opening file: %s" % filein) sys.exit(1) if base_str: - print 'base= "%s"' % base_str + print ('base= "%s"' % base_str) # assume a numeric base. If that fails, try searching # for a matching line. try: @@ -117,13 +117,13 @@ def main(): # stop at first match break if not found: - print 'Couldn\'t find line matching base pattern "%s"' % base_str + print ('Couldn\'t find line matching base pattern "%s"' % base_str) sys.exit(1) else: base_time = 0.0 for line in lines: - print convert_line(line, base_time), + print (convert_line(line, base_time),) main() diff --git a/scripts/tags.sh b/scripts/tags.sh index 74f02e4dddd2..58c455929091 100755 --- a/scripts/tags.sh +++ b/scripts/tags.sh @@ -149,15 +149,16 @@ dogtags() exuberant() { all_target_sources | xargs $1 -a \ - -I __initdata,__exitdata,__initconst,__devinitdata \ - -I __devinitconst,__cpuinitdata,__initdata_memblock \ - -I __refdata,__attribute \ + -I __initdata,__exitdata,__initconst, \ + -I __cpuinitdata,__initdata_memblock \ + -I __refdata,__attribute,__maybe_unused,__always_unused \ -I __acquires,__releases,__deprecated \ -I __read_mostly,__aligned,____cacheline_aligned \ -I ____cacheline_aligned_in_smp \ + -I __cacheline_aligned,__cacheline_aligned_in_smp \ -I ____cacheline_internodealigned_in_smp \ -I __used,__packed,__packed2__,__must_check,__must_hold \ - -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL \ + -I EXPORT_SYMBOL,EXPORT_SYMBOL_GPL,ACPI_EXPORT_SYMBOL \ -I DEFINE_TRACE,EXPORT_TRACEPOINT_SYMBOL,EXPORT_TRACEPOINT_SYMBOL_GPL \ -I static,const \ --extra=+f --c-kinds=+px \ |