linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 0/2] Fix resource size miscalculations
Date: Thu, 24 Mar 2011 22:49:05 +0000	[thread overview]
Message-ID: <1301006945.29444.15.camel@Joe-Laptop> (raw)
In-Reply-To: <cover.1300909445.git.joe@perches.com>

On Wed, 2011-03-23 at 12:55 -0700, Joe Perches wrote:
> Use resource_size a few places

Perhaps this relatively common error is too common.
It seems to be poor style.  A possible better style for
struct resource uses could be inline function(s) like:

static inline void __iomem *resource_ioremap(struct resource *r)
{
	return ioremap(r->start, resource_size(r));
}

and maybe

static inline struct resource *
resource_request_region(struct resource *r, const char *name)
{
	return __request_region(&ioport_resource, r->start, resource_size(r), name, 0);
}



      parent reply	other threads:[~2011-03-24 22:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-23 19:55 [PATCH 0/2] Fix resource size miscalculations Joe Perches
2011-03-23 19:55 ` [trivial PATCH 1/2] treewide: Fix iomap " Joe Perches
2011-03-23 20:11   ` Linus Walleij
2011-03-23 20:29   ` Florian Fainelli
2011-03-23 22:42   ` David Brown
2011-03-24  8:29   ` [trivial PATCH 1/2] treewide: Fix iomap resource size Wim Van Sebroeck
2011-03-24 22:27   ` Ralf Baechle
2011-04-10 15:09   ` Jiri Kosina
2011-03-24 22:49 ` Joe Perches [this message]

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=1301006945.29444.15.camel@Joe-Laptop \
    --to=joe@perches.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).