Linux EXT4 FS development
 help / color / mirror / Atom feed
From: Jesper Juhl <jj@chaosbits.net>
To: Li Zefan <lizf@cn.fujitsu.com>
Cc: Wang Sheng-Hui <shhuiw@gmail.com>, Theodore Ts'o <tytso@mit.edu>,
	Jan Kara <jack@suse.cz>,
	linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] jbd/jbd2: add pointer type conversion on void *arg from void * to journal_t * explicitly in kjournald/kjournald2
Date: Wed, 3 Aug 2011 07:38:43 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LNX.2.00.1108030737020.4521@swampdragon.chaosbits.net> (raw)
In-Reply-To: <4E38AC92.4090501@cn.fujitsu.com>

On Wed, 3 Aug 2011, Li Zefan wrote:

> 09:58, Wang Sheng-Hui wrote:
> > The patch is against 3.0
> > 
> > The arg of kjournald/kjournald2 is void *, and points to type
> > journal_t. We should convert it to journal_t * explicitly in
> > the kjournald/kjournald2 function body.
> > 
> 
> Why?
> 
> Implicit convertion from void * to foo * is ok. Did the compiler
> complain about this to you?
> 

Not only is it perfectly OK to rely on the implicit conversion, a lot of 
work has gone into actively removing such unneeded explicit casts over the 
years, so let's not introduce new ones.

-- 
Jesper Juhl <jj@chaosbits.net>       http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.


      parent reply	other threads:[~2011-08-03  5:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-03  1:58 [PATCH] jbd/jbd2: add pointer type conversion on void *arg from void * to journal_t * explicitly in kjournald/kjournald2 Wang Sheng-Hui
2011-08-03  2:04 ` Li Zefan
2011-08-03  2:17   ` Wang Sheng-Hui
2011-08-03  2:31     ` Li Zefan
2011-08-03  2:52     ` Américo Wang
2011-08-03  2:55       ` Wang Sheng-Hui
2011-08-03  3:24     ` Arnaud Lacombe
2011-08-03  5:38   ` Jesper Juhl [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=alpine.LNX.2.00.1108030737020.4521@swampdragon.chaosbits.net \
    --to=jj@chaosbits.net \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=shhuiw@gmail.com \
    --cc=tytso@mit.edu \
    /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