staging: rdma: hfi1: Remove unused variables
PATCH 1/1 staging: rdma: hfi1: Remove unused variables
The variable csr has not been used anywhere in the function sdma_dumpstate(). Hence, it has been removed.
This was done with Coccinelle:
@@ type T; identifier i; constant c; @@
-T i;
<... when != i
-i = c;
...>
--- drivers/staging/rdma/hfi1/sdma.c | 1 - 1 file changed, 1 deletion(-)
drivers/staging/rdma/hfi1/sdma.c +0 -1
@@ -1769,7 +1769,6 @@ static void init_sdma_regs(void sdma_dumpstate (struct sdma_engine *sde) { -u64 csr;unsigned i;sdma_dumpstate_helper (SD (CTRL ));
--
2.1.4
Quoted 21 lines · Bhaktipriya Shridhar
The variable csr has not been used anywhere in the function
sdma_dumpstate(). Hence, it has been removed.This was done with Coccinelle:
@@ type T; identifier i; constant c; @@
-T i;
<... when != i
-i = c;
...>Signed-off-by Bhaktipriya Shridhar <[email protected]>--- drivers/staging/rdma/hfi1/sdma.c | 1 - 1 file changed, 1 deletion(-)drivers/staging/rdma/hfi1/sdma.c +0
-0
drivers/staging/rdma/hfi1/sdma.c static void init_sdma_regs( · line 1774
Quoted 7 lines
drivers/staging/rdma/hfi1/sdma.c +0
-1@@ -1769,7 +1769,6 @@ static void init_sdma_regs(void sdma_dumpstate (struct sdma_engine *sde) { -u64 csr;unsigned i;sdma_dumpstate_helper (SD (CTRL ));
Are you absolutely sure that you have compiled this code? Note that this code is under an ifdef, so just having compiled the file may not be good enough.
julia
Quoted 10 lines
--
2.1.4Signature · 5 lines
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160228120441.GA16843%40Karyakshetra. For more options, visit https://groups.google.com/d/optout.
Hello Julia,
Yes, I have compiled this with the kernel code. It compiled successfully.
Thanks,
Bhaktipriya
Quoted 47 lines · Julia Lawall
Quoted 21 lines · Bhaktipriya Shridhar
The variable csr has not been used anywhere in the function
sdma_dumpstate(). Hence, it has been removed.This was done with Coccinelle:
@@ type T; identifier i; constant c; @@
-T i;
<... when != i
-i = c;
...>Signed-off-by Bhaktipriya Shridhar <[email protected]>--- drivers/staging/rdma/hfi1/sdma.c | 1 - 1 file changed, 1 deletion(-)drivers/staging/rdma/hfi1/sdma.c +0
-0drivers/staging/rdma/hfi1/sdma.c static void init_sdma_regs( · line 1774
Quoted 7 lines
drivers/staging/rdma/hfi1/sdma.c +0
-1@@ -1769,7 +1769,6 @@ static void init_sdma_regs(void sdma_dumpstate (struct sdma_engine *sde) { -u64 csr;unsigned i;sdma_dumpstate_helper (SD (CTRL ));Are you absolutely sure that you have compiled this code? Note that this code is under an ifdef, so just having compiled the file may not be good enough.
julia
Quoted 10 lines
--
2.1.4--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160228120441.GA16843%40Karyakshetra.
For more options, visit https://groups.google.com/d/optout.
Quoted 3 lines · Bhaktipriya Shridhar
Hello Julia,
Yes, I have compiled this with the kernel code. It compiled successfully.
OK, maybe you don't have the right compilation options. Because if you look a few lines below the code in this patch, you will see calls to sdma_dumpstate_helper0 and sdma_dumpstate_helper2, which are defined right above the function and use csr.
csr looks like a register name, which made me suspicious.
julia
Quoted 60 lines
Thanks,
BhaktipriyaQuoted 47 lines · Julia Lawall
Quoted 21 lines · Bhaktipriya Shridhar
The variable csr has not been used anywhere in the function
sdma_dumpstate(). Hence, it has been removed.This was done with Coccinelle:
@@ type T; identifier i; constant c; @@
-T i;
<... when != i
-i = c;
...>Signed-off-by Bhaktipriya Shridhar <[email protected]>--- drivers/staging/rdma/hfi1/sdma.c | 1 - 1 file changed, 1 deletion(-)drivers/staging/rdma/hfi1/sdma.c +0
-0drivers/staging/rdma/hfi1/sdma.c static void init_sdma_regs( · line 1774
Quoted 7 lines
drivers/staging/rdma/hfi1/sdma.c +0
-1@@ -1769,7 +1769,6 @@ static void init_sdma_regs(void sdma_dumpstate (struct sdma_engine *sde) { -u64 csr;unsigned i;sdma_dumpstate_helper (SD (CTRL ));Are you absolutely sure that you have compiled this code? Note that this code is under an ifdef, so just having compiled the file may not be good enough.
julia
Quoted 10 lines
--
2.1.4--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160228120441.GA16843%40Karyakshetra.
For more options, visit https://groups.google.com/d/optout.Signature · 5 lines
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/CAFNHFT-62UL2y6ywK3LCba_YeogBUst%2BSj%3Dp4%3DzCEsk1YY4%2BMg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.