Per Mika's request, add an explicit break to the last case of switch
statements everywhere in pciehp to be more defensive towards future
amendments.
Per Gustavo's request, mark all non-empty implicit fallthroughs with a
comment to silence warnings triggered by -Wimplicit-fallthrough=2.
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
case BLINKINGON_STATE:
case BLINKINGOFF_STATE:
cancel_delayed_work(&slot->work);
+ break;
}
slot->state = POWEROFF_STATE;
mutex_unlock(&slot->lock);
switch (slot->state) {
case BLINKINGOFF_STATE:
cancel_delayed_work(&slot->work);
+ /* fall through */
case ON_STATE:
slot->state = POWEROFF_STATE;
mutex_unlock(&slot->lock);
break;
default:
mutex_unlock(&slot->lock);
+ break;
}
/* Turn the slot on if it's occupied or link is up */
switch (slot->state) {
case BLINKINGON_STATE:
cancel_delayed_work(&slot->work);
+ /* fall through */
case OFF_STATE:
slot->state = POWERON_STATE;
mutex_unlock(&slot->lock);
break;
default:
mutex_unlock(&slot->lock);
+ break;
}
}