[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120723105819.GA4455@mwanda>
Date: Mon, 23 Jul 2012 13:58:19 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Nathan Zimmer <nzimmer@....com>
Cc: akpm@...ux-foundation.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Christoph Lameter <cl@...ux.com>,
Nick Piggin <npiggin@...il.com>,
Hugh Dickins <hughd@...gle.com>,
Lee Schermerhorn <lee.schermerhorn@...com>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Rik van Riel <riel@...hat.com>
Subject: Re: [PATCH 2/2 v5][resend] tmpfs: interleave the starting node of
/dev/shmem
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 ‘shmem_interleave’:
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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists