Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933351AbZLKBep (ORCPT ); Thu, 10 Dec 2009 20:34:45 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933337AbZLKBem (ORCPT ); Thu, 10 Dec 2009 20:34:42 -0500 Received: from waste.org ([173.11.57.241]:37069 "EHLO waste.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933333AbZLKBej (ORCPT ); Thu, 10 Dec 2009 20:34:39 -0500 Subject: Re: [PATCH] timeriomem-rng.c: use resource_size() From: Matt Mackall To: H Hartley Sweeten Cc: kernel list , Alexander Clouter , Herbert Xu In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Date: Thu, 10 Dec 2009 19:34:43 -0600 Message-ID: <1260495283.24459.1225.camel@calx> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1551 Lines: 45 On Thu, 2009-12-10 at 20:16 -0500, H Hartley Sweeten wrote: > Use resource_size() for ioremap. > > Signed-off-by: H Hartley Sweeten > Cc: Alexander Clouter (Generally speaking, it's best to cc: obscure stuff to a maintainer.) Looks good to me. Herbert? Signed-off-by: Matt Mackall > --- > > diff --git a/drivers/char/hw_random/timeriomem-rng.c b/drivers/char/hw_random/timeriomem-rng.c > index a94e930..a8428e6 100644 > --- a/drivers/char/hw_random/timeriomem-rng.c > +++ b/drivers/char/hw_random/timeriomem-rng.c > @@ -100,8 +100,7 @@ static int __devinit timeriomem_rng_probe(struct platform_device *pdev) > > timeriomem_rng_data = pdev->dev.platform_data; > > - timeriomem_rng_data->address = ioremap(res->start, > - res->end - res->start + 1); > + timeriomem_rng_data->address = ioremap(res->start, resource_size(res)); > if (!timeriomem_rng_data->address) > return -EIO; > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ -- http://selenic.com : development and support for Mercurial and Linux -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/