Thread (33 messages) 33 messages, 3 authors, 2020-07-01
STALE2179d
Revisions (2)
  1. v1 current
  2. v2 [diff vs current]

[PATCH 18/30] misc: mic: scif: scif_api: Remove set but unused variable 'read_size'

From: Lee Jones <hidden>
Date: 2020-06-30 13:52:58
Also in: lkml
Subsystem: char and misc drivers, the rest · Maintainers: Arnd Bergmann, Greg Kroah-Hartman, Linus Torvalds

'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 <redacted>
---
 drivers/misc/mic/scif/scif_api.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/misc/mic/scif/scif_api.c b/drivers/misc/mic/scif/scif_api.c
index 781217c030a63..d7faffdd87e92 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
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help