Skip to contentSkip to conversation

include/net/dsfield.h warning (2.4,2.5)

PATCH Applied Werner Almesberger 2 participants 2 messages Jun 21, 2002 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 include/net/dsfield.h warning (2.4,2.5)

This "obviously correct" patch removes code that was never used, and that yields warnings with recent versions of gcc. (It can always be resurrected from archives in the unlikely event that we should ever need those few cycles it would save.)

I tried this patch with 2.5.24, but it should be fine for any 2.4 or 2.5 kernel.

- Werner

---------------------------------- cut here -----------------------------------

net/dsfield.h renamed from net/dsfield.h.orig +0 -26
@@ -50,30 +50,4 @@
 	*(__u16 *) ipv6h = htons(tmp);
 }
 
-
-#if 0 /* put this later into asm-i386 or such ... */
-
-static inline void ip_change_dsfield(struct iphdr *iph,__u16 dsfield)
-{
-	__u16 check;
-
-	__asm__ __volatile__("
-		movw	10(%1),%0
-		xchg	%b0,%h0
-		addb	1(%1),%b0
-		adcb	$0,%h0
-		adcw	$1,%0
-		cmc
-		sbbw	%2,%0
-		sbbw	$0,%0
-		movb	%b2,1(%1)
-		xchg	%b0,%h0
-		movw	%0,10(%1)"
-	    : "=&r" (check)
-	    : "r" (iph), "r" (dsfield)
-	    : "cc");
-}
-
-#endif
-
 #endif
Signature · 3 lines
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         [email protected] /
/_http://icapeople.epfl.ch/almesber/_____________________________________/
#1 lore raw

From: Werner Almesberger <[email protected]>
Date: Fri, 21 Jun 2002 05:56:18 -0300

I tried this patch with 2.5.24, but it should be fine for any 2.4 or 2.5 kernel.

Applied, thanks.