path: root/flash.h
diff options
authorStefan Tauner <>2014-05-26 22:05:31 +0000
committerStefan Tauner <>2014-05-26 22:05:31 +0000
commit96658be4073aaa55101b17e95c7b704a2cc7c83a (patch)
tree4240d774ca35015fb68fb32a2f2c2b0a2ca4b1ec /flash.h
parent6455dff07b06e3b870f75e88652e0501810bd104 (diff)
Fix selfcheck of various arrays
Stefan Reinauer has reported ridiculous NULL checks for arrays in our self_check function found by Coverity (CID1130005). This patch removes the useless checks but keeps and fixes the one responsible for the flashchips array by exporting the array size in a new constant. Corresponding to flashrom svn r1799. Signed-off-by: Stefan Tauner <> Acked-by: Carl-Daniel Hailfinger <>
Diffstat (limited to 'flash.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/flash.h b/flash.h
index d0b4fd9..cf496b6 100644
--- a/flash.h
+++ b/flash.h
@@ -225,6 +225,7 @@ struct flashctx {
#define TIMING_ZERO -2
extern const struct flashchip flashchips[];
+extern const unsigned int flashchips_size;
void chip_writeb(const struct flashctx *flash, uint8_t val, chipaddr addr);
void chip_writew(const struct flashctx *flash, uint16_t val, chipaddr addr);
OpenPOWER on IntegriCloud