Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

[-mm patch] kernel/power/main.c: make code static

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


bunk at stusta

Jul 1, 2007, 1:23 PM

Post #1 of 2 (208 views)
Permalink
[-mm patch] kernel/power/main.c: make code static

On Thu, Jun 28, 2007 at 03:43:21AM -0700, Andrew Morton wrote:
>...
> Changes since 2.6.22-rc4-mm2:
>...
> +pm-reduce-code-duplication-between-mainc-and-userc.patch
>...
> PM updates
>...


Some code can now become static.

Signed-off-by: Adrian Bunk <bunk[at]stusta.de>

---

include/linux/pm.h | 1 -
kernel/power/main.c | 4 ++--
kernel/power/power.h | 1 -
3 files changed, 2 insertions(+), 4 deletions(-)

--- linux-2.6.22-rc6-mm1/kernel/power/power.h.old 2007-07-01 00:21:34.000000000 +0200
+++ linux-2.6.22-rc6-mm1/kernel/power/power.h 2007-07-01 00:21:41.000000000 +0200
@@ -177,7 +177,6 @@
unsigned int, char *);

/* kernel/power/main.c */
-extern int suspend_enter(suspend_state_t state);
extern int suspend_devices_and_enter(suspend_state_t state);
extern struct blocking_notifier_head pm_chain_head;

--- linux-2.6.22-rc6-mm1/include/linux/pm.h.old 2007-07-01 00:22:53.000000000 +0200
+++ linux-2.6.22-rc6-mm1/include/linux/pm.h 2007-07-01 00:23:04.000000000 +0200
@@ -138,7 +138,6 @@
* @pm_ops: The new power management operations to set.
*/
extern void pm_set_ops(struct pm_ops *pm_ops);
-extern struct pm_ops *pm_ops;
extern int pm_suspend(suspend_state_t state);

extern int pm_valid_only_mem(suspend_state_t state);
--- linux-2.6.22-rc6-mm1/kernel/power/main.c.old 2007-07-01 00:21:49.000000000 +0200
+++ linux-2.6.22-rc6-mm1/kernel/power/main.c 2007-07-01 00:23:11.000000000 +0200
@@ -31,7 +31,7 @@

DEFINE_MUTEX(pm_mutex);

-struct pm_ops *pm_ops;
+static struct pm_ops *pm_ops;

/**
* pm_set_ops - Set the global power method table.
@@ -127,7 +127,7 @@
*
* This function should be called after devices have been suspended.
*/
-int suspend_enter(suspend_state_t state)
+static int suspend_enter(suspend_state_t state)
{
int error = 0;


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo[at]vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


rjw at sisk

Jul 1, 2007, 4:12 PM

Post #2 of 2 (192 views)
Permalink
Re: [-mm patch] kernel/power/main.c: make code static [In reply to]

On Sunday, 1 July 2007 22:23, Adrian Bunk wrote:
> On Thu, Jun 28, 2007 at 03:43:21AM -0700, Andrew Morton wrote:
> >...
> > Changes since 2.6.22-rc4-mm2:
> >...
> > +pm-reduce-code-duplication-between-mainc-and-userc.patch
> >...
> > PM updates
> >...
>
>
> Some code can now become static.
>
> Signed-off-by: Adrian Bunk <bunk[at]stusta.de>

This clashes and partially overlaps with some patches that I have in the works.

Greetings,
Rafael


--
"Premature optimization is the root of all evil." - Donald Knuth
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo[at]vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.