Commit Graph

3 Commits

Author SHA1 Message Date
Patrik Flykt 2fb87b9dd2 scripts/coccinelle: Update unsigned suffix script
Update unsigned suffix script to properly match multiplication.
Fix provided by Himanshu Jha.

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2019-03-28 17:15:58 -05:00
Patrik Flykt caebf204c6 scripts/coccinelle: Update Coccinelle script for unsigned values
Update the script to detect and update more instances of unsigned
variable assignments when using all four simple rules of arithmetics.

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2019-03-28 17:15:58 -05:00
Patrik Flykt 1b48cb6dc1 scripts/coccinelle: Add Coccinelle script for unsigned values
Add a Coccinelle script that adds an 'U' to values assigned to
unsigned variables, according ot MISRA-C rule 7.2.

Add a 'report' mode to the script that can be used by developer/CI
and a 'patch' mode that should do the heavy lifting.

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2018-12-04 22:51:56 -05:00