Skip to contentSkip to conversation

zfcp: silence -Wimplicit-fallthrough in zfcp_erp_lun_strategy()

PATCH Hannes Reinecke 1 participant 1 message Nov 16, 2018 1 message not in the archive s390

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Hannes Reinecke

author Reviewed-by
#1 lore raw
Quoted 24 lines · Steffen Maier

For some reason the already existing substring "fall through" in the comment is not sufficient for GCC to silence -Wimplicit-fallthrough.

   CC [M]  drivers/s390/scsi/zfcp_erp.o
drivers/s390/scsi/zfcp_erp.c: In function 'zfcp_erp_lun_strategy':
drivers/s390/scsi/zfcp_erp.c:1065:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
   if (atomic_read(&zfcp_sdev->status) & ZFCP_STATUS_COMMON_OPEN)
       ^
drivers/s390/scsi/zfcp_erp.c:1068:2: note: here
   case ZFCP_ERP_STEP_LUN_CLOSING:
   ^~~~
---
  drivers/s390/scsi/zfcp_erp.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/s390/scsi/zfcp_erp.c +0 -0
index 8e5f01f5be81..b2845c5b8106 100644

drivers/s390/scsi/zfcp_erp.c static enum zfcp_erp_act_result zfcp_erp_lun_strategy( · line 1077

Quoted 9 lines
drivers/s390/scsi/zfcp_erp.c +2 -1
@@ -1070,7 +1070,8 @@ static enum zfcp_erp_act_result zfcp_erp_lun_strategy(
  		zfcp_erp_lun_strategy_clearstati(sdev);
  		if (atomic_read(&zfcp_sdev->status) & ZFCP_STATUS_COMMON_OPEN)
  			return zfcp_erp_lun_strategy_close(erp_action);
-		/* already closed, fall through */
+		/* already closed */
+		/* fall through */
  	case ZFCP_ERP_STEP_LUN_CLOSING:
  		if (atomic_read(&zfcp_sdev->status) & ZFCP_STATUS_COMMON_OPEN)
  			return ZFCP_ERP_FAILED;

Cheers,

Hannes

Signature · 5 lines
Dr. Hannes Reinecke		   Teamlead Storage & Networking
[email protected]			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N�rnberg
GF: F. Imend�rffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG N�rnberg)