Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d6488ac1 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Bjorn Helgaas
Browse files

PCI: Mark fall-through switch cases before enabling -Wimplicit-fallthrough



In preparation to enabling -Wimplicit-fallthrough, mark switch cases where
we are expecting to fall through.

Warning level 2 was used: -Wimplicit-fallthrough=2

Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent ce397d21
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -436,6 +436,7 @@ int pciehp_sysfs_enable_slot(struct slot *p_slot)
	switch (p_slot->state) {
	switch (p_slot->state) {
	case BLINKINGON_STATE:
	case BLINKINGON_STATE:
		cancel_delayed_work(&p_slot->work);
		cancel_delayed_work(&p_slot->work);
		/* fall through */
	case STATIC_STATE:
	case STATIC_STATE:
		p_slot->state = POWERON_STATE;
		p_slot->state = POWERON_STATE;
		mutex_unlock(&p_slot->lock);
		mutex_unlock(&p_slot->lock);
@@ -473,6 +474,7 @@ int pciehp_sysfs_disable_slot(struct slot *p_slot)
	switch (p_slot->state) {
	switch (p_slot->state) {
	case BLINKINGOFF_STATE:
	case BLINKINGOFF_STATE:
		cancel_delayed_work(&p_slot->work);
		cancel_delayed_work(&p_slot->work);
		/* fall through */
	case STATIC_STATE:
	case STATIC_STATE:
		p_slot->state = POWEROFF_STATE;
		p_slot->state = POWEROFF_STATE;
		mutex_unlock(&p_slot->lock);
		mutex_unlock(&p_slot->lock);
+2 −0
Original line number Original line Diff line number Diff line
@@ -654,6 +654,7 @@ int shpchp_sysfs_enable_slot(struct slot *p_slot)
	switch (p_slot->state) {
	switch (p_slot->state) {
	case BLINKINGON_STATE:
	case BLINKINGON_STATE:
		cancel_delayed_work(&p_slot->work);
		cancel_delayed_work(&p_slot->work);
		/* fall through */
	case STATIC_STATE:
	case STATIC_STATE:
		p_slot->state = POWERON_STATE;
		p_slot->state = POWERON_STATE;
		mutex_unlock(&p_slot->lock);
		mutex_unlock(&p_slot->lock);
@@ -689,6 +690,7 @@ int shpchp_sysfs_disable_slot(struct slot *p_slot)
	switch (p_slot->state) {
	switch (p_slot->state) {
	case BLINKINGOFF_STATE:
	case BLINKINGOFF_STATE:
		cancel_delayed_work(&p_slot->work);
		cancel_delayed_work(&p_slot->work);
		/* fall through */
	case STATIC_STATE:
	case STATIC_STATE:
		p_slot->state = POWEROFF_STATE;
		p_slot->state = POWEROFF_STATE;
		mutex_unlock(&p_slot->lock);
		mutex_unlock(&p_slot->lock);
+1 −0
Original line number Original line Diff line number Diff line
@@ -2045,6 +2045,7 @@ static pci_power_t pci_target_state(struct pci_dev *dev, bool wakeup)
		case PCI_D2:
		case PCI_D2:
			if (pci_no_d1d2(dev))
			if (pci_no_d1d2(dev))
				break;
				break;
			/* else: fall through */
		default:
		default:
			target_state = state;
			target_state = state;
		}
		}
+1 −0
Original line number Original line Diff line number Diff line
@@ -2105,6 +2105,7 @@ static void quirk_netmos(struct pci_dev *dev)
		if (dev->subsystem_vendor == PCI_VENDOR_ID_IBM &&
		if (dev->subsystem_vendor == PCI_VENDOR_ID_IBM &&
				dev->subsystem_device == 0x0299)
				dev->subsystem_device == 0x0299)
			return;
			return;
		/* else: fall through */
	case PCI_DEVICE_ID_NETMOS_9735:
	case PCI_DEVICE_ID_NETMOS_9735:
	case PCI_DEVICE_ID_NETMOS_9745:
	case PCI_DEVICE_ID_NETMOS_9745:
	case PCI_DEVICE_ID_NETMOS_9845:
	case PCI_DEVICE_ID_NETMOS_9845: