Re: [PATCH 1/1] staging: usbip: fix wrong endian conversion

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

 



Greg,

David's correction is indeed correct. My original code is the same as David proposes, something must have gone wrong during my patch creation process. (I do not really understand how, maybe wrong copy/paste, or maybe something weird happened with diff or line offsets.)

I did not catch it on my Intel box, because I did not use a webcam/dvb-t tuner on the intel box for testing only on my mips router (which is already big-endian, so the conversions do nothing).

Apologies for the extra work. David, thanks for catching this.

Best Regards,

Arjan


-----Original Message----- From: Greg KH
Sent: Thursday, May 12, 2011 17:05
To: David Chang
Cc: devel@xxxxxxxxxxxxxxxxxxxx ; Arjan Mels
Subject: Re: [PATCH 1/1] staging: usbip: fix wrong endian conversion

On Thu, May 12, 2011 at 06:31:11PM +0800, David Chang wrote:
Fix number_of_packets wrong endian conversion in function
correct_endian_ret_submit()

Signed-off-by: David Chang <dchang@xxxxxxxxxx>
---
 drivers/staging/usbip/usbip_common.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/usbip/usbip_common.c b/drivers/staging/usbip/usbip_common.c
index 6c44fa4..faefee9 100644
--- a/drivers/staging/usbip/usbip_common.c
+++ b/drivers/staging/usbip/usbip_common.c
@@ -589,7 +589,7 @@ static void correct_endian_ret_submit(struct usbip_header_ret_submit *pdu,
 be32_to_cpus(&pdu->status);
 be32_to_cpus(&pdu->actual_length);
 be32_to_cpus(&pdu->start_frame);
- cpu_to_be32s(&pdu->number_of_packets);
+ be32_to_cpus(&pdu->number_of_packets);

Are you sure about this?  Why hasn't anyone else had a problem here with
this?

odd,

greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux