* [PATCH] pktgen: Adds missing __init.
@ 2006-01-06 15:11 Luiz Fernando Capitulino
2006-01-06 19:04 ` Jan Engelhardt
0 siblings, 1 reply; 3+ messages in thread
From: Luiz Fernando Capitulino @ 2006-01-06 15:11 UTC (permalink / raw)
To: akpm; +Cc: robert.olsson, netdev, lkml
pktgen_find_thread() and pktgen_create_thread() are only called at
initialization time.
Signed-off-by: Luiz Capitulino <lcapitulino@mandriva.com.br>
net/core/pktgen.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 06cad2d..5eeae0d 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -2883,7 +2883,7 @@ static int pktgen_add_device(struct pktg
return add_dev_to_thread(t, pkt_dev);
}
-static struct pktgen_thread *pktgen_find_thread(const char* name)
+static struct pktgen_thread __init *pktgen_find_thread(const char* name)
{
struct pktgen_thread *t = NULL;
@@ -2900,7 +2900,7 @@ static struct pktgen_thread *pktgen_find
return t;
}
-static int pktgen_create_thread(const char* name, int cpu)
+static int __init pktgen_create_thread(const char* name, int cpu)
{
struct pktgen_thread *t = NULL;
struct proc_dir_entry *pe;
--
Luiz Fernando N. Capitulino
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] pktgen: Adds missing __init.
2006-01-06 15:11 [PATCH] pktgen: Adds missing __init Luiz Fernando Capitulino
@ 2006-01-06 19:04 ` Jan Engelhardt
2006-01-06 21:17 ` David S. Miller
0 siblings, 1 reply; 3+ messages in thread
From: Jan Engelhardt @ 2006-01-06 19:04 UTC (permalink / raw)
To: Luiz Fernando Capitulino; +Cc: akpm, robert.olsson, netdev, lkml
>diff --git a/net/core/pktgen.c b/net/core/pktgen.c
>index 06cad2d..5eeae0d 100644
>--- a/net/core/pktgen.c
>+++ b/net/core/pktgen.c
>@@ -2883,7 +2883,7 @@ static int pktgen_add_device(struct pktg
> return add_dev_to_thread(t, pkt_dev);
> }
>
>-static struct pktgen_thread *pktgen_find_thread(const char* name)
>+static struct pktgen_thread __init *pktgen_find_thread(const char* name)
I do not know what CodingStyle says about it (it is correct GCC code),
what do the others think of the more often placement of __init as in
__init static struct pktgen_thread *pktgen_find_thread(const char *name)
or
static __init struct pktgen_thread *pktgen_find_thread(const char *name)
[depending on what people like]
Jan Engelhardt
--
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] pktgen: Adds missing __init.
2006-01-06 19:04 ` Jan Engelhardt
@ 2006-01-06 21:17 ` David S. Miller
0 siblings, 0 replies; 3+ messages in thread
From: David S. Miller @ 2006-01-06 21:17 UTC (permalink / raw)
To: jengelh; +Cc: lcapitulino, akpm, robert.olsson, netdev, linux-kernel
From: Jan Engelhardt <jengelh@linux01.gwdg.de>
Date: Fri, 6 Jan 2006 20:04:13 +0100 (MET)
> >diff --git a/net/core/pktgen.c b/net/core/pktgen.c
> >index 06cad2d..5eeae0d 100644
> >--- a/net/core/pktgen.c
> >+++ b/net/core/pktgen.c
> >@@ -2883,7 +2883,7 @@ static int pktgen_add_device(struct pktg
> > return add_dev_to_thread(t, pkt_dev);
> > }
> >
> >-static struct pktgen_thread *pktgen_find_thread(const char* name)
> >+static struct pktgen_thread __init *pktgen_find_thread(const char* name)
>
> I do not know what CodingStyle says about it (it is correct GCC code),
> what do the others think of the more often placement of __init as in
> __init static struct pktgen_thread *pktgen_find_thread(const char *name)
> or
> static __init struct pktgen_thread *pktgen_find_thread(const char *name)
> [depending on what people like]
It should be right before the function name, "struct foo *" is a full
return type specification, so any other attributes should appear either
before or after that.
I'll fix this up when I apply Luis's patch.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-01-06 21:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-06 15:11 [PATCH] pktgen: Adds missing __init Luiz Fernando Capitulino
2006-01-06 19:04 ` Jan Engelhardt
2006-01-06 21:17 ` David S. Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®