mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Werner Almesberger <wa@almesberger.net>
To: linux-kernel@vger.kernel.org
Cc: davem@redhat.com, kuznet@ms2.inr.ac.ru
Subject: [PATCH] include/net/dsfield.h warning (2.4,2.5)
Date: Fri, 21 Jun 2002 05:56:18 -0300	[thread overview]
Message-ID: <20020621055618.B2295@almesberger.net> (raw)

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 -----------------------------------

--- include/net/dsfield.h.orig	Fri Jun 21 05:42:18 2002
+++ include/net/dsfield.h	Fri Jun 21 05:43:30 2002
@@ -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

-- 
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         wa@almesberger.net /
/_http://icapeople.epfl.ch/almesber/_____________________________________/

             reply	other threads:[~2002-06-21  8:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-21  8:56 Werner Almesberger [this message]
2002-06-21  9:23 ` David S. Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020621055618.B2295@almesberger.net \
    --to=wa@almesberger.net \
    --cc=davem@redhat.com \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®