Home
last modified time | relevance | path

Searched refs:to (Results 1 – 25 of 83) sorted by relevance

1234

/scripts/coccinelle/api/
Dkstrdup.cocci18 expression from,to;
23 - to = kmalloc(strlen(from) + 1,flag);
24 + to = kstrdup(from, flag);
25 ... when != \(from = E1 \| to = E1 \)
26 if (to==NULL || ...) S
27 ... when != \(from = E2 \| to = E2 \)
28 - strcpy(to, from);
31 expression x,from,to;
38 - to = \(kmalloc\|kzalloc\)(x,flag);
39 + to = kstrdup(from, flag);
[all …]
Dmemdup_user.cocci3 /// This is a little bit restricted to reduce false positives
26 expression from,to,size;
31 - to = \(kmalloc@p\|kzalloc@p\)
34 + to = memdup_user(from,size);
36 - to==NULL
37 + IS_ERR(to)
41 + PTR_ERR(to)
44 - if (copy_from_user(to, from, size) != 0) {
51 expression from,to,size;
56 - to = \(kvmalloc@p\|kvzalloc@p\)(size,\(GFP_KERNEL\|GFP_USER\));
[all …]
Dmemdup.cocci18 expression from,to;
23 to = \(kmalloc@p\|kzalloc@p\)(strlen(from) + 1,flag);
26 expression x,from,to;
33 to = \(kmalloc@p\|kzalloc@p\)(x,flag);
36 expression from,to,size,flag;
41 - to = \(kmalloc@p\|kzalloc@p\)(size,flag);
42 + to = kmemdup(from,size,flag);
43 if (to==NULL || ...) S
44 - memcpy(to, from, size);
47 expression from,to,size,flag;
[all …]
Dplatform_no_drv_owner.cocci127 msg = "No need to set .owner here. The core will do it."
134 msg = "No need to set .owner here. The core will do it."
141 msg = "No need to set .owner here. The core will do it."
148 msg = "No need to set .owner here. The core will do it."
157 msg = "No need to set .owner here. The core will do it."
164 msg = "No need to set .owner here. The core will do it."
171 msg = "No need to set .owner here. The core will do it."
178 msg = "No need to set .owner here. The core will do it."
Dd_find_alias.cocci2 /// Make sure calls to d_find_alias() have a corresponding call to dput().
61 cocci.print_main("Missing call to dput()",p1)
80 msg = "Missing call to dput() at line %s."
/scripts/
DKbuild.include19 # The temporary file to save gcc -MMD generated dependencies must not
36 # Quote a string to pass it to C files. foo => '"foo"'
47 # filechk is used to check if the content of a generated file is updated.
54 # The rule defined shall write to stdout the content of the new file.
105 # However, this does not work when the stderr is piped to another program, like
126 # if_changed_dep - as if_changed, but uses fixdep to reveal dependencies
140 # Replace >$< with >$$< to preserve $ when reloading the .cmd file
142 # Replace >#< with >$(pound)< to avoid starting a comment in the .cmd file
144 # Replace >'< with >'\''< to be able to enclose the whole string in '...'
155 # It is a typical mistake to forget the FORCE prerequisite. Check it here so
[all …]
Ddev-needs.sh10 This script needs to be run on the target device once it has booted to a
16 chain, so the last entry in the output is close to the root of the
19 By default it lists the full path to the devices under /sys/devices.
21 It also takes an optional modifier flag as the first parameter to change
32 The filter options provide a way to filter out some dependencies:
/scripts/ksymoops/
DREADME1 ksymoops has been removed from the kernel. It was always meant to be a
2 free standing utility, not linked to any particular kernel version.
4 https://www.kernel.org/pub/linux/utils/kernel/ksymoops together with patches to
5 other utilities in order to give more accurate Oops debugging.
/scripts/coccinelle/null/
Dbadzero.cocci2 /// Compare pointer-typed values to NULL rather than 0
4 //# This makes an effort to choose between !x and x == NULL. !x is used
5 //# if it has previously been used with the function used to initialize x.
7 //# using the option -all_includes and the option -I to specify an
74 coccilib.org.print_todo(p[0], "WARNING comparing pointer to 0")
80 coccilib.report.print_report(p[0], "WARNING comparing pointer to 0")
120 // This rule may lead to inconsistent path problems, if E is defined in two
172 coccilib.org.print_todo(p[0], "WARNING comparing pointer to 0, suggest !E")
178 coccilib.org.print_todo(p[0], "WARNING comparing pointer to 0")
184 coccilib.report.print_report(p[0], "WARNING comparing pointer to 0, suggest !E")
[all …]
/scripts/coccinelle/misc/
Dadd_namespace.cocci3 /// Adds missing MODULE_IMPORT_NS statements to source files
5 /// This script is usually called from scripts/nsdeps with -D ns=<namespace> to
6 /// add a missing namespace tag to a module source file.
18 // Add missing imports, but only adjacent to a MODULE_LICENSE statement.
19 // That ensures we are adding it only to the main module source file.
Darray_size_dup.cocci5 /// 1. An opencoded expression is used before array_size() to compute the same size
6 /// 2. An opencoded expression is used after array_size() to compute the same size
9 /// before a call to the *_size() function we can miss an overflow.
43 msg = "WARNING: array_size is used later (line %s) to compute the same size" % (p2[0].line)
51 msg = "WARNING: array_size is used later (line %s) to compute the same size" % (p2[0].line)
72 msg = "WARNING: array_size is already used (line %s) to compute the same size" % (p1[0].line)
80 msg = "WARNING: array_size is already used (line %s) to compute the same size" % (p1[0].line)
108 msg = "WARNING: array3_size is used later (line %s) to compute the same size" % (p2[0].line)
116 msg = "WARNING: array3_size is used later (line %s) to compute the same size" % (p2[0].line)
138 msg = "WARNING: array3_size is already used (line %s) to compute the same size" % (p1[0].line)
[all …]
Dcond_no_effect.cocci8 // Unfortunately there also seems to be a tendency to use
12 // accepted pattern and if at all it would need to be commented
14 // In the Linux kernel it does not seem to actually report
23 // have to come from a module built for SHcompact. */
30 // * Both paths of the branch look the same. They're supposed to
Dboolconv.cocci2 /// Remove unneeded conversion to bool
4 //# Relational and logical operators evaluate to bool,
79 msg = "WARNING: conversion to bool not needed here"
90 msg = "WARNING: conversion to bool not needed here"
Dexcluded_middle.cocci3 /// Condition !A || A && B is equivalent to !A || B.
33 coccilib.report.print_report(p[0], "WARNING !A || A && B is equivalent to !A || B")
39 coccilib.org.print_todo(p[0], "WARNING !A || A && B is equivalent to !A || B")
Dbadty.cocci2 /// Correct the size argument to alloc functions
4 //# This makes an effort to find cases where the argument to sizeof is wrong
7 //# to the the memory being allocated. There are false positives in cases the
/scripts/kconfig/tests/err_recursive_dep/
Dexpected_stderr3 For a resolution refer to Documentation/kbuild/kconfig-language.rst
8 For a resolution refer to Documentation/kbuild/kconfig-language.rst
14 For a resolution refer to Documentation/kbuild/kconfig-language.rst
20 For a resolution refer to Documentation/kbuild/kconfig-language.rst
26 For a resolution refer to Documentation/kbuild/kconfig-language.rst
31 For a resolution refer to Documentation/kbuild/kconfig-language.rst
37 For a resolution refer to Documentation/kbuild/kconfig-language.rst
/scripts/atomic/fallbacks/
Dadd_unless5 * @a: the amount to add to v...
6 * @u: ...unless v is equal to u.
8 * Atomically adds @a to @v, if @v was not already @u.
Dfetch_add_unless5 * @a: the amount to add to v...
6 * @u: ...unless v is equal to u.
8 * Atomically adds @a to @v, so long as @v was not already @u.
Dadd_negative4 * @i: integer value to add
7 * Atomically adds @i to @v and returns true
9 * result is greater than or equal to zero.
/scripts/kconfig/tests/preprocess/escape/
DKconfig6 # You can not pass commas directly to a function since they are treated as
7 # delimiters. You can use the following trick to do so.
16 # No need to escape '$' itself.
22 # You need a trick to escape '$' followed by '('
27 # You need a trick to treat unbalanced parentheses.
/scripts/kconfig/
Dnconf-cfg.sh43 echo >&2 "* Unable to find the ncurses package."
47 echo >&2 "* You may also need to install ${HOSTPKG_CONFIG} to find the"
Dmconf-cfg.sh45 echo >&2 "* Unable to find the ncurses package."
49 echo >&2 "* You may also need to install ${HOSTPKG_CONFIG} to find the"
/scripts/kconfig/tests/preprocess/builtin_func/
DKconfig3 # 'info' prints the argument to stdout.
6 # 'warning-if', if the first argument is y, sends the second argument to stderr,
24 # 'filename' is expanded to the currently parsed file name,
25 # 'lineno' to the line number.
/scripts/coccinelle/tests/
Ddoublebitand.cocci5 //# such as 0 for | is used to indicate no information, to maintain the
49 cocci.print_main("duplicated argument to & or |",p)
55 coccilib.report.print_report(p[0],"duplicated argument to & or |")
/scripts/kconfig/tests/preprocess/variable/
DKconfig18 # Append something to a simply expanded variable.
24 # Append something to a recursively expanded variable.
30 # Use += operator to an undefined variable.
48 # If some arguments are optional, it is useful to pass fewer parameters.

1234