public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Cc: kernel-janitors@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [patch] f2fs: dereferencing an ERR_PTR
Date: Thu, 23 May 2013 10:12:40 +0000	[thread overview]
Message-ID: <20130523101240.GG30128@mwanda> (raw)
In-Reply-To: <20130523100213.GA19107@elgon.mountain>

Btw, Linus's new Sparse changes don't like the f2fs's NEW_ADDR
macro.

#define NEW_ADDR                -1U

We use it like this:

	block_t src, dest;

	if (src != dest && dest != NEW_ADDR && dest != NULL_ADDR) {

block_t is 64 bits so probably the macro should probably be:

#define NEW_ADDR               ((block_t)-1)

I'm not able to test this so there may be some reason why changing
this breaks something.  In that case we could do:

#define NEW_ADDR               ((u32)(block_t)-1) /* explanation */

regards,
dan carpenter


  reply	other threads:[~2013-05-23 10:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-23 10:02 [patch] f2fs: dereferencing an ERR_PTR Dan Carpenter
2013-05-23 10:12 ` Dan Carpenter [this message]
2013-05-24  3:46   ` Jaegeuk Kim
2013-05-24 11:23     ` Dan Carpenter
2013-05-24 11:32       ` Jaegeuk Kim
2013-05-26 15:05 ` walter harms
2013-05-26 20:41   ` Dan Carpenter
2013-05-27  7:13     ` walter harms

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=20130523101240.GG30128@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=jaegeuk.kim@samsung.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox