Use the fallthrough statement in switch loops
Clang does not seem to work with 'fall through' in comments. Change-Id: Idcbe373be33ef7247548f856bfaba7ceb7f749b5 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/51498 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
This commit is contained in:
committed by
Felix Held
parent
97a0d61f0d
commit
fff20212af
@@ -79,7 +79,7 @@ void hudson_enable(struct device *dev)
|
||||
case PCI_DEVFN(0x12, 0):
|
||||
if (dev->enabled == 0)
|
||||
hudson_disable_usb(USB_EN_DEVFN_12_0);
|
||||
/* fall through */
|
||||
__fallthrough;
|
||||
case PCI_DEVFN(0x12, 2):
|
||||
if (dev->enabled == 0)
|
||||
hudson_disable_usb(USB_EN_DEVFN_12_2);
|
||||
@@ -87,7 +87,7 @@ void hudson_enable(struct device *dev)
|
||||
case PCI_DEVFN(0x13, 0):
|
||||
if (dev->enabled == 0)
|
||||
hudson_disable_usb(USB_EN_DEVFN_13_0);
|
||||
/* fall through */
|
||||
__fallthrough;
|
||||
case PCI_DEVFN(0x13, 2):
|
||||
if (dev->enabled == 0)
|
||||
hudson_disable_usb(USB_EN_DEVFN_13_2);
|
||||
@@ -95,7 +95,7 @@ void hudson_enable(struct device *dev)
|
||||
case PCI_DEVFN(0x16, 0):
|
||||
if (dev->enabled == 0)
|
||||
hudson_disable_usb(USB_EN_DEVFN_16_0);
|
||||
/* fall through */
|
||||
__fallthrough;
|
||||
case PCI_DEVFN(0x16, 2):
|
||||
if (dev->enabled == 0)
|
||||
hudson_disable_usb(USB_EN_DEVFN_16_2);
|
||||
|
@@ -290,10 +290,10 @@ static void hudson_lpc_enable_childrens_resources(struct device *dev)
|
||||
switch (var_num) {
|
||||
case 3:
|
||||
pci_write_config16(dev, 0x90, reg_var[2]);
|
||||
/* fall through */
|
||||
__fallthrough;
|
||||
case 2:
|
||||
pci_write_config16(dev, 0x66, reg_var[1]);
|
||||
/* fall through */
|
||||
__fallthrough;
|
||||
case 1:
|
||||
pci_write_config16(dev, 0x64, reg_var[0]);
|
||||
break;
|
||||
|
@@ -158,10 +158,10 @@ void lpc_enable_childrens_resources(struct device *dev)
|
||||
switch (var_num) {
|
||||
case 3:
|
||||
pci_write_config16(dev, 0x90, reg_var[2]);
|
||||
/* fall through */
|
||||
__fallthrough;
|
||||
case 2:
|
||||
pci_write_config16(dev, 0x66, reg_var[1]);
|
||||
/* fall through */
|
||||
__fallthrough;
|
||||
case 1:
|
||||
//pci_write_config16(dev, 0x64, reg_var[0]); //cause filo can not find sata
|
||||
break;
|
||||
|
@@ -301,10 +301,10 @@ static void hudson_lpc_enable_childrens_resources(struct device *dev)
|
||||
switch (var_num) {
|
||||
case 3:
|
||||
pci_write_config16(dev, 0x90, reg_var[2]);
|
||||
/* fall through */
|
||||
__fallthrough;
|
||||
case 2:
|
||||
pci_write_config16(dev, 0x66, reg_var[1]);
|
||||
/* fall through */
|
||||
__fallthrough;
|
||||
case 1:
|
||||
pci_write_config16(dev, 0x64, reg_var[0]);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user