/// Unsigned expressions cannot be lesser than zero. Presence of /// comparisons 'unsigned (<|<=|>|>=) 0' often indicates a bug, /// usually wrong type of variable. /// /// To reduce number of false positives following tests have been added: /// - parts of range checks are skipped, eg. "if (u < 0 || u > 15) ...", /// developers prefer to keep such code, /// - comparisons "<= 0" and "> 0" are performed only on results of /// signed functions/macros, /// - hardcoded list of signed functions/macros with always non-negative /// result is used to avoid false positives difficult to detect by other ways /// // Confidence: Average // Copyright: (C) 2015 Andrzej Hajda, Samsung Electronics Co., Ltd. GPLv2. // URL: http://coccinelle.lip6.fr/ // Options: --all-includes virtual context virtual org virtual report @r_cmp@ position p; typedef bool, u8, u16, u32, u64; {unsigned char, unsigned short, unsigned int, unsigned long, unsigned long long, size_t, bool, u8, u16, u32, u64} v; expression e; @@ \( v = e \| &v \) ... (\( v@p < 0 \| v@p <= 0 \| v@p >= 0 \| v@p > 0 \)) @r@ position r_cmp.p; typedef s8, s16, s32, s64; {char, short, int, long, long long, ssize_t, s8, s16, s32, s64} vs; expression c, e, v; identifier f !~ "^(ata_id_queue_depth|btrfs_copy_from_user|dma_map_sg|dma_map_sg_attrs|fls|fls64|gameport_time|get_write_extents|nla_len|ntoh24|of_flat_dt_match|of_get_child_count|uart_circ_chars_pending|[A-Z0-9_]+)$"; @@ ( v = f(...)@vs; ... when != v = e; * (\( v@p <=@e 0 \| v@p >@e 0 \)) ... when any | ( (\( v@p < 0 \| v@p <= 0 \)) || ... || (\( v >= c \| v > c \)) | (\( v >= c \| v > c \)) || ... || (\( v@p < 0 \| v@p <= 0 \)) | (\( v@p >= 0 \| v@p > 0 \)) && ... && (\( v < c \| v <= c \)) | ((\( v < c \| v <= c \) && ... && \( v@p >= 0 \| v@p > 0 \))) | * (\( v@p <@e 0 \| v@p >=@e 0 \)) ) ) @script:python depends on org@ p << r_cmp.p; e << r.e; @@ msg = "WARNING: Unsigned expression compared with zero: %s" % (e) coccilib.org.print_todo(p[0], msg) @script:python depends on report@ p << r_cmp.p; e << r.e; @@ msg = "WARNING: Unsigned expression compared with zero: %s" % (e) coccilib.report.print_report(p[0], msg) git/diff/include/trace/events/ipi.h?h=nds-private-remove&id=883af14e67e8b8702b5560aa64c888c0cd0bd66c'>diff
path: root/include/trace/events/ipi.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-01-24 16:54:39 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-01-24 16:54:39 -0800
commit883af14e67e8b8702b5560aa64c888c0cd0bd66c (patch)
tree74e3a6b53f5fad9f7848ab1b9f6921b7012940a4 /include/trace/events/ipi.h
parent0263d4ebd94b36280608e296cba39b924b6e832b (diff)
parentaab45453ff5c77200c6da4ac909f7a4392aed17e (diff)
Merge branch 'akpm' (patches from Andrew)
Merge fixes from Andrew Morton: "26 fixes" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (26 commits) MAINTAINERS: add Dan Streetman to zbud maintainers MAINTAINERS: add Dan Streetman to zswap maintainers mm: do not export ioremap_page_range symbol for external module mn10300: fix build error of missing fpu_save() romfs: use different way to generate fsid for BLOCK or MTD frv: add missing atomic64 operations mm, page_alloc: fix premature OOM when racing with cpuset mems update mm, page_alloc: move cpuset seqcount checking to slowpath mm, page_alloc: fix fast-path race with cpuset update or removal mm, page_alloc: fix check for NULL preferred_zone kernel/panic.c: add missing \n fbdev: color map copying bounds checking frv: add atomic64_add_unless() mm/mempolicy.c: do not put mempolicy before using its nodemask radix-tree: fix private list warnings Documentation/filesystems/proc.txt: add VmPin mm, memcg: do not retry precharge charges proc: add a schedule point in proc_pid_readdir() mm: alloc_contig: re-allow CMA to compact FS pages mm/slub.c: trace free objects at KERN_INFO ...
Diffstat (limited to 'include/trace/events/ipi.h')