Skip to contentSkip to conversation

Drivers: hv: balloon: add a fall through comment to hv_memory_notifier()

PATCH New Vitaly Kuznetsov 1 participant 1 message Jan 26, 2017 Hyper-V/Azure core and drivers

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Drivers: hv: balloon: add a fall through comment to hv_memory_notifier()

Coverity scan gives a warning when there is fall through in a switch without a comment. This fall through is intentional as ol_waitevent needs to be completed to unblock hv_mem_hot_add() allowing it to process next requests regardless of the result of if we were able to online this block.

---
Changes since v1: reduce the verbosity of the comment [Stephen Hemminger]

---
 drivers/hv/hv_balloon.c | 1 +
 1 file changed, 1 insertion(+)
drivers/hv/hv_balloon.c +1 -0
index 14c3dc4..5fd03e5 100644
@@ -587,6 +587,7 @@ static int hv_memory_notifier(struct notifier_block *nb, unsigned long val,
 		spin_lock_irqsave(&dm_device.ha_lock, flags);
 		dm_device.num_pages_onlined += mem->nr_pages;
 		spin_unlock_irqrestore(&dm_device.ha_lock, flags);
+		/* Fall through */
 	case MEM_CANCEL_ONLINE:
 		if (dm_device.ha_waiting) {
 			dm_device.ha_waiting = false;
Signature · 1 line
2.9.3