zephyr/scripts/coccinelle/unsigned_shift.cocci
Flavio Ceolin 8aec087268 kernel: Fix bitwise operators with unsigned operators
Bitwise operators should be used only with unsigned integer operands
because the result os bitwise operations on signed integers are
implementation-defined.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-08-16 19:47:41 -07:00

10 lines
119 B
Plaintext

// Copyright (c) 2017 Intel Corporation
//
// SPDX-License-Identifier: Apache-2.0
@@
constant A;
@@
- 1 << A
+ BIT(A)