Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1207456 > unrolled thread
| Started by | Ioan-Adrian Ratiu <adi@adirat.com> |
|---|---|
| First post | 2015-08-14 12:00 +0200 |
| Last post | 2015-08-15 18:20 +0200 |
| Articles | 5 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] staging: lustre: ptlrpc: add missing include directive Ioan-Adrian Ratiu <adi@adirat.com> - 2015-08-14 12:00 +0200
Re: [PATCH] staging: lustre: ptlrpc: add missing include directive Greg KH <gregkh@linuxfoundation.org> - 2015-08-15 04:00 +0200
Re: [PATCH] staging: lustre: ptlrpc: add missing include directive Ioan-Adrian Ratiu <adi@adirat.com> - 2015-08-15 10:20 +0200
Re: [HPDD-discuss] [PATCH] staging: lustre: ptlrpc: add missing include directive "Drokin, Oleg" <oleg.drokin@intel.com> - 2015-08-15 12:20 +0200
Re: [PATCH] staging: lustre: ptlrpc: add missing include directive Greg KH <gregkh@linuxfoundation.org> - 2015-08-15 18:20 +0200
| From | Ioan-Adrian Ratiu <adi@adirat.com> |
|---|---|
| Date | 2015-08-14 12:00 +0200 |
| Subject | [PATCH] staging: lustre: ptlrpc: add missing include directive |
| Message-ID | <pXjWi-6VE-7@gated-at.bofh.it> |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2015-08-15 04:00 +0200 |
| Message-ID | <pXyVk-36l-5@gated-at.bofh.it> |
| In reply to | #1207456 |
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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Ioan-Adrian Ratiu <adi@adirat.com> |
|---|---|
| Date | 2015-08-15 10:20 +0200 |
| Message-ID | <pXER4-45W-3@gated-at.bofh.it> |
| In reply to | #1207973 |
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=..." -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | "Drokin, Oleg" <oleg.drokin@intel.com> |
|---|---|
| Date | 2015-08-15 12:20 +0200 |
| Subject | Re: [HPDD-discuss] [PATCH] staging: lustre: ptlrpc: add missing include directive |
| Message-ID | <pXGJc-6Ng-7@gated-at.bofh.it> |
| In reply to | #1208037 |
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--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2015-08-15 18:20 +0200 |
| Message-ID | <pXMlz-6Aq-3@gated-at.bofh.it> |
| In reply to | #1208037 |
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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web