public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Gabriel A. Devenyi" <ace@staticwave.ca>
To: linux-kernel@vger.kernel.org
Cc: kernel-janitors@lists.osdl.org
Subject: Bit Truncation in drivers/pci/probe.c on amd64
Date: Mon, 5 Sep 2005 21:15:27 -0400	[thread overview]
Message-ID: <200509052115.27300.ace@staticwave.ca> (raw)

In the current git repository, on my amd64 machine I get the following warning on compile
drivers/pci/probe.c: In function `pci_read_bases':
drivers/pci/probe.c:166: warning: large integer implicitly truncated to unsigned type
drivers/pci/probe.c:216: warning: large integer implicitly truncated to unsigned type

I've tracked this down to pci_size, and two #define's in include/linux/pci.h

#define  PCI_BASE_ADDRESS_MEM_MASK	(~0x0fUL)
#define PCI_ROM_ADDRESS_MASK	(~0x7ffUL)

pci_size expects 3 u32 arguments,but from what I can tell, on 64 bit arch's the two above 
defines expand to 64bit values, and are truncated when being passed.

I'm not sure how to go about fixing this, if pci_size should accept a u64 or if the defines should
be changed. Is this bug dangerous? What should be done to fix it?

-- 
Gabriel A. Devenyi
ace@staticwave.ca

             reply	other threads:[~2005-09-06  1:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-06  1:15 Gabriel A. Devenyi [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-09-03  1:53 Bit Truncation in drivers/pci/probe.c on amd64 Gabriel A. Devenyi

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=200509052115.27300.ace@staticwave.ca \
    --to=ace@staticwave.ca \
    --cc=kernel-janitors@lists.osdl.org \
    --cc=linux-kernel@vger.kernel.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