/// Bool initializations should use true and false. Bool tests don't need /// comparisons. Based on contributions from Joe Perches, Rusty Russell /// and Bruce W Allan. /// // Confidence: High // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2. // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2. // URL: http://coccinelle.lip6.fr/ // Options: --include-headers virtual patch virtual context virtual org virtual report @depends on patch@ bool t; symbol true; symbol false; @@ ( - t == true + t | - true == t + t | - t != true + !t | - true != t + !t | - t == false + !t | - false == t + !t | - t != false + t | - false != t + t ) @depends on patch disable is_zero, isnt_zero@ bool t; @@ ( - t == 1 + t | - t != 1 + !t | - t == 0 + !t | - t != 0 + t ) @depends on patch@ bool b; @@ ( b = - 0 + false | b = - 1 + true ) // --------------------------------------------------------------------- @r1 depends on !patch@ bool t; position p; @@ ( * t@p == true | * true == t@p | * t@p != true | * true != t@p | * t@p == false | * false == t@p | * t@p != false | * false != t@p ) @r2 depends on !patch disable is_zero, isnt_zero@ bool t; position p; @@ ( * t@p == 1 | * t@p != 1 | * t@p == 0 | * t@p != 0 ) @r3 depends on !patch@ bool b; position p1,p2; constant c; @@ ( *b@p1 = 0 | *b@p1 = 1 | *b@p2 = c ) @script:python depends on org@ p << r1.p; @@ cocci.print_main("WARNING: Comparison to bool",p) @script:python depends on org@ p << r2.p; @@ cocci.print_main("WARNING: Comparison of bool to 0/1",p) @script:python depends on org@ p1 << r3.p1; @@ cocci.print_main("WARNING: Assignment of bool to 0/1",p1) @script:python depends on org@ p2 << r3.p2; @@ cocci.print_main("ERROR: Assignment of bool to non-0/1 constant",p2) @script:python depends on report@ p << r1.p; @@ coccilib.report.print_report(p[0],"WARNING: Comparison to bool") @script:python depends on report@ p << r2.p; @@ coccilib.report.print_report(p[0],"WARNING: Comparison of bool to 0/1") @script:python depends on report@ p1 << r3.p1; @@ coccilib.report.print_report(p1[0],"WARNING: Assignment of bool to 0/1") @script:python depends on report@ p2 << r3.p2; @@ coccilib.report.print_report(p2[0],"ERROR: Assignment of bool to non-0/1 constant") net-next.git/diff/include/dt-bindings/pinctrl/pinctrl-tegra.h?h=nds-private-remove&id=4be9993493bc7ee3fdf950a83bc050a3e6cf2a45'>diff
path: root/include/dt-bindings/pinctrl/pinctrl-tegra.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-01-30 15:26:44 -0500
committerDavid S. Miller <davem@davemloft.net>2017-01-30 15:26:44 -0500
commit4be9993493bc7ee3fdf950a83bc050a3e6cf2a45 (patch)
treec619c15ad9a1231a1b9c2dbfeb997bd3d47dce18 /include/dt-bindings/pinctrl/pinctrl-tegra.h
parent30357d7d8aaf2a980ab17c2ce054b2b87e60af88 (diff)
parent1f8176f7352abfe1a424ac7eb845b4c2e7c31e5f (diff)
Merge branch 'mlx4-misc-improvements'
Tariq Toukan says: ==================== mlx4 misc improvements This patchset contains several improvements and cleanups from the team to the mlx4 Eth and core drivers. Series generated against net-next commit: 4e8f2fc1a55d Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Thanks, Tariq. v3: * Patch 6/9: forgot to actually update the commit message in v2, now it is. v2: * Patch 1/9: used EOPNOTSUPP and not ENOTSUPP. * Patch 3/9: dropped, to be submitted separately in the future. * Patch 6/9: updated commit message. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/dt-bindings/pinctrl/pinctrl-tegra.h')