summaryrefslogtreecommitdiff
path: root/drivers/misc/mic/scif/scif_api.c
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2020-07-01 11:31:06 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-01 16:08:04 +0300
commitcf2a06c133ddb07d90af78569f5d3e0551cfde7f (patch)
tree7be5e732a4abfee5ea1bce0fd1faea5d0fcdf462 /drivers/misc/mic/scif/scif_api.c
parenta761b8b00c6cde8f20cdcafdfba685118f2832e3 (diff)
downloadlinux-cf2a06c133ddb07d90af78569f5d3e0551cfde7f.tar.xz
misc: mic: scif: scif_api: Remove set but unused variable 'read_size'
'read_size' appears to have been assigned, but never used since the SCIF messaging and node enumeration APIs were introduced in 2015. Makes sense to simply remove it. Fixes the following W=1 warning: drivers/misc/mic/scif/scif_api.c: In function ‘_scif_recv’: drivers/misc/mic/scif/scif_api.c:1000:6: warning: variable ‘read_size’ set but not used [-Wunused-but-set-variable] 1000 | int read_size; | ^~~~~~~~~ Signed-off-by: Lee Jones <lee.jones@linaro.org> Link: https://lore.kernel.org/r/20200701083118.45744-19-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mic/scif/scif_api.c')
-rw-r--r--drivers/misc/mic/scif/scif_api.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/misc/mic/scif/scif_api.c b/drivers/misc/mic/scif/scif_api.c
index 781217c030a6..d7faffdd87e9 100644
--- a/drivers/misc/mic/scif/scif_api.c
+++ b/drivers/misc/mic/scif/scif_api.c
@@ -997,7 +997,6 @@ static int _scif_send(scif_epd_t epd, void *msg, int len, int flags)
static int _scif_recv(scif_epd_t epd, void *msg, int len, int flags)
{
- int read_size;
struct scif_endpt *ep = (struct scif_endpt *)epd;
struct scifmsg notif_msg;
int curr_recv_len = 0, remaining_len = len, read_count;
@@ -1017,8 +1016,7 @@ static int _scif_recv(scif_epd_t epd, void *msg, int len, int flags)
* important for the Non Blocking case.
*/
curr_recv_len = min(remaining_len, read_count);
- read_size = scif_rb_get_next(&qp->inbound_q,
- msg, curr_recv_len);
+ scif_rb_get_next(&qp->inbound_q, msg, curr_recv_len);
if (ep->state == SCIFEP_CONNECTED) {
/*
* Update the read pointer only if the endpoint