* [PATCH] long line, codingstyle, & include file cleanup for extable.c
@ 2005-01-07 0:09 Jesse Barnes
2005-01-07 0:19 ` [PATCH] long line, codingstyle, & include cleanups for numa.c Jesse Barnes
0 siblings, 1 reply; 2+ messages in thread
From: Jesse Barnes @ 2005-01-07 0:09 UTC (permalink / raw)
To: linux-ia64
[-- Attachment #1: Type: text/plain, Size: 300 bytes --]
This small patch fixes long lines in extable.c, corrects function definitions
and removes a few unnecessary #includes.
extable.c | 46 ++++++++++++++++++++++------------------------
1 files changed, 22 insertions(+), 24 deletions(-)
Signed-off-by: Jesse Barnes <jbarnes@sgi.com>
Thanks,
Jesse
[-- Attachment #2: extable-cleanup.patch --]
[-- Type: text/plain, Size: 3432 bytes --]
===== arch/ia64/mm/extable.c 1.10 vs edited =====
--- 1.10/arch/ia64/mm/extable.c 2004-10-05 11:19:51 -07:00
+++ edited/arch/ia64/mm/extable.c 2005-01-06 15:54:10 -08:00
@@ -1,17 +1,15 @@
/*
- * Kernel exception handling table support. Derived from arch/alpha/mm/extable.c.
+ * Kernel exception handling table support. Derived from
+ * arch/alpha/mm/extable.c.
*
* Copyright (C) 1998, 1999, 2001-2002, 2004 Hewlett-Packard Co
* David Mosberger-Tang <davidm@hpl.hp.com>
*/
-
-#include <linux/config.h>
-
+#include <linux/types.h>
#include <asm/uaccess.h>
-#include <asm/module.h>
-static inline int
-compare_entries (struct exception_table_entry *l, struct exception_table_entry *r)
+static inline int compare_entries(struct exception_table_entry *l,
+ struct exception_table_entry *r)
{
u64 lip = (u64) &l->addr + l->addr;
u64 rip = (u64) &r->addr + r->addr;
@@ -24,8 +22,8 @@
return 1;
}
-static inline void
-swap_entries (struct exception_table_entry *l, struct exception_table_entry *r)
+static inline void swap_entries(struct exception_table_entry *l,
+ struct exception_table_entry *r)
{
u64 delta = (u64) r - (u64) l;
struct exception_table_entry tmp;
@@ -38,15 +36,16 @@
}
/*
- * Sort the exception table. It's usually already sorted, but there may be unordered
- * entries due to multiple text sections (such as the .init text section). Note that the
- * exception-table-entries contain location-relative addresses, which requires a bit of
- * care during sorting to avoid overflows in the offset members (e.g., it would not be
- * safe to make a temporary copy of an exception-table entry on the stack, because the
- * stack may be more than 2GB away from the exception-table).
+ * Sort the exception table. It's usually already sorted, but there may be
+ * unordered entries due to multiple text sections (such as the .init text
+ * section). Note that the exception-table-entries contain location-relative
+ * addresses, which requires a bit of care during sorting to avoid overflows in
+ * the offset members (e.g., it would not be safe to make a temporary copy of
+ * an exception-table entry on the stack, because the stack may be more than
+ * 2GB away from the exception-table).
*/
-void
-sort_extable (struct exception_table_entry *start, struct exception_table_entry *finish)
+void sort_extable(struct exception_table_entry *start,
+ struct exception_table_entry *finish)
{
struct exception_table_entry *p, *q;
@@ -57,10 +56,9 @@
swap_entries(&q[0], &q[-1]);
}
-const struct exception_table_entry *
-search_extable (const struct exception_table_entry *first,
- const struct exception_table_entry *last,
- unsigned long ip)
+const struct exception_table_entry *search_extable(
+ const struct exception_table_entry *first,
+ const struct exception_table_entry *last, unsigned long ip)
{
const struct exception_table_entry *mid;
unsigned long mid_ip;
@@ -80,8 +78,8 @@
return NULL;
}
-void
-ia64_handle_exception (struct pt_regs *regs, const struct exception_table_entry *e)
+void ia64_handle_exception(struct pt_regs *regs,
+ const struct exception_table_entry *e)
{
long fix = (u64) &e->cont + e->cont;
@@ -89,5 +87,5 @@
if (fix & 4)
regs->r9 = 0;
regs->cr_iip = fix & ~0xf;
- ia64_psr(regs)->ri = fix & 0x3; /* set continuation slot number */
+ ia64_psr(regs)->ri = fix & 0x3; /* set continuation slot number */
}
^ permalink raw reply [flat|nested] 2+ messages in thread* [PATCH] long line, codingstyle, & include cleanups for numa.c
2005-01-07 0:09 [PATCH] long line, codingstyle, & include file cleanup for extable.c Jesse Barnes
@ 2005-01-07 0:19 ` Jesse Barnes
0 siblings, 0 replies; 2+ messages in thread
From: Jesse Barnes @ 2005-01-07 0:19 UTC (permalink / raw)
To: linux-ia64
[-- Attachment #1: Type: text/plain, Size: 148 bytes --]
Remove a bunch of unused #includes, fix long lines, and fixup codingstyle in
numa.c.
Signed-off-by: Jesse Barnes <jbarnes@sgi.com>
Thanks,
Jesse
[-- Attachment #2: numa-cleanup.patch --]
[-- Type: text/plain, Size: 1423 bytes --]
===== arch/ia64/mm/numa.c 1.9 vs edited =====
--- 1.9/arch/ia64/mm/numa.c 2004-10-28 00:36:29 -07:00
+++ edited/arch/ia64/mm/numa.c 2005-01-06 16:00:32 -08:00
@@ -6,21 +6,14 @@
* This file contains NUMA specific variables and functions which can
* be split away from DISCONTIGMEM and are used on NUMA machines with
* contiguous memory.
- *
+ *
* 2002/08/07 Erich Focht <efocht@ess.nec.de>
*/
-
-#include <linux/config.h>
-#include <linux/cpu.h>
-#include <linux/kernel.h>
-#include <linux/mm.h>
-#include <linux/node.h>
-#include <linux/init.h>
-#include <linux/bootmem.h>
+#include <linux/numa.h>
+#include <linux/threads.h>
#include <asm/mmzone.h>
#include <asm/numa.h>
-
/*
* The following structures are usually initialized by ACPI or
* similar mechanisms and describe the NUMA characteristics of the machine.
@@ -35,15 +28,15 @@
u8 numa_slit[MAX_NUMNODES * MAX_NUMNODES];
/* Identify which cnode a physical address resides on */
-int
-paddr_to_nid(unsigned long paddr)
+int paddr_to_nid(unsigned long paddr)
{
- int i;
+ int i;
for (i = 0; i < num_node_memblks; i++)
if (paddr >= node_memblk[i].start_paddr &&
paddr < node_memblk[i].start_paddr + node_memblk[i].size)
break;
- return (i < num_node_memblks) ? node_memblk[i].nid : (num_node_memblks ? -1 : 0);
+ return (i < num_node_memblks) ? node_memblk[i].nid :
+ (num_node_memblks ? -1 : 0);
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-01-07 0:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-07 0:09 [PATCH] long line, codingstyle, & include file cleanup for extable.c Jesse Barnes
2005-01-07 0:19 ` [PATCH] long line, codingstyle, & include cleanups for numa.c Jesse Barnes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox