Home
last modified time | relevance | path

Searched refs:p (Results 1 – 25 of 105) sorted by relevance

12345

/scripts/coccinelle/misc/
Dsemicolon.cocci17 position p;
21 default: ...;@p
25 position p;
30 case ...:;@p
36 case ...:;@p
43 case ...:;@p
50 position p != {r_default.p, r_case.p};
56 S@p1;@p
60 p << r1.p;
63 if p[0].line != p1[0].line_end:
[all …]
Dwarn.cocci17 position p;
21 printk@p(...);
25 position p != bad1.p;
28 printk@p(...);
32 p << r1.p;
35 cocci.print_main("printk + WARN_ON can be just WARN",p)
38 p << r1.p;
42 coccilib.report.print_report(p[0],msg)
46 position p != bad1.p;
49 -printk@p(
[all …]
Dirqf_oneshot.cocci20 position p;
23 request_threaded_irq@p(irq, NULL, thread_fn,
31 devm_request_threaded_irq@p(dev, irq, NULL, thread_fn,
42 position p != r1.p;
51 request_threaded_irq@p(irq, NULL, thread_fn, flags, ...);
53 devm_request_threaded_irq@p(dev, irq, NULL, thread_fn, flags, ...);
58 position p != {r1.p,r2.p};
61 request_threaded_irq@p(irq, NULL, thread_fn,
71 devm_request_threaded_irq@p(dev, irq, NULL, thread_fn,
84 position p != {r1.p,r2.p};
[all …]
Dminmax.cocci24 position p;
30 * ((x) cmp@p (y) ? (x) : (y))
39 position p;
45 * if ((x) cmp@p (y)) {
57 position p;
63 * ((x) cmp@p (y) ? (x) : (y))
72 position p;
78 * if ((x) cmp@p (y)) {
121 position p;
130 return ((x) cmp@p 0 ? (x) : 0);
[all …]
Dflexible_array.cocci21 for p in positions:
22 if "uapi" in p.file:
29 position p : script:python() { relevant(p) };
35 * T array@p[\(0\|1\)];
40 * T array@p[\(0\|1\)];
45 * T array@p[\(0\|1\)];
50 * T array@p[\(0\|1\)];
73 position p : script:python() { relevant(p) };
82 T array@p[
89 T array@p[
[all …]
Dswap.cocci21 position p;
33 * a = b;@p
40 position p != rvar.p;
44 * a = b;@p
101 p << r.p;
104 coccilib.report.print_report(p[0], "WARNING opportunity for swap()")
107 p << r.p;
110 coccilib.org.print_todo(p[0], "WARNING opportunity for swap()")
113 p << rvar.p;
116 coccilib.report.print_report(p[0], "WARNING opportunity for swap()")
[all …]
Dnoderef.cocci55 position p;
60 *x = <+... sizeof@p(x) ...+>
62 *f(...,(T)(x),...,sizeof@p(x),...)
64 *f(...,sizeof@p(x),...,(T)(x),...)
66 *f(...,(T)(x),...,i*sizeof@p(x),...)
68 *f(...,i*sizeof@p(x),...,(T)(x),...)
72 p << r.p;
75 cocci.print_main("application of sizeof to pointer",p)
78 p << r.p;
82 coccilib.report.print_report(p[0],msg)
Difaddr.cocci18 position p;
21 *if@p (&x)
25 p << r.p;
28 cocci.print_main("test of a variable/field address",p)
31 p << r.p;
35 coccilib.report.print_report(p[0],msg)
/scripts/coccinelle/api/
Dmemdup.cocci20 position p;
23 to = \(kmalloc@p\|kzalloc@p\)(strlen(from) + 1,flag);
28 position p;
33 to = \(kmalloc@p\|kzalloc@p\)(x,flag);
37 position p != {r1.p,r2.p};
41 - to = \(kmalloc@p\|kzalloc@p\)(size,flag);
48 position p != {r1.p,r2.p};
52 * to = \(kmalloc@p\|kzalloc@p\)(size,flag);
57 p << r.p;
60 coccilib.org.print_todo(p[0], "WARNING opportunity for kmemdup")
[all …]
Dmemdup_user.cocci22 def relevant(p):
23 return not (filter & {el.current_element for el in p})
28 position p : script:python() { relevant(p) };
31 - to = \(kmalloc@p\|kzalloc@p\)
53 position p : script:python() { relevant(p) };
56 - to = \(kvmalloc@p\|kvzalloc@p\)(size,\(GFP_KERNEL\|GFP_USER\));
75 position p : script:python() { relevant(p) };
79 * to = \(kmalloc@p\|kzalloc@p\)
88 position p : script:python() { relevant(p) };
92 * to = \(kvmalloc@p\|kvzalloc@p\)(size,\(GFP_KERNEL\|GFP_USER\));
[all …]
Dkfree_sensitive.cocci24 def relevant(p):
25 return not (filter & {el.current_element for el in p})
36 position p : script:python() { relevant(p) };
48 * \(kfree\|vfree\|kvfree\)(E)@p;
52 position p : script:python() { relevant(p) };
61 - kfree(E)@p;
64 - \(vfree\|kvfree\)(E)@p;
70 position p : script:python() { relevant(p) };
79 - kfree(E)@p;
82 - \(vfree\|kvfree\)(E)@p;
[all …]
Dresource_size.cocci50 position p;
53 (res->end@p - res->start) + 1
57 position p != r_org.p;
60 res->end@p - res->start
63 p << r_org.p;
69 coccilib.org.print_todo(p[0], msg_safe)
72 p << r_org.p;
77 coccilib.report.print_report(p[0], msg)
80 p << rbad_org.p;
86 coccilib.org.print_todo(p[0], msg_safe)
[all …]
/scripts/coccinelle/free/
Difnullfree.cocci47 position p;
51 * \(kfree@p\|kvfree@p\|kfree_sensitive@p\|kvfree_sensitive@p\|vfree@p\|
52 * debugfs_remove@p\|debugfs_remove_recursive@p\|
53 * usb_free_urb@p\|kmem_cache_destroy@p\|mempool_destroy@p\|
54 * dma_pool_destroy@p\)(E, ...);
57 p << r.p;
60 cocci.print_main("NULL check before that freeing function is not needed", p)
63 p << r.p;
67 coccilib.report.print_report(p[0], msg)
Ddevm_free.cocci60 position p;
90 kfree@p(x)
92 kfree_sensitive@p(x)
94 krealloc@p(x, ...)
96 free_pages@p(x, ...)
98 free_page@p(x)
100 free_irq@p(x)
102 iounmap@p(x)
104 ioport_unmap@p(x)
109 position p != safe.p;
[all …]
Dkfreeaddr.cocci17 position p;
21 * kfree@p(&e->f)
23 * kfree_sensitive@p(&e->f)
27 p << r.p;
30 cocci.print_main("kfree",p)
33 p << r.p;
37 coccilib.report.print_report(p[0],msg)
/scripts/kconfig/
Dutil.c84 void *p = malloc(size); in xmalloc() local
85 if (p) in xmalloc()
86 return p; in xmalloc()
93 void *p = calloc(nmemb, size); in xcalloc() local
94 if (p) in xcalloc()
95 return p; in xcalloc()
100 void *xrealloc(void *p, size_t size) in xrealloc() argument
102 p = realloc(p, size); in xrealloc()
103 if (p) in xrealloc()
104 return p; in xrealloc()
[all …]
Dpreprocess.c143 FILE *p; in do_shell() local
151 p = popen(cmd, "r"); in do_shell()
152 if (!p) { in do_shell()
157 nread = fread(buf, 1, sizeof(buf), p); in do_shell()
173 if (pclose(p) == -1) { in do_shell()
348 char *tmp, *name, *res, *endptr, *prev, *p; in eval_clause() local
368 prev = p = tmp; in eval_clause()
384 while (*p) { in eval_clause()
385 if (nest == 0 && *p == ',') { in eval_clause()
386 *p = 0; in eval_clause()
[all …]
/scripts/basic/
Dfixdep.c206 static void parse_config_file(const char *p) in parse_config_file() argument
209 const char *start = p; in parse_config_file()
211 while ((p = strstr(p, "CONFIG_"))) { in parse_config_file()
212 if (p > start && (isalnum(p[-1]) || p[-1] == '_')) { in parse_config_file()
213 p += 7; in parse_config_file()
216 p += 7; in parse_config_file()
217 q = p; in parse_config_file()
220 if (str_ends_with(p, q - p, "_MODULE")) in parse_config_file()
224 if (r > p) in parse_config_file()
225 use_config(p, r - p); in parse_config_file()
[all …]
/scripts/coccinelle/tests/
Dunsigned_lesser_than_zero.cocci24 position p;
33 (\( v@p < 0 \| v@p <= 0 \| v@p >= 0 \| v@p > 0 \))
36 position r_cmp.p;
46 * (\( v@p <=@e 0 \| v@p >@e 0 \))
50 (\( v@p < 0 \| v@p <= 0 \)) || ... || (\( v >= c \| v > c \))
52 (\( v >= c \| v > c \)) || ... || (\( v@p < 0 \| v@p <= 0 \))
54 (\( v@p >= 0 \| v@p > 0 \)) && ... && (\( v < c \| v <= c \))
56 ((\( v < c \| v <= c \) && ... && \( v@p >= 0 \| v@p > 0 \)))
58 * (\( v@p <@e 0 \| v@p >=@e 0 \))
63 p << r_cmp.p;
[all …]
Ddoublebitand.cocci22 position p;
26 * E@p
29 * E@p
32 * E@p
35 * E@p
38 * !E@p
41 * !E@p
46 p << r.p;
49 cocci.print_main("duplicated argument to & or |",p)
52 p << r.p;
[all …]
Ddoubletest.cocci21 position p;
25 E@p || ... || E
27 E@p && ... && E
32 position r.p;
37 E@p
44 position r.p;
47 *E@p
50 p << r.p;
53 cocci.print_main("duplicated argument to && or ||",p)
56 p << r.p;
[all …]
Dodd_ptr_err.cocci19 position p;
24 PTR_ERR@p(x)
30 position p;
36 PTR_ERR@p(\(e1 ? e2 : x\|e1 ? x : e2\))
38 PTR_ERR@p(x)
45 position p != {ok1.p,ok2.p};
54 PTR_ERR@p(
65 position p != {ok1.p,ok2.p};
76 PTR_ERR@j1@p(
84 position p != {ok1.p,ok2.p};
[all …]
/scripts/coccinelle/api/alloc/
Dzalloc-simple.cocci149 position p;
152 x = (T)kmalloc@p(E1,E2);
157 p << r.p;
163 coccilib.org.print_todo(p[0], msg_safe)
166 p << r.p;
171 coccilib.report.print_report(p[0], msg)
179 position p;
182 x = (T)vmalloc@p(E1);
187 p << r1.p;
193 coccilib.org.print_todo(p[0], msg_safe)
[all …]
/scripts/coccinelle/null/
Dbadzero.cocci53 position p;
58 * 0@p
61 * 0@p
63 * 0@p
66 * 0@p
71 p << t1.p;
74 coccilib.org.print_todo(p[0], "WARNING comparing pointer to 0")
77 p << t1.p;
80 coccilib.report.print_report(p[0], "WARNING comparing pointer to 0")
169 p << t2.p1;
[all …]
/scripts/
Dextract-module-sig.pl48 my $p = $len - length($magic_number);
49 my $raw_magic = substr($buf, $p);
55 $p -= 12;
56 my $raw_info = substr($buf, $p, 12);
75 unless ($p >= $name_len + $kid_len + $sig_len);
77 $p -= $sig_len;
78 my $raw_sig = substr($buf, $p, $sig_len);
79 $p -= $kid_len;
80 my $raw_kid = substr($buf, $p, $kid_len);
81 $p -= $name_len;
[all …]

12345