From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by ozlabs.org (Postfix) with ESMTP id 8BAA3DDECF for ; Fri, 8 Jun 2007 00:03:39 +1000 (EST) From: Arnd Bergmann To: linuxppc-dev@ozlabs.org Subject: Re: MPC8349ea Random Number Generator driver Date: Thu, 7 Jun 2007 16:03:14 +0200 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Message-Id: <200706071603.15837.arnd@arndb.de> Cc: sl@powerlinux.fr, Philippe Lachenal List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thursday 07 June 2007, Philippe Lachenal wrote: > +- > +-=A0=A0=A0=A0=A0=A0return ioremap(res.start, 1 + res.end - res.start); > +-} >=20 >=20 > why is there a =A01+ res.end-res.start ? Am I wrong in not adding one in = my=20 > code ? >=20 Yes. The res.start is the first byte in the area, res.end is the last one. =46or example, in a two byte range, start could be 100, and end 101. res.end - res.start would therefore be one, not two as ioremap expects. Arnd <><