diff options
author | Nathan Chancellor <natechancellor@gmail.com> | 2018-09-19 15:50:22 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-25 14:21:02 -0400 |
commit | 6dbfdc1a4ee0030563af22bb682ff3bc590422f9 (patch) | |
tree | 2fdb5f0afdc2a2686be1905de219c989d14805c4 /drivers/misc/mic | |
parent | 7052c5e12851ed5882ca0d0d201060511e8ffa02 (diff) |
misc: mic: scif: Remove unused variable
Clang warns when a variable is assigned to itself.
drivers/misc/mic/scif/scif_dma.c:1577:12: warning: explicitly assigning
value of variable of type 'bool' (aka '_Bool') to itself [-Wself-assign]
dst_local = dst_local;
~~~~~~~~~ ^ ~~~~~~~~~
1 warning generated.
This is usually done to avoid an unused variable warning, which is the
case here. dst_local is used nowhere in this function, which has been
the case since the initial code drop in commit 7cc31cd27752 ("misc: mic:
SCIF DMA and CPU copy interface") in 2015. Just remove the variable, it
can be added back if it was intended to be used.
Link: https://github.com/ClangBuiltLinux/linux/issues/107
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mic')
-rw-r--r-- | drivers/misc/mic/scif/scif_dma.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/misc/mic/scif/scif_dma.c b/drivers/misc/mic/scif/scif_dma.c index 6369aeaa7056..03af8b5b7b0d 100644 --- a/drivers/misc/mic/scif/scif_dma.c +++ b/drivers/misc/mic/scif/scif_dma.c | |||
@@ -1553,7 +1553,7 @@ static int scif_rma_list_dma_copy_wrapper(struct scif_endpt *epd, | |||
1553 | int src_cache_off, dst_cache_off; | 1553 | int src_cache_off, dst_cache_off; |
1554 | s64 src_offset = work->src_offset, dst_offset = work->dst_offset; | 1554 | s64 src_offset = work->src_offset, dst_offset = work->dst_offset; |
1555 | u8 *temp = NULL; | 1555 | u8 *temp = NULL; |
1556 | bool src_local = true, dst_local = false; | 1556 | bool src_local = true; |
1557 | struct scif_dma_comp_cb *comp_cb; | 1557 | struct scif_dma_comp_cb *comp_cb; |
1558 | dma_addr_t src_dma_addr, dst_dma_addr; | 1558 | dma_addr_t src_dma_addr, dst_dma_addr; |
1559 | int err; | 1559 | int err; |
@@ -1572,9 +1572,7 @@ static int scif_rma_list_dma_copy_wrapper(struct scif_endpt *epd, | |||
1572 | src_dma_addr = __scif_off_to_dma_addr(work->src_window, src_offset); | 1572 | src_dma_addr = __scif_off_to_dma_addr(work->src_window, src_offset); |
1573 | dst_dma_addr = __scif_off_to_dma_addr(work->dst_window, dst_offset); | 1573 | dst_dma_addr = __scif_off_to_dma_addr(work->dst_window, dst_offset); |
1574 | src_local = work->src_window->type == SCIF_WINDOW_SELF; | 1574 | src_local = work->src_window->type == SCIF_WINDOW_SELF; |
1575 | dst_local = work->dst_window->type == SCIF_WINDOW_SELF; | ||
1576 | 1575 | ||
1577 | dst_local = dst_local; | ||
1578 | /* Allocate dma_completion cb */ | 1576 | /* Allocate dma_completion cb */ |
1579 | comp_cb = kzalloc(sizeof(*comp_cb), GFP_KERNEL); | 1577 | comp_cb = kzalloc(sizeof(*comp_cb), GFP_KERNEL); |
1580 | if (!comp_cb) | 1578 | if (!comp_cb) |