* [PATCH] staging: lustre: ptlrpc: add missing include directive
@ 2015-08-14 9:57 Ioan-Adrian Ratiu
2015-08-15 1:50 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Ioan-Adrian Ratiu @ 2015-08-14 9:57 UTC (permalink / raw)
To: andreas.dilger, gregkh; +Cc: HPDD-discuss, devel, linux-kernel
Without including ptlrpc_internal.h, GCC gives prototype warnings
"pack_generic.c:642:5: warning: no previous prototype for ..."
and sparse also complains "pack_generic.c:642:5: warning: symbol
'lustre_unpack_req_ptlrpc_body' was not declared. ..."
Signed-off-by: Ioan-Adrian Ratiu <adi@adirat.com>
---
drivers/staging/lustre/lustre/ptlrpc/pack_generic.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
index 2787bfd..84937ad 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
@@ -52,6 +52,8 @@
#include "../include/obd_cksum.h"
#include "../include/lustre/ll_fiemap.h"
+#include "ptlrpc_internal.h"
+
static inline int lustre_msg_hdr_size_v2(int count)
{
return cfs_size_round(offsetof(struct lustre_msg_v2,
--
2.1.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: lustre: ptlrpc: add missing include directive
2015-08-14 9:57 [PATCH] staging: lustre: ptlrpc: add missing include directive Ioan-Adrian Ratiu
@ 2015-08-15 1:50 ` Greg KH
2015-08-15 8:13 ` Ioan-Adrian Ratiu
0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2015-08-15 1:50 UTC (permalink / raw)
To: Ioan-Adrian Ratiu; +Cc: andreas.dilger, HPDD-discuss, devel, linux-kernel
On Fri, Aug 14, 2015 at 12:57:06PM +0300, Ioan-Adrian Ratiu wrote:
> Without including ptlrpc_internal.h, GCC gives prototype warnings
> "pack_generic.c:642:5: warning: no previous prototype for ..."
It does? What version of gcc give you that, I don't see that here.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: lustre: ptlrpc: add missing include directive
2015-08-15 1:50 ` Greg KH
@ 2015-08-15 8:13 ` Ioan-Adrian Ratiu
2015-08-15 10:11 ` [HPDD-discuss] " Drokin, Oleg
2015-08-15 16:11 ` Greg KH
0 siblings, 2 replies; 5+ messages in thread
From: Ioan-Adrian Ratiu @ 2015-08-15 8:13 UTC (permalink / raw)
To: Greg KH; +Cc: andreas.dilger, HPDD-discuss, devel, linux-kernel
On Fri, 14 Aug 2015 18:50:24 -0700
Greg KH <gregkh@linuxfoundation.org> wrote:
> On Fri, Aug 14, 2015 at 12:57:06PM +0300, Ioan-Adrian Ratiu wrote:
> > Without including ptlrpc_internal.h, GCC gives prototype warnings
> > "pack_generic.c:642:5: warning: no previous prototype for ..."
>
> It does? What version of gcc give you that, I don't see that here.
>
Yes, but it's a non-default warning (-Wmissing-prototypes)
$ gcc --version
gcc (Gentoo 4.9.3 p1.0, pie-0.6.2) 4.9.3
When testing the above patch I've used Ubuntu Vivid Vervet's gcc
(also 4.9 I think, I don't have access to that machine right now).
To see the warn I'm adding "ccflags-y := -Wmissing-prototypes"
to a Makefile then "make SUBDIRS=..."
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [HPDD-discuss] [PATCH] staging: lustre: ptlrpc: add missing include directive
2015-08-15 8:13 ` Ioan-Adrian Ratiu
@ 2015-08-15 10:11 ` Drokin, Oleg
2015-08-15 16:11 ` Greg KH
1 sibling, 0 replies; 5+ messages in thread
From: Drokin, Oleg @ 2015-08-15 10:11 UTC (permalink / raw)
To: Ioan-Adrian Ratiu
Cc: Greg KH, <HPDD-discuss@lists.01.org>,
<devel@driverdev.osuosl.org>,
<linux-kernel@vger.kernel.org>
Hello!
On Aug 15, 2015, at 4:13 AM, Ioan-Adrian Ratiu wrote:
>>> Without including ptlrpc_internal.h, GCC gives prototype warnings
>>> "pack_generic.c:642:5: warning: no previous prototype for ..."
>> It does? What version of gcc give you that, I don't see that here.
> Yes, but it's a non-default warning (-Wmissing-prototypes)
>
> $ gcc --version
> gcc (Gentoo 4.9.3 p1.0, pie-0.6.2) 4.9.3
>
> When testing the above patch I've used Ubuntu Vivid Vervet's gcc
> (also 4.9 I think, I don't have access to that machine right now).
>
> To see the warn I'm adding "ccflags-y := -Wmissing-prototypes"
> to a Makefile then "make SUBDIRS=…"
Duh, so essentially it tells you that you have a non-static function
that lacks a previously defined prototype, but because it's
non-static, it's likely used elsewhere and the prototype might get
out of sync with the actual function definition?
I guess it's no big deal to include the ptlrpc_internal.h there
to catch potential problems like that.
Thanks.
Bye,
Oleg
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: lustre: ptlrpc: add missing include directive
2015-08-15 8:13 ` Ioan-Adrian Ratiu
2015-08-15 10:11 ` [HPDD-discuss] " Drokin, Oleg
@ 2015-08-15 16:11 ` Greg KH
1 sibling, 0 replies; 5+ messages in thread
From: Greg KH @ 2015-08-15 16:11 UTC (permalink / raw)
To: Ioan-Adrian Ratiu; +Cc: andreas.dilger, HPDD-discuss, devel, linux-kernel
On Sat, Aug 15, 2015 at 11:13:39AM +0300, Ioan-Adrian Ratiu wrote:
> On Fri, 14 Aug 2015 18:50:24 -0700
> Greg KH <gregkh@linuxfoundation.org> wrote:
>
> > On Fri, Aug 14, 2015 at 12:57:06PM +0300, Ioan-Adrian Ratiu wrote:
> > > Without including ptlrpc_internal.h, GCC gives prototype warnings
> > > "pack_generic.c:642:5: warning: no previous prototype for ..."
> >
> > It does? What version of gcc give you that, I don't see that here.
> >
>
> Yes, but it's a non-default warning (-Wmissing-prototypes)
Then you should say that, otherwise you have us worrying something is
really wrong with our build/compiler versions...
I've taken this patch, but next time please be more specific.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-08-15 16:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-14 9:57 [PATCH] staging: lustre: ptlrpc: add missing include directive Ioan-Adrian Ratiu
2015-08-15 1:50 ` Greg KH
2015-08-15 8:13 ` Ioan-Adrian Ratiu
2015-08-15 10:11 ` [HPDD-discuss] " Drokin, Oleg
2015-08-15 16:11 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome