* [2.6 patch] uninline nfsd4_op_name()
@ 2008-08-08 16:26 Adrian Bunk
[not found] ` <20080808162642.GG14495-re2QNgSbS3j4D6uPqz5PAwR5/fbUUdgG@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Adrian Bunk @ 2008-08-08 16:26 UTC (permalink / raw)
To: Benny Halevy, J. Bruce Fields, Linus Torvalds
Cc: neilb, linux-nfs, linux-kernel, Andrew Morton
There doesn't seem to be a compelling reason why nfsd4_op_name() is
marked as "inline":
It's only used in a dprintk(), and as long as it has only one caller
non-ancient gcc versions anyway inline it automatically.
This patch fixes the following compile error with gcc 3.4:
<-- snip -->
...
CC fs/nfsd/nfs4proc.o
nfs4proc.c: In function `nfsd4_proc_compound':
nfs4proc.c:854: sorry, unimplemented: inlining failed in call to
nfs4proc.c:897: sorry, unimplemented: called from here
make[3]: *** [fs/nfsd/nfs4proc.o] Error 1
<-- snip -->
Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
---
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -851,7 +851,7 @@ struct nfsd4_operation {
static struct nfsd4_operation nfsd4_ops[];
-static inline char *nfsd4_op_name(unsigned opnum);
+static char *nfsd4_op_name(unsigned opnum);
/*
* COMPOUND call.
@@ -1116,8 +1116,7 @@ static struct nfsd4_operation nfsd4_ops[OP_RELEASE_LOCKOWNER+1] = {
},
};
-static inline char *
-nfsd4_op_name(unsigned opnum)
+static char *nfsd4_op_name(unsigned opnum)
{
if (opnum < ARRAY_SIZE(nfsd4_ops))
return nfsd4_ops[opnum].op_name;
^ permalink raw reply [flat|nested] 6+ messages in thread[parent not found: <20080808162642.GG14495-re2QNgSbS3j4D6uPqz5PAwR5/fbUUdgG@public.gmane.org>]
* Re: [2.6 patch] uninline nfsd4_op_name() [not found] ` <20080808162642.GG14495-re2QNgSbS3j4D6uPqz5PAwR5/fbUUdgG@public.gmane.org> @ 2008-08-08 18:25 ` Linus Torvalds [not found] ` <alpine.LFD.1.10.0808081120570.3462-nfNrOhbfy2R17+2ddN/4kux8cNe9sq/dYPYVAmT7z5s@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Linus Torvalds @ 2008-08-08 18:25 UTC (permalink / raw) To: Adrian Bunk Cc: Benny Halevy, J. Bruce Fields, neilb, linux-nfs, linux-kernel, Andrew Morton On Fri, 8 Aug 2008, Adrian Bunk wrote: > > There doesn't seem to be a compelling reason why nfsd4_op_name() is > marked as "inline": It should also return a "const char *", I think. Since it does. Linus ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <alpine.LFD.1.10.0808081120570.3462-nfNrOhbfy2R17+2ddN/4kux8cNe9sq/dYPYVAmT7z5s@public.gmane.org>]
* Re: [2.6 patch] uninline nfsd4_op_name() [not found] ` <alpine.LFD.1.10.0808081120570.3462-nfNrOhbfy2R17+2ddN/4kux8cNe9sq/dYPYVAmT7z5s@public.gmane.org> @ 2008-08-10 11:32 ` Benny Halevy 2008-08-11 3:03 ` J. Bruce Fields 0 siblings, 1 reply; 6+ messages in thread From: Benny Halevy @ 2008-08-10 11:32 UTC (permalink / raw) To: Linus Torvalds, Adrian Bunk Cc: J. Bruce Fields, neilb, linux-nfs, linux-kernel, Andrew Morton Linus Torvalds wrote: > > On Fri, 8 Aug 2008, Adrian Bunk wrote: >> There doesn't seem to be a compelling reason why nfsd4_op_name() is >> marked as "inline": Agreed. > > It should also return a "const char *", I think. > > Since it does. Right. > > Linus Thanks for picking this up, Benny ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [2.6 patch] uninline nfsd4_op_name() 2008-08-10 11:32 ` Benny Halevy @ 2008-08-11 3:03 ` J. Bruce Fields 2008-08-11 8:47 ` Benny Halevy 0 siblings, 1 reply; 6+ messages in thread From: J. Bruce Fields @ 2008-08-11 3:03 UTC (permalink / raw) To: Benny Halevy Cc: Linus Torvalds, Adrian Bunk, neilb, linux-nfs, linux-kernel, Andrew Morton On Sun, Aug 10, 2008 at 02:32:31PM +0300, Benny Halevy wrote: > Linus Torvalds wrote: > > > > On Fri, 8 Aug 2008, Adrian Bunk wrote: > >> There doesn't seem to be a compelling reason why nfsd4_op_name() is > >> marked as "inline": > > Agreed. > > > > > It should also return a "const char *", I think. > > > > Since it does. > > Right. OK, I modified that to add "const" as Linus suggests, and applied to git://linux-nfs.org/~bfields/linux.git for-2.6.27 Thanks to everyone. --b. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [2.6 patch] uninline nfsd4_op_name() 2008-08-11 3:03 ` J. Bruce Fields @ 2008-08-11 8:47 ` Benny Halevy 2008-08-11 15:39 ` J. Bruce Fields 0 siblings, 1 reply; 6+ messages in thread From: Benny Halevy @ 2008-08-11 8:47 UTC (permalink / raw) To: J. Bruce Fields Cc: Linus Torvalds, Adrian Bunk, neilb, linux-nfs, linux-kernel, Andrew Morton On Aug. 11, 2008, 6:03 +0300, "J. Bruce Fields" <bfields@fieldses.org> wrote: > On Sun, Aug 10, 2008 at 02:32:31PM +0300, Benny Halevy wrote: >> Linus Torvalds wrote: >>> On Fri, 8 Aug 2008, Adrian Bunk wrote: >>>> There doesn't seem to be a compelling reason why nfsd4_op_name() is >>>> marked as "inline": >> Agreed. >> >>> It should also return a "const char *", I think. >>> >>> Since it does. >> Right. > > OK, I modified that to add "const" as Linus suggests, and applied to > > git://linux-nfs.org/~bfields/linux.git for-2.6.27 > > Thanks to everyone. > > --b. Bruce, Linus already corrected and merged Adrian's patch in linux-2.6/master as commit f1c7f79b6ab4f7ada002a0fae47f462ede6b6857 Benny ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [2.6 patch] uninline nfsd4_op_name() 2008-08-11 8:47 ` Benny Halevy @ 2008-08-11 15:39 ` J. Bruce Fields 0 siblings, 0 replies; 6+ messages in thread From: J. Bruce Fields @ 2008-08-11 15:39 UTC (permalink / raw) To: Benny Halevy Cc: Linus Torvalds, Adrian Bunk, neilb, linux-nfs, linux-kernel, Andrew Morton On Mon, Aug 11, 2008 at 11:47:44AM +0300, Benny Halevy wrote: > On Aug. 11, 2008, 6:03 +0300, "J. Bruce Fields" <bfields@fieldses.org> wrote: > > On Sun, Aug 10, 2008 at 02:32:31PM +0300, Benny Halevy wrote: > >> Linus Torvalds wrote: > >>> On Fri, 8 Aug 2008, Adrian Bunk wrote: > >>>> There doesn't seem to be a compelling reason why nfsd4_op_name() is > >>>> marked as "inline": > >> Agreed. > >> > >>> It should also return a "const char *", I think. > >>> > >>> Since it does. > >> Right. > > > > OK, I modified that to add "const" as Linus suggests, and applied to > > > > git://linux-nfs.org/~bfields/linux.git for-2.6.27 > > > > Thanks to everyone. > > > > --b. > > Bruce, Linus already corrected and merged Adrian's patch in > linux-2.6/master as commit f1c7f79b6ab4f7ada002a0fae47f462ede6b6857 Oops, I thought I'd checked for that, but somehow I overlooked that commit. Thanks.--b. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-08-11 15:39 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-08 16:26 [2.6 patch] uninline nfsd4_op_name() Adrian Bunk
[not found] ` <20080808162642.GG14495-re2QNgSbS3j4D6uPqz5PAwR5/fbUUdgG@public.gmane.org>
2008-08-08 18:25 ` Linus Torvalds
[not found] ` <alpine.LFD.1.10.0808081120570.3462-nfNrOhbfy2R17+2ddN/4kux8cNe9sq/dYPYVAmT7z5s@public.gmane.org>
2008-08-10 11:32 ` Benny Halevy
2008-08-11 3:03 ` J. Bruce Fields
2008-08-11 8:47 ` Benny Halevy
2008-08-11 15:39 ` J. Bruce Fields
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox