6f98ae38a2
* Provide a single liner description at top using `///` comments. This one liner is displayed when using `--verbose` mode of coccicheck. * Specify Condidence level property adhering to coccinelle.rst section "Proposing new semantic patches". * Add virtual patch rule to handle the patch case when coccicheck is supplied with `--mode=patch` option. * Add `depends on !(file in "ext")` to ignore reports from `ext/` directory. * Simplify rule to use disjunctions and use "exists" to match any available control path. Suggested-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
46 lines
557 B
Plaintext
46 lines
557 B
Plaintext
/// Use unsigned int as the return value for irq_lock()
|
|
///
|
|
// Confidence: High
|
|
// Copyright (c) 2017 Intel Corporation
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
virtual patch
|
|
|
|
@find depends on !(file in "ext")@
|
|
type T;
|
|
identifier i;
|
|
typedef uint32_t,u32_t;
|
|
@@
|
|
|
|
(
|
|
uint32_t i = irq_lock();
|
|
|
|
|
unsigned int i = irq_lock();
|
|
|
|
|
u32_t i = irq_lock();
|
|
|
|
|
- T
|
|
+ unsigned int
|
|
i = irq_lock();
|
|
)
|
|
|
|
@find2 depends on !(file in "ext") exists@
|
|
type T;
|
|
identifier i;
|
|
@@
|
|
|
|
(
|
|
uint32_t i;
|
|
|
|
|
unsigned int i;
|
|
|
|
|
u32_t i;
|
|
|
|
|
- T
|
|
+ unsigned int
|
|
i;
|
|
...
|
|
i = irq_lock();
|
|
)
|