mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Per Persson" <per.persson@gnosjo.pp.se>
To: <linux-kernel@vger.kernel.org>
Subject: [PATCH] search_one_table()
Date: Tue, 13 Nov 2001 23:32:50 +0100	[thread overview]
Message-ID: <NDBBJMOHILCIIKFHCBHAIEOECAAA.per.persson@gnosjo.pp.se> (raw)

I found that gcc doesn't manage to do this rewrite itself. My micro-patch
saves a few bytes. Also the code becomes a little bit cleaner (IMHO).

Probably the same change could (and should) be made for the other
architectures too.

Per Persson
per.persson@gnosjo.pp.se


--- arch/i386/mm/extable.c.orig	Mon Nov 12 00:13:52 2001
+++ arch/i386/mm/extable.c	Tue Nov 13 17:39:42 2001
@@ -19,7 +19,7 @@
 		const struct exception_table_entry *mid;
 		long diff;

-		mid = (last - first) / 2 + first;
+		mid = (last + first) / 2
 		diff = mid->insn - value;
                 if (diff == 0)
                         return mid->fixup;


             reply	other threads:[~2001-11-13 22:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-13 22:32 Per Persson [this message]
2001-11-13 22:42 ` Brian Gerst
2001-11-13 23:02 ` Robert Love

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=NDBBJMOHILCIIKFHCBHAIEOECAAA.per.persson@gnosjo.pp.se \
    --to=per.persson@gnosjo.pp.se \
    --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®