diff options
author | Peter Senna Tschudin <peter.senna@gmail.com> | 2014-05-26 16:08:50 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-26 10:32:15 -0700 |
commit | 4764ca981b040048766e4f39a45a4b9c5cecff9c (patch) | |
tree | b4743d812ce65e2be8ca8e9190a0385029bff358 /drivers/staging/bcm/PHSModule.c | |
parent | 9c73b46af4f74c255fbc26edebef8b2a61f2b7e4 (diff) | |
download | linux-4764ca981b040048766e4f39a45a4b9c5cecff9c.tar.gz linux-4764ca981b040048766e4f39a45a4b9c5cecff9c.tar.bz2 linux-4764ca981b040048766e4f39a45a4b9c5cecff9c.zip |
drivers/staging: Remove useless return variables
This patch remove variables that are initialized with a constant,
are never updated, and are only used as parameter of return.
Return the constant instead of using a variable.
Verified by compilation only.
The coccinelle script that find and fixes this issue is:
// <smpl>
@@
type T;
constant C;
identifier ret;
@@
- T ret = C;
... when != ret
when strict
return
- ret
+ C
;
// </smpl>
Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/bcm/PHSModule.c')
-rw-r--r-- | drivers/staging/bcm/PHSModule.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/staging/bcm/PHSModule.c b/drivers/staging/bcm/PHSModule.c index afc7bcc3e54b..07c5a0bae1ed 100644 --- a/drivers/staging/bcm/PHSModule.c +++ b/drivers/staging/bcm/PHSModule.c @@ -409,7 +409,6 @@ ULONG PhsUpdateClassifierRule(IN void *pvContext, */ ULONG PhsDeletePHSRule(IN void *pvContext, IN B_UINT16 uiVcid, IN B_UINT8 u8PHSI) { - ULONG lStatus = 0; UINT nSFIndex = 0, nClsidIndex = 0; struct bcm_phs_entry *pstServiceFlowEntry = NULL; struct bcm_phs_classifier_table *pstClassifierRulesTable = NULL; @@ -446,7 +445,7 @@ ULONG PhsDeletePHSRule(IN void *pvContext, IN B_UINT16 uiVcid, IN B_UINT8 u8PHSI } } } - return lStatus; + return 0; } /* @@ -467,7 +466,6 @@ ULONG PhsDeletePHSRule(IN void *pvContext, IN B_UINT16 uiVcid, IN B_UINT8 u8PHSI */ ULONG PhsDeleteClassifierRule(IN void *pvContext, IN B_UINT16 uiVcid, IN B_UINT16 uiClsId) { - ULONG lStatus = 0; UINT nSFIndex = 0, nClsidIndex = 0; struct bcm_phs_entry *pstServiceFlowEntry = NULL; struct bcm_phs_classifier_entry *pstClassifierEntry = NULL; @@ -504,7 +502,7 @@ ULONG PhsDeleteClassifierRule(IN void *pvContext, IN B_UINT16 uiVcid, IN B_UINT1 memset(pstClassifierEntry, 0, sizeof(struct bcm_phs_classifier_entry)); } } - return lStatus; + return 0; } /* @@ -524,7 +522,6 @@ ULONG PhsDeleteClassifierRule(IN void *pvContext, IN B_UINT16 uiVcid, IN B_UINT1 */ ULONG PhsDeleteSFRules(IN void *pvContext, IN B_UINT16 uiVcid) { - ULONG lStatus = 0; UINT nSFIndex = 0, nClsidIndex = 0; struct bcm_phs_entry *pstServiceFlowEntry = NULL; struct bcm_phs_classifier_table *pstClassifierRulesTable = NULL; @@ -573,7 +570,7 @@ ULONG PhsDeleteSFRules(IN void *pvContext, IN B_UINT16 uiVcid) pstServiceFlowEntry->uiVcid = 0; } - return lStatus; + return 0; } /* |