summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/coccinelle/api/drm-get-put.cocci92
-rwxr-xr-xscripts/kernel-doc19
-rw-r--r--scripts/ksymoops/README5
-rw-r--r--scripts/module-common.lds3
-rwxr-xr-xscripts/package/builddeb4
-rw-r--r--scripts/recordmcount.c1
-rwxr-xr-xscripts/recordmcount.pl1
-rw-r--r--scripts/selinux/genheaders/genheaders.c1
-rw-r--r--scripts/selinux/mdp/mdp.c1
-rw-r--r--scripts/spelling.txt25
10 files changed, 140 insertions, 12 deletions
diff --git a/scripts/coccinelle/api/drm-get-put.cocci b/scripts/coccinelle/api/drm-get-put.cocci
new file mode 100644
index 000000000000..0c7a9265c07e
--- /dev/null
+++ b/scripts/coccinelle/api/drm-get-put.cocci
@@ -0,0 +1,92 @@
+///
+/// Use drm_*_get() and drm_*_put() helpers instead of drm_*_reference() and
+/// drm_*_unreference() helpers.
+///
+// Confidence: High
+// Copyright: (C) 2017 NVIDIA Corporation
+// Options: --no-includes --include-headers
+//
+
+virtual patch
+virtual report
+
+@depends on patch@
+expression object;
+@@
+
+(
+- drm_mode_object_reference(object)
++ drm_mode_object_get(object)
+|
+- drm_mode_object_unreference(object)
++ drm_mode_object_put(object)
+|
+- drm_connector_reference(object)
++ drm_connector_get(object)
+|
+- drm_connector_unreference(object)
++ drm_connector_put(object)
+|
+- drm_framebuffer_reference(object)
++ drm_framebuffer_get(object)
+|
+- drm_framebuffer_unreference(object)
++ drm_framebuffer_put(object)
+|
+- drm_gem_object_reference(object)
++ drm_gem_object_get(object)
+|
+- drm_gem_object_unreference(object)
++ drm_gem_object_put(object)
+|
+- __drm_gem_object_unreference(object)
++ __drm_gem_object_put(object)
+|
+- drm_gem_object_unreference_unlocked(object)
++ drm_gem_object_put_unlocked(object)
+|
+- drm_property_reference_blob(object)
++ drm_property_blob_get(object)
+|
+- drm_property_unreference_blob(object)
++ drm_property_blob_put(object)
+)
+
+@r depends on report@
+expression object;
+position p;
+@@
+
+(
+drm_mode_object_unreference@p(object)
+|
+drm_mode_object_reference@p(object)
+|
+drm_connector_unreference@p(object)
+|
+drm_connector_reference@p(object)
+|
+drm_framebuffer_unreference@p(object)
+|
+drm_framebuffer_reference@p(object)
+|
+drm_gem_object_unreference@p(object)
+|
+drm_gem_object_reference@p(object)
+|
+__drm_gem_object_unreference(object)
+|
+drm_gem_object_unreference_unlocked(object)
+|
+drm_property_unreference_blob@p(object)
+|
+drm_property_reference_blob@p(object)
+)
+
+@script:python depends on report@
+object << r.object;
+p << r.p;
+@@
+
+msg="WARNING: use get/put helpers to reference and dereference %s" % (object)
+coccilib.report.print_report(p[0], msg)
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 33c85dfdfce9..a26a5f2dce39 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -202,6 +202,7 @@ EOF
# '&struct_name.member' - name of a structure member
# '@parameter' - name of a parameter
# '%CONST' - name of a constant.
+# '``LITERAL``' - literal string without any spaces on it.
## init lots of data
@@ -210,7 +211,8 @@ my $warnings = 0;
my $anon_struct_union = 0;
# match expressions used to find embedded type information
-my $type_constant = '\%([-_\w]+)';
+my $type_constant = '\b``([^\`]+)``\b';
+my $type_constant2 = '\%([-_\w]+)';
my $type_func = '(\w+)\(\)';
my $type_param = '\@(\w+(\.\.\.)?)';
my $type_fp_param = '\@(\w+)\(\)'; # Special RST handling for func ptr params
@@ -235,6 +237,7 @@ my $type_member_func = $type_member . '\(\)';
# these work fairly well
my @highlights_html = (
[$type_constant, "<i>\$1</i>"],
+ [$type_constant2, "<i>\$1</i>"],
[$type_func, "<b>\$1</b>"],
[$type_enum_xml, "<i>\$1</i>"],
[$type_struct_xml, "<i>\$1</i>"],
@@ -252,6 +255,7 @@ my $blankline_html = $local_lt . "p" . $local_gt; # was "<p>"
# html version 5
my @highlights_html5 = (
[$type_constant, "<span class=\"const\">\$1</span>"],
+ [$type_constant2, "<span class=\"const\">\$1</span>"],
[$type_func, "<span class=\"func\">\$1</span>"],
[$type_enum_xml, "<span class=\"enum\">\$1</span>"],
[$type_struct_xml, "<span class=\"struct\">\$1</span>"],
@@ -268,6 +272,7 @@ my $blankline_html5 = $local_lt . "br /" . $local_gt;
my @highlights_xml = (
["([^=])\\\"([^\\\"<]+)\\\"", "\$1<quote>\$2</quote>"],
[$type_constant, "<constant>\$1</constant>"],
+ [$type_constant2, "<constant>\$1</constant>"],
[$type_enum_xml, "<type>\$1</type>"],
[$type_struct_xml, "<structname>\$1</structname>"],
[$type_typedef_xml, "<type>\$1</type>"],
@@ -283,6 +288,7 @@ my $blankline_xml = $local_lt . "/para" . $local_gt . $local_lt . "para" . $loca
# gnome, docbook format
my @highlights_gnome = (
[$type_constant, "<replaceable class=\"option\">\$1</replaceable>"],
+ [$type_constant2, "<replaceable class=\"option\">\$1</replaceable>"],
[$type_func, "<function>\$1</function>"],
[$type_enum, "<type>\$1</type>"],
[$type_struct, "<structname>\$1</structname>"],
@@ -298,6 +304,7 @@ my $blankline_gnome = "</para><para>\n";
# these are pretty rough
my @highlights_man = (
[$type_constant, "\$1"],
+ [$type_constant2, "\$1"],
[$type_func, "\\\\fB\$1\\\\fP"],
[$type_enum, "\\\\fI\$1\\\\fP"],
[$type_struct, "\\\\fI\$1\\\\fP"],
@@ -312,6 +319,7 @@ my $blankline_man = "";
# text-mode
my @highlights_text = (
[$type_constant, "\$1"],
+ [$type_constant2, "\$1"],
[$type_func, "\$1"],
[$type_enum, "\$1"],
[$type_struct, "\$1"],
@@ -326,6 +334,7 @@ my $blankline_text = "";
# rst-mode
my @highlights_rst = (
[$type_constant, "``\$1``"],
+ [$type_constant2, "``\$1``"],
# Note: need to escape () to avoid func matching later
[$type_member_func, "\\:c\\:type\\:`\$1\$2\$3\\\\(\\\\) <\$1>`"],
[$type_member, "\\:c\\:type\\:`\$1\$2\$3 <\$1>`"],
@@ -344,6 +353,7 @@ my $blankline_rst = "\n";
# list mode
my @highlights_list = (
[$type_constant, "\$1"],
+ [$type_constant2, "\$1"],
[$type_func, "\$1"],
[$type_enum, "\$1"],
[$type_struct, "\$1"],
@@ -2392,8 +2402,7 @@ sub push_parameter($$$) {
}
$anon_struct_union = 0;
- my $param_name = $param;
- $param_name =~ s/\[.*//;
+ $param =~ s/[\[\)].*//;
if ($type eq "" && $param =~ /\.\.\.$/)
{
@@ -2424,9 +2433,9 @@ sub push_parameter($$$) {
# but inline preprocessor statements);
# also ignore unnamed structs/unions;
if (!$anon_struct_union) {
- if (!defined $parameterdescs{$param_name} && $param_name !~ /^#/) {
+ if (!defined $parameterdescs{$param} && $param !~ /^#/) {
- $parameterdescs{$param_name} = $undescribed;
+ $parameterdescs{$param} = $undescribed;
if (($type eq 'function') || ($type eq 'enum')) {
print STDERR "${file}:$.: warning: Function parameter ".
diff --git a/scripts/ksymoops/README b/scripts/ksymoops/README
index f6cb06e3f30e..413043980127 100644
--- a/scripts/ksymoops/README
+++ b/scripts/ksymoops/README
@@ -1,8 +1,7 @@
ksymoops has been removed from the kernel. It was always meant to be a
free standing utility, not linked to any particular kernel version.
The latest version can be found in
-ftp://ftp.<country>.kernel.org/pub/linux/utils/kernel/ksymoops together
-with patches to other utilities in order to give more accurate Oops
-debugging.
+https://www.kernel.org/pub/linux/utils/kernel/ksymoops together with patches to
+other utilities in order to give more accurate Oops debugging.
Keith Owens <kaos@ocs.com.au> Sat Jun 19 10:30:34 EST 1999
diff --git a/scripts/module-common.lds b/scripts/module-common.lds
index 9b6e246a45d0..d61b9e8678e8 100644
--- a/scripts/module-common.lds
+++ b/scripts/module-common.lds
@@ -20,8 +20,7 @@ SECTIONS {
__kcrctab_unused_gpl 0 : { *(SORT(___kcrctab_unused_gpl+*)) }
__kcrctab_gpl_future 0 : { *(SORT(___kcrctab_gpl_future+*)) }
- . = ALIGN(8);
- .init_array 0 : { *(SORT(.init_array.*)) *(.init_array) }
+ .init_array 0 : ALIGN(8) { *(SORT(.init_array.*)) *(.init_array) }
__jump_table 0 : ALIGN(8) { KEEP(*(__jump_table)) }
}
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 3c575cd07888..676fc10c9514 100755
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -262,8 +262,8 @@ EOF
cat <<EOF > debian/copyright
This is a packacked upstream version of the Linux kernel.
-The sources may be found at most Linux ftp sites, including:
-ftp://ftp.kernel.org/pub/linux/kernel
+The sources may be found at most Linux archive sites, including:
+https://www.kernel.org/pub/linux/kernel
Copyright: 1991 - 2015 Linus Torvalds and others.
diff --git a/scripts/recordmcount.c b/scripts/recordmcount.c
index aeb34223167c..16e086dcc567 100644
--- a/scripts/recordmcount.c
+++ b/scripts/recordmcount.c
@@ -412,6 +412,7 @@ static int
is_mcounted_section_name(char const *const txtname)
{
return strcmp(".text", txtname) == 0 ||
+ strcmp(".init.text", txtname) == 0 ||
strcmp(".ref.text", txtname) == 0 ||
strcmp(".sched.text", txtname) == 0 ||
strcmp(".spinlock.text", txtname) == 0 ||
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index 0b6002b36f20..1633c3e6c0b9 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -130,6 +130,7 @@ if ($inputfile =~ m,kernel/trace/ftrace\.o$,) {
# Acceptable sections to record.
my %text_sections = (
".text" => 1,
+ ".init.text" => 1,
".ref.text" => 1,
".sched.text" => 1,
".spinlock.text" => 1,
diff --git a/scripts/selinux/genheaders/genheaders.c b/scripts/selinux/genheaders/genheaders.c
index f4dd41f900d5..6a24569c3578 100644
--- a/scripts/selinux/genheaders/genheaders.c
+++ b/scripts/selinux/genheaders/genheaders.c
@@ -8,6 +8,7 @@
#include <string.h>
#include <errno.h>
#include <ctype.h>
+#include <sys/socket.h>
struct security_class_mapping {
const char *name;
diff --git a/scripts/selinux/mdp/mdp.c b/scripts/selinux/mdp/mdp.c
index c29fa4a6228d..ffe8179f5d41 100644
--- a/scripts/selinux/mdp/mdp.c
+++ b/scripts/selinux/mdp/mdp.c
@@ -32,6 +32,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
+#include <sys/socket.h>
static void usage(char *name)
{
diff --git a/scripts/spelling.txt b/scripts/spelling.txt
index 0545f5a8cabe..b67e74b22826 100644
--- a/scripts/spelling.txt
+++ b/scripts/spelling.txt
@@ -46,6 +46,8 @@ ackowledge||acknowledge
ackowledged||acknowledged
acording||according
activete||activate
+actived||activated
+actualy||actually
acumulating||accumulating
acumulator||accumulator
adapater||adapter
@@ -76,6 +78,8 @@ algorritm||algorithm
aligment||alignment
alignement||alignment
allign||align
+alligned||aligned
+allocatote||allocate
allocatrd||allocated
allocte||allocate
allpication||application
@@ -141,6 +145,7 @@ asycronous||asynchronous
asynchnous||asynchronous
atomatically||automatically
atomicly||atomically
+atempt||attempt
attachement||attachment
attched||attached
attemps||attempts
@@ -270,6 +275,7 @@ comunication||communication
conbination||combination
conditionaly||conditionally
conected||connected
+connecetd||connected
configuartion||configuration
configuratoin||configuration
configuraton||configuration
@@ -291,11 +297,14 @@ continous||continuous
continously||continuously
continueing||continuing
contraints||constraints
+contol||control
+contoller||controller
controled||controlled
controler||controller
controll||control
contruction||construction
contry||country
+conuntry||country
convertion||conversion
convertor||converter
convienient||convenient
@@ -310,6 +319,7 @@ coutner||counter
cryptocraphic||cryptographic
cunter||counter
curently||currently
+cylic||cyclic
dafault||default
deafult||default
deamon||daemon
@@ -398,6 +408,7 @@ efective||effective
efficently||efficiently
ehther||ether
eigth||eight
+elementry||elementary
eletronic||electronic
embeded||embedded
enabledi||enabled
@@ -443,6 +454,7 @@ extened||extended
extensability||extensibility
extention||extension
extracter||extractor
+falied||failed
faild||failed
faill||fail
failied||failed
@@ -492,6 +504,7 @@ futhermore||furthermore
futrue||future
gaurenteed||guaranteed
generiously||generously
+genereate||generate
genric||generic
globel||global
grabing||grabbing
@@ -513,8 +526,10 @@ hierachy||hierarchy
hierarchie||hierarchy
howver||however
hsould||should
+hypervior||hypervisor
hypter||hyper
identidier||identifier
+iligal||illegal
illigal||illegal
imblance||imbalance
immeadiately||immediately
@@ -600,6 +615,7 @@ intuative||intuitive
invaid||invalid
invalde||invalid
invalide||invalid
+invalud||invalid
invididual||individual
invokation||invocation
invokations||invocations
@@ -663,11 +679,14 @@ messsages||messages
microprocesspr||microprocessor
milliseonds||milliseconds
minium||minimum
+minimam||minimum
minumum||minimum
+misalinged||misaligned
miscelleneous||miscellaneous
misformed||malformed
mispelled||misspelled
mispelt||misspelt
+mising||missing
miximum||maximum
mmnemonic||mnemonic
mnay||many
@@ -888,6 +907,7 @@ replys||replies
reponse||response
representaion||representation
reqeust||request
+requestied||requested
requiere||require
requirment||requirement
requred||required
@@ -981,6 +1001,7 @@ spinlcok||spinlock
spinock||spinlock
splitted||split
spreaded||spread
+spurrious||spurious
sructure||structure
stablilization||stabilization
staically||statically
@@ -1013,6 +1034,7 @@ superseeded||superseded
suplied||supplied
suported||supported
suport||support
+supportet||supported
suppored||supported
supportin||supporting
suppoted||supported
@@ -1056,6 +1078,7 @@ throught||through
thses||these
tiggered||triggered
tipically||typically
+timout||timeout
tmis||this
torerable||tolerable
tramsmitted||transmitted
@@ -1081,6 +1104,7 @@ unconditionaly||unconditionally
underun||underrun
unecessary||unnecessary
unexecpted||unexpected
+unexepected||unexpected
unexpcted||unexpected
unexpectd||unexpected
unexpeted||unexpected
@@ -1096,6 +1120,7 @@ unneded||unneeded
unneedingly||unnecessarily
unnsupported||unsupported
unmached||unmatched
+unregester||unregister
unresgister||unregister
unrgesiter||unregister
unsinged||unsigned