Felix Singer has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/49205 )
Change subject: device/pci_device.c: Use same indents for switch/case ......................................................................
device/pci_device.c: Use same indents for switch/case
Change-Id: I5c6abf5b918bac3df8d7617824392f2ec932cb32 Signed-off-by: Felix Singer felixsinger@posteo.net --- M src/device/pci_device.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/49205/1
diff --git a/src/device/pci_device.c b/src/device/pci_device.c index a7eb91d..f41689e 100644 --- a/src/device/pci_device.c +++ b/src/device/pci_device.c @@ -967,7 +967,7 @@ dev->ops = &default_cardbus_ops_bus; break; #endif -default: + default: bad: if (dev->enabled) { printk(BIOS_ERR, "%s [%04x/%04x/%06x] has unknown "
Felix Singer has uploaded a new patch set (#2). ( https://review.coreboot.org/c/coreboot/+/49205 )
Change subject: device/pci_device.c: Use same indents for switch/case ......................................................................
device/pci_device.c: Use same indents for switch/case
Use same indents for switch/case to fix linter issues.
Change-Id: I5c6abf5b918bac3df8d7617824392f2ec932cb32 Signed-off-by: Felix Singer felixsinger@posteo.net --- M src/device/pci_device.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/49205/2
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/49205
to look at the new patch set (#3).
Change subject: device/pci_device.c: Use same indents for switch/case ......................................................................
device/pci_device.c: Use same indents for switch/case
Use same indents for switch/case to fix linter issues.
Change-Id: I5c6abf5b918bac3df8d7617824392f2ec932cb32 Signed-off-by: Felix Singer felixsinger@posteo.net --- M src/device/pci_device.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/49205/3
Attention is currently required from: Felix Singer. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/49205 )
Change subject: device/pci_device.c: Use same indents for switch/case ......................................................................
Patch Set 3: Code-Review+2
Attention is currently required from: Felix Singer. Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/49205 )
Change subject: device/pci_device.c: Use same indents for switch/case ......................................................................
Patch Set 3:
(1 comment)
File src/device/pci_device.c:
https://review.coreboot.org/c/coreboot/+/49205/comment/ee804cf8_9e3ad527 PS3, Line 970: default: : bad: I can pretty much imagine why the author did it like this. How about indenting the `bad:` too? or is there a linter against it?
Attention is currently required from: Felix Singer, Nico Huber. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/49205 )
Change subject: device/pci_device.c: Use same indents for switch/case ......................................................................
Patch Set 3:
(1 comment)
File src/device/pci_device.c:
https://review.coreboot.org/c/coreboot/+/49205/comment/886a85a3_acb2fee4 PS3, Line 970: default: : bad:
I can pretty much imagine why the author did it like this. How about […]
CB:772
Coding style doesn't say anything in particular. Personally, I prefer not to indent goto labels for clarity, especially when interleaved within a switch/case statement.
Attention is currently required from: Felix Singer. Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/49205 )
Change subject: device/pci_device.c: Use same indents for switch/case ......................................................................
Patch Set 3:
(1 comment)
File src/device/pci_device.c:
https://review.coreboot.org/c/coreboot/+/49205/comment/95552757_3d88a716 PS3, Line 970: default: : bad:
CB:772 […]
I would not call this interleaved, though. It's fully contained in the switch/case statement.
Maybe `goto default;` would work?
Attention is currently required from: Felix Singer, Nico Huber. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/49205 )
Change subject: device/pci_device.c: Use same indents for switch/case ......................................................................
Patch Set 3:
(1 comment)
File src/device/pci_device.c:
https://review.coreboot.org/c/coreboot/+/49205/comment/da9daf40_ed107745 PS3, Line 970: default: : bad:
I would not call this interleaved, though. It's fully contained in the […]
I don't think you can use goto with case labels. Something that would work:
#if CONFIG(CARDBUS_PLUGIN_SUPPORT) case PCI_HEADER_TYPE_CARDBUS: dev->ops = &default_cardbus_ops_bus; break; #endif default: goto bad; }
return;
bad: if (dev->enabled) { printk(BIOS_ERR, "%s [%04x/%04x/%06x] has unknown " "header type %02x, ignoring.\n", dev_path(dev), dev->vendor, dev->device, dev->class >> 8, dev->hdr_type); } }
Attention is currently required from: Felix Singer, Nico Huber. Hello build bot (Jenkins), Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/49205
to look at the new patch set (#7).
Change subject: device/pci_device.c: Use same indents for switch/case ......................................................................
device/pci_device.c: Use same indents for switch/case
Use same indents for switch/case to fix linter issues.
Change-Id: I5c6abf5b918bac3df8d7617824392f2ec932cb32 Signed-off-by: Felix Singer felixsinger@posteo.net --- M src/device/pci_device.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/49205/7
Attention is currently required from: Felix Singer, Nico Huber. Hello build bot (Jenkins), Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/49205
to look at the new patch set (#8).
Change subject: device/pci_device.c: Use same indents for switch/case ......................................................................
device/pci_device.c: Use same indents for switch/case
Use same indents for switch/case to fix linter issues.
Change-Id: I5c6abf5b918bac3df8d7617824392f2ec932cb32 Signed-off-by: Felix Singer felixsinger@posteo.net --- M src/device/pci_device.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/49205/8
Attention is currently required from: Felix Singer, Nico Huber. Hello build bot (Jenkins), Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/49205
to look at the new patch set (#9).
Change subject: device/pci_device.c: Use same indents for switch/case ......................................................................
device/pci_device.c: Use same indents for switch/case
Use same indents for switch/case to fix linter issues.
Change-Id: I5c6abf5b918bac3df8d7617824392f2ec932cb32 Signed-off-by: Felix Singer felixsinger@posteo.net --- M src/device/pci_device.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/49205/9
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/49205 )
Change subject: device/pci_device.c: Use same indents for switch/case ......................................................................
device/pci_device.c: Use same indents for switch/case
Use same indents for switch/case to fix linter issues.
Change-Id: I5c6abf5b918bac3df8d7617824392f2ec932cb32 Signed-off-by: Felix Singer felixsinger@posteo.net Reviewed-on: https://review.coreboot.org/c/coreboot/+/49205 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/device/pci_device.c 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
diff --git a/src/device/pci_device.c b/src/device/pci_device.c index a7eb91d..f41689e 100644 --- a/src/device/pci_device.c +++ b/src/device/pci_device.c @@ -967,7 +967,7 @@ dev->ops = &default_cardbus_ops_bus; break; #endif -default: + default: bad: if (dev->enabled) { printk(BIOS_ERR, "%s [%04x/%04x/%06x] has unknown "