[flashrom] [PATCH] Fix sfdp_add_uniform_eraser
Stefan Tauner
stefan.tauner at student.tuwien.ac.at
Sun Feb 19 01:14:24 CET 2012
Signed-off-by: Stefan Tauner <stefan.tauner at student.tuwien.ac.at>
---
Please grant me a coding style exception regarding using pointers as
logical values because i obviously can not grasp them :P
sfdp.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/sfdp.c b/sfdp.c
index 75dfb5f..cd01faa 100644
--- a/sfdp.c
+++ b/sfdp.c
@@ -79,7 +79,7 @@ static int sfdp_add_uniform_eraser(struct flashctx *flash, uint8_t opcode, uint3
erasefunc_t *erasefn = spi_get_erasefn_from_opcode(opcode);
if (erasefn == NULL || block_size == 0 || total_size % block_size != 0) {
- msg_cdbg("%s: invalid input\n", __func__);
+ msg_cdbg("%s: invalid input.\n", __func__);
return 1;
}
@@ -89,11 +89,12 @@ static int sfdp_add_uniform_eraser(struct flashctx *flash, uint8_t opcode, uint3
if (eraser->eraseblocks[0].size == block_size &&
eraser->block_erase == erasefn) {
msg_cdbg2(" Tried to add a duplicate block eraser: "
- "%d x %d B with opcode 0x%02x\n",
+ "%d x %d B with opcode 0x%02x.\n",
total_size/block_size, block_size, opcode);
return 1;
}
- if (eraser->eraseblocks[0].size != 0 || !eraser->block_erase) {
+ if (eraser->eraseblocks[0].size != 0 ||
+ eraser->block_erase != NULL) {
msg_cspew(" Block Eraser %d is already occupied.\n",
i);
continue;
--
1.7.1
More information about the flashrom
mailing list