Edward O'Callaghan has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/46814 )
Change subject: internal.c: Co-locate global variables to top of file ......................................................................
internal.c: Co-locate global variables to top of file
This just makes internal.c at bit easier to parse and helps the read get a view of all the singleton state in one go.
BUG=none BRANCH=none TEST=builds
Change-Id: Id4109dfb17f63d80fb3fb3f2a1d0ab54d9eddc6e Signed-off-by: Edward O'Callaghan quasisec@google.com --- M internal.c 1 file changed, 8 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/14/46814/1
diff --git a/internal.c b/internal.c index abd90a8..5d74f92 100644 --- a/internal.c +++ b/internal.c @@ -21,6 +21,14 @@ #include "programmer.h" #include "hwaccess.h"
+int is_laptop = 0; +int laptop_ok = 0; + +int force_boardenable = 0; +int force_boardmismatch = 0; + +enum chipbustype internal_buses_supported = BUS_NONE; + struct pci_dev *pci_dev_find_vendorclass(uint16_t vendor, uint16_t devclass) { struct pci_dev *temp; @@ -79,9 +87,6 @@ return NULL; }
-int force_boardenable = 0; -int force_boardmismatch = 0; - #if IS_X86 void probe_superio(void) { @@ -110,9 +115,6 @@
#endif
-int is_laptop = 0; -int laptop_ok = 0; - static void internal_chip_writeb(const struct flashctx *flash, uint8_t val, chipaddr addr) { @@ -167,8 +169,6 @@ .chip_writen = fallback_chip_writen, };
-enum chipbustype internal_buses_supported = BUS_NONE; - int internal_init(void) { int ret = 0;
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/46814 )
Change subject: internal.c: Co-locate global variables to top of file ......................................................................
Patch Set 1: Code-Review+2
(1 comment)
https://review.coreboot.org/c/flashrom/+/46814/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/flashrom/+/46814/1//COMMIT_MSG@7 PS1, Line 7: Co-locate nit: `Relocate` ?
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/46814 )
Change subject: internal.c: Co-locate global variables to top of file ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/flashrom/+/46814/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/flashrom/+/46814/1//COMMIT_MSG@7 PS1, Line 7: Co-locate
nit: `Relocate` ?
? It's a verb here.
"colocated or co-located; colocating or co-locating; colocates or co-locates Definition of colocate : to locate (two or more things) together or be located together: "
Sam McNally has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/46814 )
Change subject: internal.c: Co-locate global variables to top of file ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/flashrom/+/46814/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/flashrom/+/46814/1//COMMIT_MSG@7 PS1, Line 7: Co-locate
? It's a verb here. […]
Relocate to or co-locate at. Co-locate to doesn't make sense.
Edward O'Callaghan has submitted this change. ( https://review.coreboot.org/c/flashrom/+/46814 )
Change subject: internal.c: Co-locate global variables to top of file ......................................................................
internal.c: Co-locate global variables to top of file
This just makes internal.c at bit easier to parse and helps the read get a view of all the singleton state in one go.
BUG=none BRANCH=none TEST=builds
Change-Id: Id4109dfb17f63d80fb3fb3f2a1d0ab54d9eddc6e Signed-off-by: Edward O'Callaghan quasisec@google.com Reviewed-on: https://review.coreboot.org/c/flashrom/+/46814 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Angel Pons th3fanbus@gmail.com --- M internal.c 1 file changed, 8 insertions(+), 8 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
diff --git a/internal.c b/internal.c index abd90a8..5d74f92 100644 --- a/internal.c +++ b/internal.c @@ -21,6 +21,14 @@ #include "programmer.h" #include "hwaccess.h"
+int is_laptop = 0; +int laptop_ok = 0; + +int force_boardenable = 0; +int force_boardmismatch = 0; + +enum chipbustype internal_buses_supported = BUS_NONE; + struct pci_dev *pci_dev_find_vendorclass(uint16_t vendor, uint16_t devclass) { struct pci_dev *temp; @@ -79,9 +87,6 @@ return NULL; }
-int force_boardenable = 0; -int force_boardmismatch = 0; - #if IS_X86 void probe_superio(void) { @@ -110,9 +115,6 @@
#endif
-int is_laptop = 0; -int laptop_ok = 0; - static void internal_chip_writeb(const struct flashctx *flash, uint8_t val, chipaddr addr) { @@ -167,8 +169,6 @@ .chip_writen = fallback_chip_writen, };
-enum chipbustype internal_buses_supported = BUS_NONE; - int internal_init(void) { int ret = 0;