/scripts/ |
D | conmakehash.c | 36 char *p = *p0; in getunicode() local 38 while (*p == ' ' || *p == '\t') in getunicode() 39 p++; in getunicode() 40 if (*p != 'U' || p[1] != '+' || in getunicode() 41 !isxdigit(p[2]) || !isxdigit(p[3]) || !isxdigit(p[4]) || in getunicode() 42 !isxdigit(p[5]) || isxdigit(p[6])) in getunicode() 44 *p0 = p+6; in getunicode() 45 return strtol(p+2,0,16); in getunicode() 87 char *p, *p1; in main() local 119 if ( (p = strchr(buffer, '\n')) != NULL ) in main() [all …]
|
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); 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 …]
|
/scripts/coccinelle/misc/ |
D | warn.cocci | 16 position p; 20 printk@p(...); 24 position p != bad1.p; 27 printk@p(...); 31 p << r1.p; 34 cocci.print_main("printk + WARN_ON can be just WARN",p) 37 p << r1.p; 41 coccilib.report.print_report(p[0],msg) 45 position p != bad1.p; 48 -printk@p( [all …]
|
D | semicolon.cocci | 16 position p; 20 default: ...;@p 24 position p; 29 case ...:;@p 35 case ...:;@p 42 case ...:;@p 49 position p != {r_default.p, r_case.p}; 55 S@p1;@p 59 p << r1.p; 62 if p[0].line != p1[0].line_end: [all …]
|
D | irqf_oneshot.cocci | 20 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 …]
|
D | boolinit.cocci | 83 position p; 87 * t@p == true 89 * true == t@p 91 * t@p != true 93 * true != t@p 95 * t@p == false 97 * false == t@p 99 * t@p != false 101 * false != t@p 106 position p; [all …]
|
D | noderef.cocci | 54 position p; 59 *x = <+... sizeof@p(x) ...+> 61 *f(...,(T)(x),...,sizeof@p(x),...) 63 *f(...,sizeof@p(x),...,(T)(x),...) 65 *f(...,(T)(x),...,i*sizeof@p(x),...) 67 *f(...,i*sizeof@p(x),...,(T)(x),...) 71 p << r.p; 74 cocci.print_main("application of sizeof to pointer",p) 77 p << r.p; 81 coccilib.report.print_report(p[0],msg)
|
D | ifaddr.cocci | 17 position p; 20 *if@p (&x) 24 p << r.p; 27 cocci.print_main("test of a variable/field address",p) 30 p << r.p; 34 coccilib.report.print_report(p[0],msg)
|
/scripts/coccinelle/api/ |
D | memdup.cocci | 19 position p; 22 to = \(kmalloc@p\|kzalloc@p\)(strlen(from) + 1,flag); 27 position p; 32 to = \(kmalloc@p\|kzalloc@p\)(x,flag); 36 position p != {r1.p,r2.p}; 40 - to = \(kmalloc@p\|kzalloc@p\)(size,flag); 47 position p != {r1.p,r2.p}; 51 * to = \(kmalloc@p\|kzalloc@p\)(size,flag); 57 p << r.p; 60 coccilib.org.print_todo(p[0], "WARNING opportunity for kmemdep") [all …]
|
D | resource_size.cocci | 49 position p; 52 (res->end@p - res->start) + 1 56 position p != r_org.p; 59 res->end@p - res->start 62 p << r_org.p; 68 coccilib.org.print_todo(p[0], msg_safe) 71 p << r_org.p; 76 coccilib.report.print_report(p[0], msg) 79 p << rbad_org.p; 85 coccilib.org.print_todo(p[0], msg_safe) [all …]
|
D | drm-get-put.cocci | 58 position p; 62 drm_mode_object_unreference@p(object) 64 drm_mode_object_reference@p(object) 66 drm_connector_unreference@p(object) 68 drm_connector_reference@p(object) 70 drm_framebuffer_unreference@p(object) 72 drm_framebuffer_reference@p(object) 74 drm_gem_object_unreference@p(object) 76 drm_gem_object_reference@p(object) 82 drm_property_unreference_blob@p(object) [all …]
|
D | ptr_ret.cocci | 62 p << r1.p1; 65 coccilib.org.print_todo(p[0], "WARNING: PTR_ERR_OR_ZERO can be used") 69 p << r2.p2; 72 coccilib.org.print_todo(p[0], "WARNING: PTR_ERR_OR_ZERO can be used") 75 p << r3.p3; 78 coccilib.org.print_todo(p[0], "WARNING: PTR_ERR_OR_ZERO can be used") 81 p << r1.p1; 84 coccilib.report.print_report(p[0], "WARNING: PTR_ERR_OR_ZERO can be used") 87 p << r2.p2; 90 coccilib.report.print_report(p[0], "WARNING: PTR_ERR_OR_ZERO can be used") [all …]
|
/scripts/coccinelle/tests/ |
D | unsigned_lesser_than_zero.cocci | 23 position p; 32 (\( v@p < 0 \| v@p <= 0 \| v@p >= 0 \| v@p > 0 \)) 35 position r_cmp.p; 45 * (\( v@p <=@e 0 \| v@p >@e 0 \)) 49 (\( v@p < 0 \| v@p <= 0 \)) || ... || (\( v >= c \| v > c \)) 51 (\( v >= c \| v > c \)) || ... || (\( v@p < 0 \| v@p <= 0 \)) 53 (\( v@p >= 0 \| v@p > 0 \)) && ... && (\( v < c \| v <= c \)) 55 ((\( v < c \| v <= c \) && ... && \( v@p >= 0 \| v@p > 0 \))) 57 * (\( v@p <@e 0 \| v@p >=@e 0 \)) 62 p << r_cmp.p; [all …]
|
D | doublebitand.cocci | 21 position p; 25 * E@p 28 * E@p 31 * E@p 34 * E@p 37 * !E@p 40 * !E@p 45 p << r.p; 48 cocci.print_main("duplicated argument to & or |",p) 51 p << r.p; [all …]
|
D | odd_ptr_err.cocci | 18 position p; 23 PTR_ERR@p(x) 29 position p; 35 PTR_ERR@p(\(e1 ? e2 : x\|e1 ? x : e2\)) 37 PTR_ERR@p(x) 44 position p != {ok1.p,ok2.p}; 53 PTR_ERR@p( 64 position p != {ok1.p,ok2.p}; 75 PTR_ERR@j1@p( 83 position p != {ok1.p,ok2.p}; [all …]
|
D | doubletest.cocci | 19 position p; 23 * E@p 26 * E@p 31 p << r.p; 34 cocci.print_main("duplicated argument to && or ||",p) 37 p << r.p; 40 coccilib.report.print_report(p[0],"duplicated argument to && or ||")
|
/scripts/dtc/ |
D | fdtdump.c | 18 #define PALIGN(p, a) ((void *)(ALIGN((unsigned long)(p), (a)))) argument 19 #define GET_CELL(p) (p += 4, *((const uint32_t *)(p-4))) argument 24 const char *p = data; in print_data() local 35 printf("0x%08x%s", fdt32_to_cpu(GET_CELL(p)), in print_data() 41 printf("%02x%s", *p++, i < len - 1 ? " " : ""); in print_data() 59 const char *p, *s, *t; in dump_blob() local 98 p = p_struct; in dump_blob() 99 while ((tag = fdt32_to_cpu(GET_CELL(p))) != FDT_END) { in dump_blob() 104 s = p; in dump_blob() 105 p = PALIGN(p + strlen(s) + 1, 4); in dump_blob() [all …]
|
/scripts/coccinelle/null/ |
D | badzero.cocci | 52 position p; 57 * 0@p 60 * 0@p 62 * 0@p 65 * 0@p 70 p << t1.p; 73 coccilib.org.print_todo(p[0], "WARNING comparing pointer to 0") 76 p << t1.p; 79 coccilib.report.print_report(p[0], "WARNING comparing pointer to 0") 168 p << t2.p1; [all …]
|
/scripts/coccinelle/free/ |
D | ifnullfree.cocci | 40 position p; 44 * \(kfree@p\|kzfree@p\|debugfs_remove@p\|debugfs_remove_recursive@p\| 45 * usb_free_urb@p\|kmem_cache_destroy@p\|mempool_destroy@p\| 46 * dma_pool_destroy@p\)(E); 49 p << r.p; 52 cocci.print_main("NULL check before that freeing function is not needed", p) 55 p << r.p; 59 coccilib.report.print_report(p[0], msg)
|
D | devm_free.cocci | 61 position p; 65 * kfree@p(x) 67 * kzfree@p(x) 69 * __krealloc@p(x, ...) 71 * krealloc@p(x, ...) 73 * free_pages@p(x, ...) 75 * free_page@p(x) 77 * free_irq@p(x) 79 * iounmap@p(x) 81 * ioport_unmap@p(x) [all …]
|
D | kfreeaddr.cocci | 16 position p; 20 * kfree@p(&e->f) 22 * kzfree@p(&e->f) 26 p << r.p; 29 cocci.print_main("kfree",p) 32 p << r.p; 36 coccilib.report.print_report(p[0],msg)
|
D | kfree.cocci | 33 position p; 38 f(...,c,...,(T)E@p,...) 40 E@p == E2 42 E@p != E2 44 E2 == E@p 46 E2 != E@p 48 !E@p 50 E@p || ... 55 position p; 58 sizeof(<+...E@p...+>) [all …]
|
/scripts/dtc/libfdt/ |
D | fdt_ro.c | 61 const char *p = fdt_offset_ptr(fdt, offset + FDT_TAGSIZE, len+1); in _fdt_nodename_eq() local 63 if (! p) in _fdt_nodename_eq() 67 if (memcmp(p, s, len) != 0) in _fdt_nodename_eq() 70 if (p[len] == '\0') in _fdt_nodename_eq() 72 else if (!memchr(s, '@', len) && (p[len] == '@')) in _fdt_nodename_eq() 86 const char *p = fdt_string(fdt, stroffset); in _fdt_string_eq() local 88 return (strlen(p) == len) && (memcmp(p, s, len) == 0); in _fdt_string_eq() 186 const char *p = path; in fdt_path_offset_namelen() local 193 const char *q = memchr(path, '/', end - p); in fdt_path_offset_namelen() 198 p = fdt_get_alias_namelen(fdt, p, q - p); in fdt_path_offset_namelen() [all …]
|
/scripts/basic/ |
D | fixdep.c | 238 static void parse_config_file(const char *p) in parse_config_file() argument 242 while ((p = strstr(p, "CONFIG_"))) { in parse_config_file() 243 p += 7; in parse_config_file() 244 q = p; in parse_config_file() 251 if (r > p) in parse_config_file() 252 use_config(p, r - p); in parse_config_file() 253 p = q; in parse_config_file() 318 char *p; in parse_dep_file() local 329 p = m; in parse_dep_file() 330 while (p < end && *p != ' ' && *p != '\\' && *p != '\n') in parse_dep_file() [all …]
|
/scripts/coccinelle/locks/ |
D | call_kern.cocci | 21 position p; 34 GFP_KERNEL@p 74 position gfp.p; 77 - GFP_KERNEL@p 81 position gfp.p; 84 * GFP_KERNEL@p 87 p << gfp.p; 95 cocci.print_secs("GFP_KERNEL",p) 98 p << gfp.p; 105 coccilib.report.print_report(p[0], msg)
|