zephyr/scripts/coccinelle/irq_lock.cocci
Kumar Gala a1b77fd589 zephyr: replace zephyr integer types with C99 types
git grep -l 'u\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/u\(8\|16\|32\|64\)_t/uint\1_t/g"
	git grep -l 's\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/s\(8\|16\|32\|64\)_t/int\1_t/g"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-08 08:23:57 -05:00

46 lines
566 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,uint32_t;
@@
(
uint32_t i = irq_lock();
|
unsigned int i = irq_lock();
|
uint32_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;
|
uint32_t i;
|
- T
+ unsigned int
i;
...
i = irq_lock();
)