All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]: Remove redundant #ifdef CONFIG_SPARC64 check
@ 2012-06-11 21:12 Sarah Nadi
  2012-06-11 21:40 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Sarah Nadi @ 2012-06-11 21:12 UTC (permalink / raw)
  To: sparclinux

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>


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH]: Remove redundant #ifdef CONFIG_SPARC64 check
  2012-06-11 21:12 [PATCH]: Remove redundant #ifdef CONFIG_SPARC64 check Sarah Nadi
@ 2012-06-11 21:40 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-06-11 21:40 UTC (permalink / raw)
  To: sparclinux

From: Sarah Nadi <snadi@uwaterloo.ca>
Date: Mon, 11 Jun 2012 17:12:31 -0400

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

This is there so that sparc 32-bit support is easy to add for someone
so inclined, do not remove this.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-11 21:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-11 21:12 [PATCH]: Remove redundant #ifdef CONFIG_SPARC64 check Sarah Nadi
2012-06-11 21:40 ` David Miller

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.