From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tolunay Orkun Date: Thu, 10 Nov 2005 11:28:13 -0600 Subject: [U-Boot-Users] [PATCH] fix comment in net.c In-Reply-To: <4372FD45.8080807@intracom.gr> References: <4372896E.9080204@freescale.com> <4372FD45.8080807@intracom.gr> Message-ID: <4373832D.6090306@orkun.us> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Pantelis Antoniou wrote: > Ron Alder wrote: > >> This patch fixes a comment in net/net.c >> >> CHANGELOG: >> * Fix comment in net/net.c >> Patch by Ron Alder, 09 Nov 2005 >> >> >> ------------------------------------------------------------------------ >> >> diff --git a/net/net.c b/net/net.c >> --- a/net/net.c >> +++ b/net/net.c >> @@ -829,7 +829,6 @@ static ushort CDP_compute_csum(const uch >> } >> if (len) { >> leftover = (signed short)(*(const signed char *)buff); >> - /* * XXX CISCO SUCKS big time! (and blows too) */ >> result = (result & 0xffff0000) | ((result + leftover) & >> 0x0000ffff); >> } >> while (result >> 16) > > > WTF is this? Politically correct day? > > Since I wrote the comment in question let me elaborate. > > CDP uses the ip checksum algorithm with a twist; for the last > byte it *sign* extends and sums. Obviously this is is completely > braindead, and warants the comment and much more :) > Perhaps adding this explanation to the code would be much better to explain the existence of the code that follows the comment. Don't get me wrong, you can still keep the politically incorrect comment although I personally think "SUCKS" and "blows" are probably not very professional terms as well. I understand Ron's motivation for the patch in corporate environment sense.