lkml.org 
[lkml]   [2000]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] more __init in network drivers
On Thu, 13 Jul 2000, Andrzej Krzysztofowicz wrote:

> diff -u --recursive linux-2.4test4-6/drivers/net/3c505.c linux/drivers/net/3c505.c
> --- linux-2.4test4-6/drivers/net/3c505.c Tue May 2 21:40:58 2000
> +++ linux/drivers/net/3c505.c Thu Jul 13 12:57:58 2000
> @@ -130,15 +130,16 @@
> #define INVALID_PCB_MSG(len) \
> printk(invalid_pcb_msg, (len),filename,__FUNCTION__,__LINE__)
>
> -static const char *search_msg = "%s: Looking for 3c505 adapter at address %#x...";
> +static const char *search_msg __initdata =
> + "%s: Looking for 3c505 adapter at address %#x...";
>
> -static const char *stilllooking_msg = "still looking...";
> +static const char *stilllooking_msg __initdata = "still looking...";
>
> -static const char *found_msg = "found.\n";
> +static const char *found_msg __initdata = "found.\n";
>
> -static const char *notfound_msg = "not found (reason = %d)\n";
> +static const char *notfound_msg __initdata = "not found (reason = %d)\n";
>
> -static const char *couldnot_msg = "%s: 3c505 not found\n";
> +static const char *couldnot_msg __initdata = "%s: 3c505 not found\n";

Just a short sidenote. If am not completely mistaken, these changes just
move the memory for the pointer (4 byte on intel) into the .init.data
section. You have to change it like this

-static char *text = "foo";
+static char text[] __initdata = "foo";

to move also the string itself into init section.

Matze

--
Matthias Hanisch mailto:matze@camline.com phone: +49 8137 935-219


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

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:1.642 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site