Re: [PATCH 3/3 v2] netxen: qlogic ethernet : Fix endian bug.

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

From: santosh nayak <santoshprasadnayak@xxxxxxxxx>
Date: Mon, 12 Mar 2012 12:08:23 +0530

> From: Santosh Nayak <santoshprasadnayak@xxxxxxxxx>
> 
> Fix endian bug.
> 
> Signed-off-by: Santosh Nayak <santoshprasadnayak@xxxxxxxxx>

This is a very non-trivial patch, therefore the terse commit
message and the lack of any comments in this code is unacceptable.

This commit message is not only terse, it's wrong.  You're not
fixing an endian bug, you're fixing several of them.

Explain everything in your commit message.

>  	req.words[0] = cpu_to_le64(cmd);
> -	req.words[1] = cpu_to_le64(ip);
> +	memcpy(&req.words[1], &ip, sizeof(u32));

Nobody is going to read that and have any idea why it's correct unless
they happen to be able to discover the long thread you guys had this
past week working out how to do this change correctly.

Putting a comment here for the rest of us mere mortals is therefore
absolutely required.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux Kernel Discussion]     [Ethernet Bridging]     [Linux Wireless Networking]     [Linux Bluetooth Networking]     [Linux Networking Users]     [VLAN]     [Git]     [IETF Annouce]     [Linux Assembly]     [Security]     [Bugtraq]     [Photo]     [Singles Social Networking]     [Yosemite Information]     [MIPS Linux]     [ARM Linux Kernel]     [ARM Linux]     [Linux Virtualization]     [Linux Security]     [Linux IDE]     [Linux RAID]     [Linux SCSI]     [Free Dating]

Add to Google Powered by Linux