David Hendricks has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/42555 )
Change subject: [WIP] Add uncrustify on/off markers where appropriate ......................................................................
[WIP] Add uncrustify on/off markers where appropriate
Change-Id: I146a32e921d1c828a7d05ebb88373abe22e89053 Signed-off-by: David Hendricks david.hendricks@gmail.com --- M board_enable.c M chipset_enable.c M print.c 3 files changed, 8 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/55/42555/1
diff --git a/board_enable.c b/board_enable.c index 9cf0103..e95fcff 100644 --- a/board_enable.c +++ b/board_enable.c @@ -2349,6 +2349,7 @@ */
/* Please keep this list alphabetically ordered by vendor/board name. */ +/* *INDENT-OFF* */ const struct board_match board_matches[] = {
/* first pci-id set [4], second pci-id set [4], dmi identifier, coreboot id [2], phase, vendor name, board name max_rom_... OK? flash enable */ @@ -2530,6 +2531,7 @@ #endif { 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, P3, NULL, NULL, 0, NT, NULL}, /* end marker */ }; +/* *INDENT-ON* */
int selfcheck_board_enables(void) { diff --git a/chipset_enable.c b/chipset_enable.c index 632679c..49f4f2e 100644 --- a/chipset_enable.c +++ b/chipset_enable.c @@ -1690,6 +1690,7 @@ #define B_S (BUS_SPI)
/* Please keep this list numerically sorted by vendor/device ID. */ +/* *INDENT-OFF* */ const struct penable chipset_enables[] = { #if defined(__i386__) || defined(__x86_64__) {0x1002, 0x4377, B_PFL, OK, "ATI", "SB400", enable_flash_sb400}, @@ -2066,6 +2067,7 @@ #endif {0}, }; +/* *INDENT-ON* */
int chipset_flash_enable(void) { diff --git a/print.c b/print.c index feca45e..06561ec 100644 --- a/print.c +++ b/print.c @@ -515,6 +515,7 @@ #endif
/* Please keep this list alphabetically ordered by vendor/board. */ +/* *INDENT-OFF* */ const struct board_info boards_known[] = { #if defined(__i386__) || defined(__x86_64__) B("A-Trend", "ATC-6220", OK, "http://www.motherboard.cz/mb/atrend/atc6220.htm", NULL), @@ -1142,8 +1143,10 @@
{0}, }; +/* *INDENT-ON* */
/* Please keep this list alphabetically ordered by vendor/board. */ +/* *INDENT-OFF* */ const struct board_info laptops_known[] = { #if defined(__i386__) || defined(__x86_64__) B("Acer", "Aspire 1520", OK, "http://support.acer.com/us/en/acerpanam/notebook/0000/Acer/Aspire1520/Aspire...", NULL), @@ -1176,4 +1179,5 @@
{0}, }; +/* *INDENT-ON* */ #endif
David Hendricks has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/42555 )
Change subject: [WIP] Add uncrustify on/off markers where appropriate ......................................................................
Patch Set 1: Code-Review-2
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/42555
to look at the new patch set (#2).
Change subject: [WIP] Add uncrustify on/off markers where appropriate ......................................................................
[WIP] Add uncrustify on/off markers where appropriate
Change-Id: I146a32e921d1c828a7d05ebb88373abe22e89053 Signed-off-by: David Hendricks david.hendricks@gmail.com --- M board_enable.c M chipset_enable.c M print.c M print_wiki.c 4 files changed, 12 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/55/42555/2
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/42555
to look at the new patch set (#3).
Change subject: [RFC] tree: Prepare for reformatting ......................................................................
[RFC] tree: Prepare for reformatting
This makes minor changes in preparation for automated reformatting: - Add INDENT-OFF and INDENT-ON markers for tables
- board_enable.c: Use `#if 0` to comment out code blocks so that the multi-line commenting rules are not applied.
- dediprog.c: Remove unneeded comments that exceed column limit, and use `#if 0` to comment out code blocks.
- flash.h: Move some trailing comments above their respective code so that indenting can be applied without breaking them up. Usually that wouldn't be a problem, but most of these comments are over the the limit by only one or two words, so the dangling continued comment looks ugly.
- flashchips.c: Modify some trailing comments so they don't get broken awkwardly to conform to column limit.
- ich_descriptors.c: Move open brace for freq_str string arrays to set alignment leftward.
- ich_descriptors.h: Name all bitfields so spacing and alignment rules are consistently applied.
- nicintel.c: Remove broken URL that doesn't format well.
- nicintel_spi.c: Remove a couple broken URLs, and use `#if 0` to comment out some #defines
- realtek_mst_i2c_spi.c: Removed superfluous comment markers
- serial.c: Use BAUDENTRY macro for terminator.
- spi25_statusreg.c: Add parens around non-trivial case labels
Change-Id: I146a32e921d1c828a7d05ebb88373abe22e89053 Signed-off-by: David Hendricks david.hendricks@gmail.com --- M board_enable.c M chipset_enable.c M dediprog.c M flash.h M flashchips.c M ich_descriptors.c M ich_descriptors.h M nicintel.c M nicintel_spi.c M print.c M print_wiki.c M realtek_mst_i2c_spi.c M sb600spi.c M serial.c M spi25_statusreg.c 15 files changed, 3,807 insertions(+), 3,694 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/55/42555/3
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/42555 )
Change subject: [RFC] tree: Prepare for reformatting ......................................................................
Patch Set 3:
(2 comments)
I agree with some of the changes, e.g. dropping dead URLs and some other cleanups. But as it currently is, this commit would need to be split.
https://review.coreboot.org/c/flashrom/+/42555/3//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/flashrom/+/42555/3//COMMIT_MSG@24 PS3, Line 24: flashchips This one file is so huge it deserves its own commit.
https://review.coreboot.org/c/flashrom/+/42555/3/nicintel_spi.c File nicintel_spi.c:
https://review.coreboot.org/c/flashrom/+/42555/3/nicintel_spi.c@71 PS3, Line 71: #if 0 Do the definitions conflict with anything? If not, maybe just uncomment them?
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/42555 )
Change subject: [RFC] tree: Prepare for reformatting ......................................................................
Patch Set 3: Code-Review+1
Let's put some more lettuce (green +1) next to the big tomato (red -2) 😄
Hello build bot (Jenkins), Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/42555
to look at the new patch set (#4).
Change subject: [RFC] tree: Prepare for reformatting ......................................................................
[RFC] tree: Prepare for reformatting
This makes minor changes in preparation for automated reformatting: - Add INDENT-OFF and INDENT-ON markers for tables
- Regroup #includes for auto-sorting: platform.h comes first, followed by global includes, followed by local includes.
- board_enable.c: Use `#if 0` to comment out code blocks so that the multi-line commenting rules are not applied.
- dediprog.c: Remove unneeded comments that exceed column limit, and use `#if 0` to comment out code blocks.
- flash.h: Move some trailing comments above their respective code so that indenting can be applied without breaking them up. Usually that wouldn't be a problem, but most of these comments are over the the limit by only one or two words, so the dangling continued comment looks ugly.
- flashchips.c: Modify some trailing comments so they don't get broken awkwardly to conform to column limit.
- ich_descriptors.c: Move open brace for freq_str string arrays to set alignment leftward.
- ich_descriptors.h: Name all bitfields so spacing and alignment rules are consistently applied.
- nicintel.c: Remove broken URL that doesn't format well.
- nicintel_spi.c: Remove a couple broken URLs, and use `#if 0` to comment out some #defines
- realtek_mst_i2c_spi.c: Removed superfluous comment markers
- serial.c: Use BAUDENTRY macro for terminator.
- spi25_statusreg.c: Add parens around non-trivial case labels
Change-Id: I146a32e921d1c828a7d05ebb88373abe22e89053 Signed-off-by: David Hendricks david.hendricks@gmail.com --- M at45db.c M atahpt.c M atapromise.c M atavia.c M bitbang_spi.c M board_enable.c M buspirate_spi.c M cbtable.c M ch341a_spi.c M chipset_enable.c M cli_classic.c M cli_common.c M cli_output.c M dediprog.c M developerbox_spi.c M digilent_spi.c M drkaiser.c M dummyflasher.c M edi.c M flash.h M flashchips.c M flashrom.c M fmap.c M ft2232_spi.c M gfxnvidia.c M helpers.c M hwaccess.c M i2c_helper_linux.c M ich_descriptors.c M ich_descriptors.h M ichspi.c M internal.c M it8212.c M it85spi.c M it87spi.c M layout.c M linux_spi.c M mcp6x_spi.c M mstarddc_spi.c M nic3com.c M nicintel.c M nicintel_eeprom.c M nicintel_spi.c M nicnatsemi.c M nicrealtek.c M ogp_spi.c M opaque.c M pcidev.c M physmap.c M print.c M print_wiki.c M raiden_debug_spi.c M rayer_spi.c M realtek_mst_i2c_spi.c M satamv.c M sb600spi.c M serial.c M serprog.c M sfdp.c M spi.c M spi25.c M spi25_statusreg.c M spi95.c M udelay.c M usb_device.c M usbblaster_spi.c M usbdev.c M w29ee011.c 68 files changed, 3,877 insertions(+), 3,704 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/55/42555/4
Hello build bot (Jenkins), Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/42555
to look at the new patch set (#5).
Change subject: [RFC] tree: Prepare for reformatting ......................................................................
[RFC] tree: Prepare for reformatting
This makes minor changes in preparation for automated reformatting: - Add INDENT-OFF and INDENT-ON markers for tables
- Regroup #includes for auto-sorting: platform.h comes first, followed by global includes, followed by local includes.
- board_enable.c: Use `#if 0` to comment out code blocks so that the multi-line commenting rules are not applied.
- dediprog.c: Remove unneeded comments that exceed column limit, and use `#if 0` to comment out code blocks.
- flash.h: Move some trailing comments above their respective code so that indenting can be applied without breaking them up. Usually that wouldn't be a problem, but most of these comments are over the the limit by only one or two words, so the dangling continued comment looks ugly.
- flashchips.c: Modify some trailing comments so they don't get broken awkwardly to conform to column limit. Also, reflow the S25FL127S-64kB comment so it's less confusing to both humans and reformatting tools.
- flashchips.h: Similar to flashchips.c w.r.t. trailing comments. Some Macronix entries were especially problematic due to overused device IDs for chips with different erase capabilities.
- ich_descriptors.c: Move open brace for freq_str string arrays to set alignment leftward.
- ich_descriptors.h: Name all bitfields so spacing and alignment rules are consistently applied.
- nicintel.c: Remove broken URL that doesn't format well.
- nicintel_spi.c: Remove a couple broken URLs, and use `#if 0` to comment out some #defines
- realtek_mst_i2c_spi.c: Removed superfluous comment markers
- serial.c: Use BAUDENTRY macro for terminator.
- spi25_statusreg.c: Add parens around non-trivial case labels
Change-Id: I146a32e921d1c828a7d05ebb88373abe22e89053 Signed-off-by: David Hendricks david.hendricks@gmail.com --- M at45db.c M atahpt.c M atapromise.c M atavia.c M bitbang_spi.c M board_enable.c M buspirate_spi.c M cbtable.c M ch341a_spi.c M chipset_enable.c M cli_classic.c M cli_common.c M cli_output.c M dediprog.c M developerbox_spi.c M digilent_spi.c M drkaiser.c M dummyflasher.c M edi.c M flash.h M flashchips.c M flashchips.h M flashrom.c M fmap.c M ft2232_spi.c M gfxnvidia.c M helpers.c M hwaccess.c M i2c_helper_linux.c M ich_descriptors.c M ich_descriptors.h M ichspi.c M internal.c M it8212.c M it85spi.c M it87spi.c M layout.c M linux_spi.c M mcp6x_spi.c M mstarddc_spi.c M nic3com.c M nicintel.c M nicintel_eeprom.c M nicintel_spi.c M nicnatsemi.c M nicrealtek.c M ogp_spi.c M opaque.c M pcidev.c M physmap.c M print.c M print_wiki.c M raiden_debug_spi.c M rayer_spi.c M realtek_mst_i2c_spi.c M satamv.c M sb600spi.c M serial.c M serprog.c M sfdp.c M spi.c M spi25.c M spi25_statusreg.c M spi95.c M udelay.c M usb_device.c M usbblaster_spi.c M usbdev.c M w29ee011.c 69 files changed, 326 insertions(+), 220 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/55/42555/5
Hello build bot (Jenkins), Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/42555
to look at the new patch set (#6).
Change subject: [RFC] tree: Prepare for reformatting ......................................................................
[RFC] tree: Prepare for reformatting
This makes minor changes in preparation for automated reformatting: - Add INDENT-OFF and INDENT-ON markers for tables
- Regroup #includes for auto-sorting: platform.h comes first, followed by global includes, followed by local includes.
- board_enable.c: Use `#if 0` to comment out code blocks so that the multi-line commenting rules are not applied.
- dediprog.c: Remove unneeded comments that exceed column limit, and use `#if 0` to comment out code blocks.
- flash.h: Move some trailing comments above their respective code so that indenting can be applied without breaking them up. Usually that wouldn't be a problem, but most of these comments are over the the limit by only one or two words, so the dangling continued comment looks ugly.
- flashchips.c: Modify some trailing comments so they don't get broken awkwardly to conform to column limit. Also, reflow the S25FL127S-64kB comment so it's less confusing to both humans and reformatting tools.
- flashchips.h: Similar to flashchips.c w.r.t. trailing comments. Some Macronix entries were especially problematic due to overused device IDs for chips with different erase capabilities.
- ich_descriptors.c: Move open brace for freq_str string arrays to set alignment leftward.
- ich_descriptors.h: Name all bitfields so spacing and alignment rules are consistently applied.
- nicintel.c: Remove broken URL that doesn't format well.
- nicintel_spi.c: Remove a couple broken URLs, and uncomment some #defines that are unused and benign.
- realtek_mst_i2c_spi.c: Removed superfluous comment markers
- serial.c: Use BAUDENTRY macro for terminator.
- spi25_statusreg.c: Add parens around non-trivial case labels
Change-Id: I146a32e921d1c828a7d05ebb88373abe22e89053 Signed-off-by: David Hendricks david.hendricks@gmail.com --- M at45db.c M atahpt.c M atapromise.c M atavia.c M bitbang_spi.c M board_enable.c M buspirate_spi.c M cbtable.c M ch341a_spi.c M chipset_enable.c M cli_classic.c M cli_common.c M cli_output.c M dediprog.c M developerbox_spi.c M digilent_spi.c M drkaiser.c M dummyflasher.c M edi.c M flash.h M flashchips.c M flashchips.h M flashrom.c M fmap.c M ft2232_spi.c M gfxnvidia.c M helpers.c M hwaccess.c M i2c_helper_linux.c M ich_descriptors.c M ich_descriptors.h M ichspi.c M internal.c M it8212.c M it85spi.c M it87spi.c M layout.c M linux_spi.c M mcp6x_spi.c M mstarddc_spi.c M nic3com.c M nicintel.c M nicintel_eeprom.c M nicintel_spi.c M nicnatsemi.c M nicrealtek.c M ogp_spi.c M opaque.c M pcidev.c M physmap.c M print.c M print_wiki.c M raiden_debug_spi.c M rayer_spi.c M realtek_mst_i2c_spi.c M satamv.c M sb600spi.c M serial.c M serprog.c M sfdp.c M spi.c M spi25.c M spi25_statusreg.c M spi95.c M udelay.c M usb_device.c M usbblaster_spi.c M usbdev.c M w29ee011.c 69 files changed, 324 insertions(+), 221 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/55/42555/6
David Hendricks has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/42555 )
Change subject: [RFC] tree: Prepare for reformatting ......................................................................
Patch Set 6: -Code-Review
(2 comments)
https://review.coreboot.org/c/flashrom/+/42555/3//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/flashrom/+/42555/3//COMMIT_MSG@24 PS3, Line 24: flashchips
This one file is so huge it deserves its own commit.
Oops - I accidentally pushed the actual uncrustify changes in PS3. PS5 and newer show the preparation only where I modified some comments.
CB:42556 PS5 has the actual uncrustified flashchips.c. As you mention it's a huge diff on its own (around 3,500 lines), and in fact Gerrit has performance issues when handling and prompted Patrick to file a bug: https://bugs.chromium.org/p/gerrit/issues/detail?id=12993
I split those changes out of this patch, so marking as "resolved" for now. Should I split it out of CB:42556 as well?
https://review.coreboot.org/c/flashrom/+/42555/3/nicintel_spi.c File nicintel_spi.c:
https://review.coreboot.org/c/flashrom/+/42555/3/nicintel_spi.c@71 PS3, Line 71: #if 0
Do the definitions conflict with anything? If not, maybe just uncomment them?
Uncommenting them doesn't appear to cause any problems, so let's go with that approach. And while we're at it I removed the "Currently unused" comment since we usually don't bother to mention that when translating data sheets into code.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/42555 )
Change subject: [RFC] tree: Prepare for reformatting ......................................................................
Patch Set 6: Code-Review+2