linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: kbuild test robot <fengguang.wu@intel.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
	WeiWei Wang <wangww631@huawei.com>,
	Linux Memory Management List <linux-mm@kvack.org>,
	kbuild-all@01.org
Subject: Re: [mmotm:master 59/223] fs/ocfs2/aops.c:654:14: warning: comparison of distinct pointer types lacks a cast
Date: Mon, 27 Oct 2014 13:18:16 -0700	[thread overview]
Message-ID: <20141027131816.502d8e2506843e8951f5933a@linux-foundation.org> (raw)
In-Reply-To: <5449f4e7.+mDOGzw+O8rZdQFO%fengguang.wu@intel.com>

On Fri, 24 Oct 2014 14:42:47 +0800 kbuild test robot <fengguang.wu@intel.com> wrote:

> tree:   git://git.cmpxchg.org/linux-mmotm.git master
> head:   bb578c9c690d8a5525dafc52d442af18aee45280
> commit: 5a9558722362888f158e60e5126296c867eb4a8f [59/223] ocfs2-add-and-remove-inode-in-orphan-dir-in-ocfs2_direct_io-fix
> config: sh-allyesconfig (attached as .config)
> reproduce:
>   wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
>   chmod +x ~/bin/make.cross
>   git checkout 5a9558722362888f158e60e5126296c867eb4a8f
>   # save the attached .config to linux build tree
>   make.cross ARCH=sh 
> 
> All warnings:
> 
>    fs/ocfs2/aops.c: In function 'ocfs2_direct_IO_write':
> >> fs/ocfs2/aops.c:654:14: warning: comparison of distinct pointer types lacks a cast [enabled by default]
> 
> vim +654 fs/ocfs2/aops.c
> 
>    638		struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
>    639		struct buffer_head *di_bh = NULL;
>    640		size_t count = iter->count;
>    641		journal_t *journal = osb->journal->j_journal;
>    642		u32 p_cpos = 0;
>    643		u32 v_cpos = ocfs2_clusters_for_bytes(osb->sb, offset);
>    644		u32 zero_len;
>    645		int cluster_align;
>    646		loff_t final_size = offset + count;
>    647		int append_write = offset >= i_size_read(inode) ? 1 : 0;
>    648		unsigned int num_clusters = 0;
>    649		unsigned int ext_flags = 0;
>    650	
>    651		{
>    652			loff_t o = offset;
>    653	
>  > 654			zero_len = do_div(o, 1 << osb->s_clustersize_bits);
>    655			cluster_align = !!zero_len;
>    656		}

hm, yes.

--- a/fs/ocfs2/aops.c~ocfs2-add-and-remove-inode-in-orphan-dir-in-ocfs2_direct_io-fix-fix
+++ a/fs/ocfs2/aops.c
@@ -649,7 +649,7 @@ static ssize_t ocfs2_direct_IO_write(str
 	unsigned int ext_flags = 0;
 
 	{
-		loff_t o = offset;
+		u64 o = offset;
 
 		zero_len = do_div(o, 1 << osb->s_clustersize_bits);
 		cluster_align = !!zero_len;
_

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2014-10-27 20:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-24  6:42 kbuild test robot
2014-10-27 20:18 ` Andrew Morton [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=20141027131816.502d8e2506843e8951f5933a@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=fengguang.wu@intel.com \
    --cc=hannes@cmpxchg.org \
    --cc=kbuild-all@01.org \
    --cc=linux-mm@kvack.org \
    --cc=wangww631@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox