usbip_xmit() + "send" parameter?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I tried to understand the usbip_xmit() function from the USBIP kernel
source. I found that the "send" parameter of the usbip_xmit() is always 0:

$ grep -n 'usbip_xmit(' linux-2.6/drivers/staging/usbip/*
linux-2.6/drivers/staging/usbip/stub_rx.c:566:  ret = usbip_xmit(0, ud->tcp_socket, (char *) &pdu, sizeof(pdu), 0);
linux-2.6/drivers/staging/usbip/usbip_common.c:337:int usbip_xmit(int send, struct socket *sock, char *buf,
linux-2.6/drivers/staging/usbip/usbip_common.c:715:     ret = usbip_xmit(0, ud->tcp_socket, buff, size, 0);
linux-2.6/drivers/staging/usbip/usbip_common.c:826:     ret = usbip_xmit(0, ud->tcp_socket, (char *)urb->transfer_buffer,
linux-2.6/drivers/staging/usbip/usbip_common.h:224:int usbip_xmit(int, struct socket *, char *, int, int);
linux-2.6/drivers/staging/usbip/vhci_rx.c:209:  ret = usbip_xmit(0, ud->tcp_socket, (char *) &pdu, sizeof(pdu), 0);

This means that the usbip_xmit() function will always call kernel_recvmsg() and
never kernel_sendmsg(). So the line containing kernel_sendmsg() is a dead code.

Is this so or have I overseen something?

Regards,

	MÃrton NÃmeth
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux