diff mbox series

[v2,12/14] qmi: debug print fd that QRTR data was received on

Message ID 20240625164158.1170937-12-denkenz@gmail.com (mailing list archive)
State Accepted
Commit fba357d49292d18a5f3a257f568c241891afd265
Headers show
Series [v2,01/14] qmi: Introduce SERVICE_VERSION macro | expand

Commit Message

Denis Kenzior June 25, 2024, 4:41 p.m. UTC
Similarly to qrtr_service_family_dedicated_rx(), output the fd for the
rx operation.
---
 drivers/qmimodem/qmi.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/drivers/qmimodem/qmi.c b/drivers/qmimodem/qmi.c
index 24d2ff8075fe..b8f46a5b4a0e 100644
--- a/drivers/qmimodem/qmi.c
+++ b/drivers/qmimodem/qmi.c
@@ -1848,13 +1848,13 @@  static bool qrtr_received_data(struct l_io *io, void *user_data)
 	unsigned char buf[2048];
 	ssize_t bytes_read;
 	socklen_t addr_size;
+	int fd = l_io_get_fd(qrtr->transport.io);
 
 	addr_size = sizeof(addr);
-	bytes_read = recvfrom(l_io_get_fd(qrtr->transport.io),
-				buf, sizeof(buf), 0,
+	bytes_read = recvfrom(fd, buf, sizeof(buf), 0,
 				(struct sockaddr *) &addr, &addr_size);
-	DEBUG(debug, "Received %zd bytes from Node: %d Port: %d",
-			bytes_read, addr.sq_node, addr.sq_port);
+	DEBUG(debug, "fd %d Received %zd bytes from Node: %d Port: %d",
+			fd, bytes_read, addr.sq_node, addr.sq_port);
 
 	if (bytes_read < 0)
 		return true;