From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail137.messagelabs.com (mail137.messagelabs.com [216.82.249.19]) by kanga.kvack.org (Postfix) with ESMTP id 804996B0169 for ; Mon, 22 Aug 2011 17:50:54 -0400 (EDT) Date: Mon, 22 Aug 2011 14:50:50 -0700 From: Andrew Morton Subject: Re: [PATCH 3/4] string: introduce memchr_inv Message-Id: <20110822145050.e3471fa0.akpm@linux-foundation.org> In-Reply-To: <20110822135218.f2d9f462.akpm@linux-foundation.org> References: <1314030548-21082-1-git-send-email-akinobu.mita@gmail.com> <1314030548-21082-4-git-send-email-akinobu.mita@gmail.com> <20110822135218.f2d9f462.akpm@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Akinobu Mita , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Christoph Lameter , Pekka Enberg , Matt Mackall , Joern Engel , logfs@logfs.org, Marcin Slusarz , Eric Dumazet , linux-arch@vger.kernel.org On Mon, 22 Aug 2011 13:52:18 -0700 Andrew Morton wrote: > > + value64 = value | value << 8 | value << 16 | value << 24; > > + value64 = (value64 & 0xffffffff) | value64 << 32; > > + prefix = 8 - ((unsigned long)start) % 8; > > + > > + if (prefix) { > > + u8 *r = check_bytes8(start, value, prefix); > > + if (r) > > + return r; > > + start += prefix; > > + bytes -= prefix; > > + } > > + > > + words = bytes / 8; > > + > > + while (words) { > > + if (*(u64 *)start != value64) > > OK, problem. This will explode if passed a misaligned address on > certain (non-x86) architectures. pls ignore. As Marcin points out, I can't read. -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org