Attention is currently required from: Nico Huber, Light.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/62747 )
Change subject: flashrom.c, sfdp.c: Initialize dynamically allocated memory using calloc
......................................................................
Patch Set 6: Code-Review+1
(3 comments)
Commit Message:
https://review.coreboot.org/c/flashrom/+/62747/comment/4293d8b2_394897f7
PS6, Line 16: zeroes
This word "zeroes" can go to the previous line, no need to line break after "initialize them to".
https://review.coreboot.org/c/flashrom/+/62747/comment/606e26d1_0b5c45ca
PS6, Line 16: or if allocating using malloc separately initialize them using a loop.
Sorry I have just noticed: this specific case (separately initialize them using a loop) is not used in the patch. This patch only calls calloc.
I can just remove the second part, "or if allocating using malloc ...".
Patchset:
PS6:
Apart from my two last comments, I think this is all good. And it fixes scan-build issues, which is very good!
But I wanted to check with Angel: this is on a similar topic like your patch CB:55269 , although your patch covers way more than this one. Do you approve this one?
--
To view, visit https://review.coreboot.org/c/flashrom/+/62747
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I6b9269129968fb3b55b0d2a2e384c8a1aeba43ab
Gerrit-Change-Number: 62747
Gerrit-PatchSet: 6
Gerrit-Owner: Light <aarya.chaumal(a)gmail.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Nico Huber <nico.h(a)gmx.de>
Gerrit-Attention: Light <aarya.chaumal(a)gmail.com>
Gerrit-Comment-Date: Wed, 23 Mar 2022 07:42:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Edward O'Callaghan, Anastasia Klimchuk.
Tom Hughes has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/63001 )
Change subject: programmer: Use C linkage when compiling with C++
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
Upstream version of https://crrev.com/c/3146316
--
To view, visit https://review.coreboot.org/c/flashrom/+/63001
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I7e12ead58dee07313d756f1afcc687ba12b6392b
Gerrit-Change-Number: 63001
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Hughes <tomhughes(a)chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Comment-Date: Tue, 22 Mar 2022 16:50:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Edward O'Callaghan, Anastasia Klimchuk.
Tom Hughes has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/63000 )
Change subject: layout: space needed between literal and identifier
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
Upstream version of https://crrev.com/c/3146315
--
To view, visit https://review.coreboot.org/c/flashrom/+/63000
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I04f5572d6c2dc27b7c54ee6ee97874a7a1940229
Gerrit-Change-Number: 63000
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Hughes <tomhughes(a)chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Comment-Date: Tue, 22 Mar 2022 16:49:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Edward O'Callaghan, Anastasia Klimchuk.
Tom Hughes has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/62999 )
Change subject: flash: move nested struct to top level
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
Upstream version of https://crrev.com/c/3146314
--
To view, visit https://review.coreboot.org/c/flashrom/+/62999
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I89988e4a6a7ca65866ba019320e480e491389d56
Gerrit-Change-Number: 62999
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Hughes <tomhughes(a)chromium.org>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Comment-Date: Tue, 22 Mar 2022 16:49:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Tom Hughes has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/63000 )
Change subject: layout: space needed between literal and identifier
......................................................................
layout: space needed between literal and identifier
Fixes C++ compiler warning:
error: invalid suffix on literal; C++11 requires a space between literal
and identifier [-Wreserved-user-defined-literal]
BUG=b:144959033
TEST=emerge-hatch flashrom
Change-Id: I04f5572d6c2dc27b7c54ee6ee97874a7a1940229
Signed-off-by: Tom Hughes <tomhughes(a)chromium.org>
---
M layout.h
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/00/63000/1
diff --git a/layout.h b/layout.h
index abbdc22..afac07f 100644
--- a/layout.h
+++ b/layout.h
@@ -30,7 +30,7 @@
typedef uint32_t chipsize_t; /* Able to store the number of bytes of any supported flash memory. */
#define FL_MAX_CHIPOFF_BITS (24)
#define FL_MAX_CHIPOFF ((chipoff_t)(1ULL<<FL_MAX_CHIPOFF_BITS)-1)
-#define PRIxCHIPOFF "06"PRIx32
+#define PRIxCHIPOFF "06" PRIx32
#define PRIuCHIPSIZE PRIu32
#define MAX_ROMLAYOUT 128
--
To view, visit https://review.coreboot.org/c/flashrom/+/63000
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I04f5572d6c2dc27b7c54ee6ee97874a7a1940229
Gerrit-Change-Number: 63000
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Hughes <tomhughes(a)chromium.org>
Gerrit-MessageType: newchange
Tom Hughes has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/62999 )
Change subject: flash: move nested struct to top level
......................................................................
flash: move nested struct to top level
The nested "struct tested" struct is "struct flashchip::tested" in C++.
Move "struct tested" to the top level namespace to avoid this
difference when using the "TEST_" macros that cast to "struct tested".
BUG=b:144959033
TEST=emerge-hatch flashrom
Change-Id: I89988e4a6a7ca65866ba019320e480e491389d56
Signed-off-by: Tom Hughes <tomhughes(a)chromium.org>
---
M flash.h
1 file changed, 9 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/99/62999/1
diff --git a/flash.h b/flash.h
index f63aa5d..738bb73 100644
--- a/flash.h
+++ b/flash.h
@@ -154,6 +154,14 @@
NA, /* Not applicable (e.g. write support on ROM chips) */
};
+/* Indicate how well flashrom supports different operations of this flash chip. */
+struct tested {
+ enum test_state probe;
+ enum test_state read;
+ enum test_state erase;
+ enum test_state write;
+};
+
#define TEST_UNTESTED (struct tested){ .probe = NT, .read = NT, .erase = NT, .write = NT }
#define TEST_OK_PROBE (struct tested){ .probe = OK, .read = NT, .erase = NT, .write = NT }
@@ -218,12 +226,7 @@
int feature_bits;
/* Indicate how well flashrom supports different operations of this flash chip. */
- struct tested {
- enum test_state probe;
- enum test_state read;
- enum test_state erase;
- enum test_state write;
- } tested;
+ struct tested tested;
/*
* Group chips that have common command sets. This should ensure that
--
To view, visit https://review.coreboot.org/c/flashrom/+/62999
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I89988e4a6a7ca65866ba019320e480e491389d56
Gerrit-Change-Number: 62999
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Hughes <tomhughes(a)chromium.org>
Gerrit-MessageType: newchange