diff mbox

[4/5] rxe_cfg: Remove dead code from show_module_status()

Message ID beb18346-316e-5d71-dce2-091d700797d6@sandisk.com (mailing list archive)
State Accepted
Headers show

Commit Message

Bart Van Assche Oct. 7, 2016, 6:39 p.m. UTC
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
---
 providers/rxe/rxe_cfg | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

Comments

yonatan cohen Oct. 13, 2016, 11:06 a.m. UTC | #1
On 10/7/2016 9:39 PM, Bart Van Assche wrote:
> Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
> ---
>  providers/rxe/rxe_cfg | 18 +-----------------
>  1 file changed, 1 insertion(+), 17 deletions(-)
>
> diff --git a/providers/rxe/rxe_cfg b/providers/rxe/rxe_cfg
> index a4e9c0407a8b..0a3dcf16957c 100755
> --- a/providers/rxe/rxe_cfg
> +++ b/providers/rxe/rxe_cfg
> @@ -300,23 +300,7 @@ sub check_module_status {
>
>  # print driver load status and ethertype for rdma_rxe and rdma_rxe_net
>  sub show_module_status {
> -    my $rxe_loaded = 1;
> -
> -    if (!(-e $sys)) {
> -	$rxe_loaded = 0;
> -    }
> -
> -    if ($rxe_loaded) {
> -	return 0;
> -    }
> -    elsif (!$rxe_loaded) {
> -	print "rxe modules not loaded\n";
> -	return 1;
> -    }
> -    else {
> -	print "Configuration does not make sense\n";
> -	return 1;
> -    }
> +    print "rdma_rxe module not loaded\n" if (!(-e $sys));
>  }
>
>  # print rxe status
>
ack
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/providers/rxe/rxe_cfg b/providers/rxe/rxe_cfg
index a4e9c0407a8b..0a3dcf16957c 100755
--- a/providers/rxe/rxe_cfg
+++ b/providers/rxe/rxe_cfg
@@ -300,23 +300,7 @@  sub check_module_status {
 
 # print driver load status and ethertype for rdma_rxe and rdma_rxe_net
 sub show_module_status {
-    my $rxe_loaded = 1;
-
-    if (!(-e $sys)) {
-	$rxe_loaded = 0;
-    }
-
-    if ($rxe_loaded) {
-	return 0;
-    }
-    elsif (!$rxe_loaded) {
-	print "rxe modules not loaded\n";
-	return 1;
-    }
-    else {
-	print "Configuration does not make sense\n";
-	return 1;
-    }
+    print "rdma_rxe module not loaded\n" if (!(-e $sys));
 }
 
 # print rxe status