linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Nathan Zimmer <nzimmer@sgi.com>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, Christoph Lameter <cl@linux.com>,
	Nick Piggin <npiggin@gmail.com>, Hugh Dickins <hughd@google.com>,
	Lee Schermerhorn <lee.schermerhorn@hp.com>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	Rik van Riel <riel@redhat.com>
Subject: Re: [PATCH 2/2 v5][resend] tmpfs: interleave the starting node of /dev/shmem
Date: Mon, 23 Jul 2012 13:58:19 +0300	[thread overview]
Message-ID: <20120723105819.GA4455@mwanda> (raw)
In-Reply-To: <1341845199-25677-3-git-send-email-nzimmer@sgi.com>

On Mon, Jul 09, 2012 at 09:46:39AM -0500, Nathan Zimmer wrote:
> +static unsigned long shmem_interleave(struct vm_area_struct *vma,
> +					unsigned long addr)
> +{
> +	unsigned long offset;
> +
> +	/* Use the vm_files prefered node as the initial offset. */
> +	offset = (unsigned long *) vma->vm_private_data;

Should this be?:
	offset = (unsigned long)vma->vm_private_data;

offset is an unsigned long, not a pointer.  ->vm_private_data is a
void pointer.

It causes a GCC warning:
mm/shmem.c: In function a??shmem_interleavea??:
mm/shmem.c:1341:9: warning: assignment makes integer from pointer without a cast [enabled by default]

> +
> +	offset += ((addr - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff;
> +
> +	return offset;
> +}
>  #endif

regards,
dan carpenter

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

  parent reply	other threads:[~2012-07-23 10:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-09 14:46 [PATCH 0/2 v5][resend] tmpfs not interleaving properly Nathan Zimmer
2012-07-09 14:46 ` [PATCH 1/2 v5][resend] shmem: provide vm_ops when also providing a mem policy Nathan Zimmer
2012-07-09 14:46   ` [PATCH 2/2 v5][resend] tmpfs: interleave the starting node of /dev/shmem Nathan Zimmer
2012-07-11  5:50     ` Cong Wang
2012-07-23 10:58     ` Dan Carpenter [this message]
2012-07-23 19:26       ` Nathan Zimmer
2012-07-25  4:38         ` Hugh Dickins
2012-07-25 14:58           ` KOSAKI Motohiro
2012-07-25 16:15           ` Nathan Zimmer

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=20120723105819.GA4455@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=hughd@google.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=lee.schermerhorn@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=npiggin@gmail.com \
    --cc=nzimmer@sgi.com \
    --cc=riel@redhat.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;
as well as URLs for NNTP newsgroup(s).