Skip to contentSkip to conversation

Staging: lustre: default used instead of break

PATCH In review Melike Yurtoglu 2 participants 2 messages Feb 27, 2015 – Mar 2, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: lustre: default used instead of break

WARNING: switch default: should use break.
That was found by running checkpatch

---
 drivers/staging/lustre/lustre/ptlrpc/ptlrpc_module.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/ptlrpc/ptlrpc_module.c +1 -1
index 5268887..44f4e27 100644
@@ -143,7 +143,7 @@ cleanup:
 		ptlrpc_hr_fini();
 		req_layout_fini();
 		/* Fall through */
-	default: ;
+	break;
 	}
 
 	return rc;
Signature · 1 line
1.8.3.2
maintainer
#1 lore raw
Quoted 13 lines · Melike Yurtoglu

WARNING: switch default: should use break.
That was found by running checkpatch

---
 drivers/staging/lustre/lustre/ptlrpc/ptlrpc_module.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/ptlrpc/ptlrpc_module.c +0 -0
index 5268887..44f4e27 100644

drivers/staging/lustre/lustre/ptlrpc/ptlrpc_module.c cleanup: · line 147

Quoted 6 lines
drivers/staging/lustre/lustre/ptlrpc/ptlrpc_module.c +1 -1
@@ -143,7 +143,7 @@ cleanup:
 		ptlrpc_hr_fini();
 		req_layout_fini();
 		/* Fall through */
-	default: ;
+	break;
 	}

I don't understand, why is this better? Or even correct?

thanks,

greg k-h