All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sarah Nadi <snadi@uwaterloo.ca>
To: sparclinux@vger.kernel.org
Subject: [PATCH]: Remove redundant #ifdef CONFIG_SPARC64 check
Date: Mon, 11 Jun 2012 21:12:31 +0000	[thread overview]
Message-ID: <4FD65F3F.3040409@uwaterloo.ca> (raw)

From: Sarah Nadi<snadi@uwaterloo.ca>

Summary: Unnecessary #ifdef check in arch/sparc/kernel/jump_label.c

Problem description: The #ifdef CONFIG_SPARC64 is unnecessary since the file is only compiled when CONFIG_SPARC64 is selected. Leaving it in makes the
#ifdef block always selected while the #else block is never selected. Suggested patch to remove unneccesary check below.


Patch:

--- a/arch/sparc/kernel/jump_label.c    2012-06-11 16:51:15.000000000 -0400
+++ b/arch/sparc/kernel/jump_label.c    2012-06-11 16:54:39.000000000 -0400
@@ -17,13 +17,9 @@
      if (type = JUMP_LABEL_ENABLE) {
          s32 off = (s32)entry->target - (s32)entry->code;

-#ifdef CONFIG_SPARC64
          /* ba,pt %xcc, . + (off << 2) */
          val = 0x10680000 | ((u32) off >> 2);
-#else
-        /* ba . + (off << 2) */
-        val = 0x10800000 | ((u32) off >> 2);
-#endif
+
      } else {
          val = 0x01000000;
      }


Signed-off-by: Sarah Nadi <snadi@uwaterloo.ca>


             reply	other threads:[~2012-06-11 21:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-11 21:12 Sarah Nadi [this message]
2012-06-11 21:40 ` [PATCH]: Remove redundant #ifdef CONFIG_SPARC64 check David 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=4FD65F3F.3040409@uwaterloo.ca \
    --to=snadi@uwaterloo.ca \
    --cc=sparclinux@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.