summaryrefslogtreecommitdiffstats
path: root/ich_descriptors.c
diff options
context:
space:
mode:
authorFelix Singer <felixsinger@posteo.net>2022-08-19 03:23:35 +0200
committerAnastasia Klimchuk <aklm@chromium.org>2022-09-08 02:13:17 +0000
commit13e74d26eaf59b22576d21e9623dc30e91c02de0 (patch)
tree110df10c24271302627b39a2b964dbbca4e971ea /ich_descriptors.c
parent77f31f7f5a316479a86b18adc8d4fe882a0f331a (diff)
downloadflashrom-13e74d26eaf59b22576d21e9623dc30e91c02de0.tar.gz
flashrom-13e74d26eaf59b22576d21e9623dc30e91c02de0.tar.bz2
flashrom-13e74d26eaf59b22576d21e9623dc30e91c02de0.zip
ich_descriptors.c: Retype variable `has_forbidden_opcode` with bool
Use the bool type instead of an integer for the variable `has_forbidden_opcode`, since this represents its purpose much better. Signed-off-by: Felix Singer <felixsinger@posteo.net> Change-Id: I6214956e377547b894fc76237832b6f7b2db41dd Reviewed-on: https://review.coreboot.org/c/flashrom/+/66899 Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'ich_descriptors.c')
-rw-r--r--ich_descriptors.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ich_descriptors.c b/ich_descriptors.c
index 1cb75830f..b37ce6d51 100644
--- a/ich_descriptors.c
+++ b/ich_descriptors.c
@@ -31,6 +31,7 @@
#define UPPER_MAP_OFFSET (4096 - 256 - 4)
#define getVTBA(flumap) (((flumap)->FLUMAP1 << 4) & 0x00000ff0)
+#include <stdbool.h>
#include <sys/types.h>
#include <string.h>
#include "flash.h" /* for msg_* */
@@ -398,9 +399,9 @@ void prettyprint_ich_descriptor_component(enum ich_chipset cs, const struct ich_
msg_pdbg2("Dual Output Fast Read Support: %sabled\n",
desc->component.modes.dual_output ? "en" : "dis");
- int has_forbidden_opcode = 0;
+ bool has_forbidden_opcode = false;
if (desc->component.FLILL != 0) {
- has_forbidden_opcode = 1;
+ has_forbidden_opcode = true;
msg_pdbg2("Invalid instruction 0: 0x%02x\n",
desc->component.invalid_instr0);
msg_pdbg2("Invalid instruction 1: 0x%02x\n",
@@ -412,7 +413,7 @@ void prettyprint_ich_descriptor_component(enum ich_chipset cs, const struct ich_
}
if (has_flill1) {
if (desc->component.FLILL1 != 0) {
- has_forbidden_opcode = 1;
+ has_forbidden_opcode = true;
msg_pdbg2("Invalid instruction 4: 0x%02x\n",
desc->component.invalid_instr4);
msg_pdbg2("Invalid instruction 5: 0x%02x\n",