unsigned_shift.cocci 266 B

123456789101112131415
  1. /// Use BIT() helper macro instead of hardcoding using bitshifting
  2. ///
  3. // Confidence: High
  4. // Copyright (c) 2017 Intel Corporation
  5. //
  6. // SPDX-License-Identifier: Apache-2.0
  7. virtual patch
  8. @depends on patch && !(file in "ext")@
  9. expression A;
  10. @@
  11. - (1 << A)
  12. + BIT(A)