/scripts/include/ |
A D | xalloc.h | 13 if (!p) in xmalloc() 15 return p; in xmalloc() 22 if (!p) in xcalloc() 24 return p; in xcalloc() 29 p = realloc(p, size); in xrealloc() 30 if (!p) in xrealloc() 32 return p; in xrealloc() 39 if (!p) in xstrdup() 41 return p; in xstrdup() 48 if (!p) in xstrndup() [all …]
|
/scripts/basic/ |
A D | fixdep.c | 194 while ((p = strstr(p, "CONFIG_"))) { in parse_config_file() 195 if (p > start && (isalnum(p[-1]) || p[-1] == '_')) { in parse_config_file() 203 if (str_ends_with(p, q - p, "_MODULE")) in parse_config_file() 208 use_config(p, r - p); in parse_config_file() 277 p++; in parse_dep_file() 278 while (*p != '\0' && *p != '\n') { in parse_dep_file() 291 p++; in parse_dep_file() 309 p++; in parse_dep_file() 317 p++; in parse_dep_file() 336 memmove(p + 1, p, q - p); in parse_dep_file() [all …]
|
/scripts/coccinelle/misc/ |
A D | semicolon.cocci | 17 position p; 25 position p; 30 case ...:;@p 36 case ...:;@p 50 position p != {r_default.p, r_case.p}; 56 S@p1;@p 60 p << r1.p; 69 -;@p 72 p << r1.p; 79 *;@p [all …]
|
A D | warn.cocci | 17 position p; 25 position p != bad1.p; 32 p << r1.p; 38 p << r1.p; 46 position p != bad1.p; 49 -printk@p( 74 position p != bad1.p; 81 p << r2.p; 87 p << r2.p; 95 position p != bad2.p; [all …]
|
A D | irqf_oneshot.cocci | 20 position p; 42 position p != r1.p; 58 position p != {r1.p,r2.p}; 84 position p != {r1.p,r2.p}; 87 *request_threaded_irq@p(irq, NULL, ...) 95 position p != {r1.p,r2.p}; 98 request_threaded_irq@p(irq, NULL, ...) 104 p << match.p; 107 coccilib.org.print_todo(p[0],msg) 110 p << match.p; [all …]
|
A D | minmax.cocci | 24 position p; 72 position p != errcode.p; 138 position p != errcode.p; 169 p << rmax.p; 176 p << rmax.p; 183 p << rmaxif.p; 190 p << rmaxif.p; 197 p << rmin.p; 204 p << rmin.p; 211 p << rminif.p; [all …]
|
A D | do_div.cocci | 85 position p; 92 do_div@p(f, l); 94 do_div@p(f, ul); 102 p << r.p; 109 p << r.p; 116 p << r.p; 123 p << r.p; 130 p << r.p; 137 p << r.p; 144 p << r.p; [all …]
|
A D | flexible_array.cocci | 21 for p in positions: 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[ 96 p << r.p; [all …]
|
A D | swap.cocci | 21 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; 119 p << rvar.p; [all …]
|
/scripts/coccinelle/api/ |
A D | memdup.cocci | 20 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 …]
|
A D | memdup_user.cocci | 22 def relevant(p): 28 position p : script:python() { relevant(p) }; 31 - to = \(kmalloc@p\|kzalloc@p\) 53 position p : script:python() { relevant(p) }; 75 position p : script:python() { relevant(p) }; 79 * to = \(kmalloc@p\|kzalloc@p\) 88 position p : script:python() { relevant(p) }; 98 p << r.p; 104 p << r.p; 110 p << rv.p; [all …]
|
A D | kfree_sensitive.cocci | 24 def relevant(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; 87 p << r.p; [all …]
|
A D | resource_size.cocci | 50 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/ |
A D | ifnullfree.cocci | 47 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)
|
A D | devm_free.cocci | 60 position p; 90 kfree@p(x) 98 free_page@p(x) 100 free_irq@p(x) 102 iounmap@p(x) 109 position p != safe.p; 113 * kfree@p(x) 123 * free_irq@p(x) 125 * iounmap@p(x) 131 p << pb.p; [all …]
|
A D | ifnulldev_put.cocci | 37 position p; 41 * \(__dev_put@p\|dev_put@p\|dev_put_track@p\|__dev_hold@p\|dev_hold@p\| 42 * dev_hold_track@p\)(E, ...); 45 p << r.p; 48 cocci.print_main("NULL check before dev_{put, hold} functions is not needed", p) 51 p << r.p; 55 coccilib.report.print_report(p[0], msg)
|
A D | kfreeaddr.cocci | 17 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/coccinelle/tests/ |
A D | unsigned_lesser_than_zero.cocci | 24 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 …]
|
A D | doublebitand.cocci | 22 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 …]
|
A D | doubletest.cocci | 21 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 …]
|
A D | odd_ptr_err.cocci | 19 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/ |
A D | zalloc-simple.cocci | 157 p << r.p; 166 p << r.p; 187 p << r1.p; 196 p << r1.p; 217 p << r2.p; 226 p << r2.p; 247 p << r3.p; 256 p << r3.p; 277 p << r4.p; 286 p << r4.p; [all …]
|
/scripts/coccinelle/null/ |
A D | badzero.cocci | 53 position p; 58 * 0@p 61 * 0@p 63 * 0@p 66 * 0@p 71 p << t1.p; 77 p << t1.p; 220 * E == 0@p 222 * E != 0@p 230 p << t3.p; [all …]
|
/scripts/ |
A D | extract-module-sig.pl | 48 my $p = $len - length($magic_number); 49 my $raw_magic = substr($buf, $p); 55 $p -= 12; 56 my $raw_info = substr($buf, $p, 12); 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; 82 my $raw_name = substr($buf, $p, $name_len); [all …]
|
/scripts/kconfig/ |
A D | preprocess.c | 148 FILE *p; in do_shell() local 157 if (!p) { in do_shell() 390 *p = 0; in eval_clause() 401 p++; in eval_clause() 476 p++; in expand_dollar_with_args() 477 q = p; in expand_dollar_with_args() 494 return eval_clause(p, q - p, argc, argv); in expand_dollar_with_args() 518 p++; in __expand_string() 525 in = p; in __expand_string() 532 p++; in __expand_string() [all …]
|