All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dirk Behme <dirk.behme@googlemail.com>
To: ®agner <ragner.magalhaes@gmail.com>
Cc: OMAP-Linux <linux-omap-open-source@linux.omap.com>
Subject: Re: OMAP: small patch fixes "fs/jffs2/malloc.c:126: error: dereferencing pointer to incomplete type"
Date: Thu, 28 Dec 2006 12:46:52 +0100	[thread overview]
Message-ID: <4593AEAC.4080207@gmail.com> (raw)
In-Reply-To: <25c21ceb0612280333h55488c55le0523c31c204e206@mail.gmail.com>

®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>

      parent reply	other threads:[~2006-12-28 11:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4593AEAC.4080207@gmail.com \
    --to=dirk.behme@googlemail.com \
    --cc=linux-omap-open-source@linux.omap.com \
    --cc=ragner.magalhaes@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.