public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Rene Herman <rene.herman@keyaccess.nl>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] PNP: make the resource type an unsigned long
Date: Fri, 08 Aug 2008 14:55:41 -0700	[thread overview]
Message-ID: <489CC0DD.5010402@zytor.com> (raw)
In-Reply-To: <489BEA31.3040101@keyaccess.nl>

Rene Herman wrote:
> Hi Bjorn.
> 
> Andrew earlier commented that pci_resourec_flags() returns an unsigned 
> long. Had this hanging around a local branch. Useful?
> 

-int pnp_resource_type(struct resource *res)
+unsigned long pnp_resource_type(struct resource *res)
  {
  	return res->flags & (IORESOURCE_IO  | IORESOURCE_MEM |
  			     IORESOURCE_IRQ | IORESOURCE_DMA);
  }

Seems a bit pointless ... either one of those flags is >= 32 bits, in 
which case we need u64, or it's not, in which case there is no reason to 
burden the output with bits we don't need.

	-hpa

  reply	other threads:[~2008-08-08 22:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-08  6:39 [PATCH] PNP: make the resource type an unsigned long Rene Herman
2008-08-08 21:55 ` H. Peter Anvin [this message]
2008-08-09  5:21   ` Rene Herman
2008-08-09  5:25     ` H. Peter Anvin
2008-08-09  5:32       ` Rene Herman
2008-08-11 21:59 ` Bjorn Helgaas
2008-08-11 22:08   ` H. Peter Anvin
2008-08-11 22:18     ` Bjorn Helgaas
2008-08-12  4:15   ` Rene Herman

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=489CC0DD.5010402@zytor.com \
    --to=hpa@zytor.com \
    --cc=akpm@osdl.org \
    --cc=bjorn.helgaas@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rene.herman@keyaccess.nl \
    /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