* OMAP: small patch fixes "fs/jffs2/malloc.c:126: error: dereferencing pointer to incomplete type"
@ 2006-12-27 20:39 Ragner N Magalhães
2006-12-28 6:48 ` Dirk Behme
0 siblings, 1 reply; 3+ messages in thread
From: Ragner N Magalhães @ 2006-12-27 20:39 UTC (permalink / raw)
To: linux-omap-open-source
[-- Attachment #1: Type: text/plain, Size: 313 bytes --]
Hi all,
this is other small patch that fixes this error below
fs/jffs2/malloc.c: In function 'jffs2_alloc_full_dirent':
fs/jffs2/malloc.c:126: error: dereferencing pointer to incomplete type
Best regards,
--
Ragner N Magalhães
Instituto Nokia de Tecnologia (INdT) - OSMRC
E-mail: ragner.magalhaes@indt.org.br
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch-malloc_c-incomplete_type.diff --]
[-- Type: text/x-patch; name=patch-malloc_c-incomplete_type.diff; charset=ANSI_X3.4-1968, Size: 599 bytes --]
This patch fixes "error: dereferencing pointer to incomplete type" in fs/jffs2/malloc.c
Signed-off-by: Ragner Magalhães <ragner.magalhes@indt.org.br>
---
Index: 2.6-dev/fs/jffs2/malloc.c
===================================================================
--- 2.6-dev.orig/fs/jffs2/malloc.c 2006-12-27 10:53:09.000000000 -0400
+++ 2.6-dev/fs/jffs2/malloc.c 2006-12-27 15:20:15.000000000 -0400
@@ -15,6 +15,7 @@
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/jffs2.h>
+#include <linux/sched.h>
#include "nodelist.h"
/* These are initialised to NULL in the kernel startup code.
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: OMAP: small patch fixes "fs/jffs2/malloc.c:126: error: dereferencing pointer to incomplete type"
2006-12-27 20:39 OMAP: small patch fixes "fs/jffs2/malloc.c:126: error: dereferencing pointer to incomplete type" Ragner N Magalhães
@ 2006-12-28 6:48 ` Dirk Behme
[not found] ` <25c21ceb0612280333h55488c55le0523c31c204e206@mail.gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Dirk Behme @ 2006-12-28 6:48 UTC (permalink / raw)
To: Ragner N Magalhães; +Cc: linux-omap-open-source
Ragner N Magalhães wrote:
> Hi all,
> this is other small patch that fixes this error below
>
> fs/jffs2/malloc.c: In function 'jffs2_alloc_full_dirent':
> fs/jffs2/malloc.c:126: error: dereferencing pointer to incomplete type
Hmh. For me it looks like using recent git on OSK
fs/jffs2/malloc.c compiles without any issues.
For me, jffs2_alloc_full_dirent() is:
struct jffs2_full_dirent *jffs2_alloc_full_dirent(int namesize)
{
struct jffs2_full_dirent *ret;
ret = kmalloc(sizeof(struct jffs2_full_dirent) + namesize,
GFP_KERNEL);
126: dbg_memalloc("%p\n", ret);
return ret;
}
with line 126 being dbg_memalloc("%p\n", ret). What's wrong
here that should be fixed by additional linux/sched.h?
Dirk
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: OMAP: small patch fixes "fs/jffs2/malloc.c:126: error: dereferencing pointer to incomplete type"
[not found] ` <25c21ceb0612280333h55488c55le0523c31c204e206@mail.gmail.com>
@ 2006-12-28 11:46 ` Dirk Behme
0 siblings, 0 replies; 3+ messages in thread
From: Dirk Behme @ 2006-12-28 11:46 UTC (permalink / raw)
To: ®agner; +Cc: OMAP-Linux
®agner wrote:
> The additional linux/sched.h fixes the wrong caused by
> dbg_memalloc("%p\n", ret); in
> line 126,defined in fs/jffs2/debug.h line 168 , that is an
> JFFS2_DEBUG(fmt, ##__VA_ARGS__),defined in fs/jffs2/debug.h line 101.
>
> #define JFFS2_DEBUG(fmt, ...) \
> do { \
> printk(JFFS2_DBG_MSG_PREFIX \
> " (%d) %s: " fmt, current->pid, \
> __FUNCTION__ , ##__VA_ARGS__); \
> } while(0)
>
> the variable "current" is defined in linux/sched.h, the message "error:
> dereferencing pointer to incomplete type"
> is caused because this.
For me it compiles without any issues. I wonder if the error
happens only with some debugging enabled?
Anyway, I think fixes in fs/jffs2/malloc.c should go to
JFFS2 maintainers.
Dirk
> On 12/28/06, *Dirk Behme* <dirk.behme@googlemail.com
> <mailto:dirk.behme@googlemail.com> > wrote:
>
> Ragner N Magalhães wrote:
> > Hi all,
> > this is other small patch that fixes this error below
> >
> > fs/jffs2/malloc.c: In function 'jffs2_alloc_full_dirent':
> > fs/jffs2/malloc.c:126: error: dereferencing pointer to incomplete
> type
>
> Hmh. For me it looks like using recent git on OSK
> fs/jffs2/malloc.c compiles without any issues.
>
> For me, jffs2_alloc_full_dirent() is:
>
> struct jffs2_full_dirent *jffs2_alloc_full_dirent(int namesize)
> {
> struct jffs2_full_dirent *ret;
> ret = kmalloc(sizeof(struct jffs2_full_dirent) + namesize,
> GFP_KERNEL);
> 126: dbg_memalloc("%p\n", ret);
> return ret;
> }
>
> with line 126 being dbg_memalloc("%p\n", ret). What's wrong
> here that should be fixed by additional linux/sched.h?
>
> Dirk
>
>
>
>
> --
> Ragner N Magalhães
> Instituto Nokia de Tecnologia (INdT) - OSMRC
> E-mail: ragner.magalhaes@indt.org.br <mailto:ragner.magalhaes@indt.org.br>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-12-28 11:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-27 20:39 OMAP: small patch fixes "fs/jffs2/malloc.c:126: error: dereferencing pointer to incomplete type" Ragner N Magalhães
2006-12-28 6:48 ` Dirk Behme
[not found] ` <25c21ceb0612280333h55488c55le0523c31c204e206@mail.gmail.com>
2006-12-28 11:46 ` Dirk Behme
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox