public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@in.ibm.com>
To: ebiederm@xmission.com (Eric W. Biederman)
Cc: Kumar Gala <galak@kernel.crashing.org>,
	Arjan van de Ven <arjan@infradead.org>,
	linux kernel mailing list <linux-kernel@vger.kernel.org>,
	Fastboot mailing list <fastboot@lists.osdl.org>,
	Morton Andrew Morton <akpm@osdl.org>,
	gregkh@suse.de
Subject: Re: [RFC][PATCH] Expanding the size of "start" and "end" field in "struct resource"
Date: Wed, 15 Mar 2006 15:32:00 -0500	[thread overview]
Message-ID: <20060315203200.GB7465@in.ibm.com> (raw)
In-Reply-To: <m1ek13h3ej.fsf@ebiederm.dsl.xmission.com>

On Wed, Mar 15, 2006 at 01:13:56PM -0700, Eric W. Biederman wrote:
> Kumar Gala <galak@kernel.crashing.org> writes:
> 
> > On Mar 15, 2006, at 1:57 PM, Arjan van de Ven wrote:
> >
> >>
> >>> One of the possible solutions to this problem is that expand the size
> >>> of "start" and "end" to "unsigned long long". But whole of the PCI  and
> >>> driver code has been written assuming start and end to be unsigned  long
> >>> and compiler starts throwing warnings.
> >>
> >>
> >> please use dma_addr_t then instead of unsigned long long
> >>
> >> this is the right size on all platforms afaik (could a ppc64 person
> >> verify this?> ;)
> >
> > Actually we really just want "start" and "end" to be u64 on all  platforms.
> > Linus was ok with this change but no one has gone through  and fixed everything
> > that would be required for it.
> 
> Since it is faster to ask :)
> 
> How is it that other pieces of code have problems?
> Warnings or something nasty?

Few problems which I have noticed so far.

- Many printk() warnings. Wherever start and end are being printed,
  the format specifier being used is %lx. Needs to be changed to %Lx.

- Some folks save a pointer of type (unsigned long *) to start and end field
  and then try to operate on it. This pointer type shall have to be changed
  to something like u64*.

	unsigned long *port, *end, *tport, *tend;
	port = &dev->res.port_resource[idx].start;

- Some folks cast "start" to a pointer and then use it. Compiler gives warning. 

	addr_reg = (void __iomem *) addr->start;

-vivek

  parent reply	other threads:[~2006-03-15 20:32 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-15 19:31 [RFC][PATCH] Expanding the size of "start" and "end" field in "struct resource" Vivek Goyal
2006-03-15 19:48 ` Kumar Gala
2006-03-15 19:57 ` Arjan van de Ven
2006-03-15 20:01   ` Kumar Gala
2006-03-15 20:10     ` Kumar Gala
2006-03-15 20:13     ` Eric W. Biederman
2006-03-15 20:28       ` Kumar Gala
2006-03-15 20:37         ` Eric W. Biederman
2006-03-15 20:32       ` Vivek Goyal [this message]
2006-03-15 20:58         ` Eric W. Biederman
2006-03-15 21:57   ` David S. Miller
2006-03-15 20:53 ` Benjamin LaHaise
2006-03-15 21:05   ` Kumar Gala
2006-03-15 21:13     ` Benjamin LaHaise
2006-03-15 21:29       ` Eric W. Biederman
2006-03-15 21:28         ` Benjamin LaHaise
2006-03-15 21:50           ` Eric W. Biederman
2006-03-15 22:13             ` Andrew Morton
2006-03-15 22:18               ` David S. Miller
2006-03-15 21:59           ` Eric W. Biederman
2006-03-15 22:07             ` Benjamin LaHaise
2006-03-16 14:45               ` Eric W. Biederman
2006-03-15 21:30       ` Kumar Gala
2006-03-15 21:35         ` hackmiester / Hunter Fuller
2006-03-15 21:31       ` Eric W. Biederman
2006-03-15 21:15     ` Eric W. Biederman
2006-03-15 21:26     ` linux-os (Dick Johnson)
2006-03-15 21:37       ` Eric W. Biederman
2006-03-15 22:08 ` Greg KH

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=20060315203200.GB7465@in.ibm.com \
    --to=vgoyal@in.ibm.com \
    --cc=akpm@osdl.org \
    --cc=arjan@infradead.org \
    --cc=ebiederm@xmission.com \
    --cc=fastboot@lists.osdl.org \
    --cc=galak@kernel.crashing.org \
    --cc=gregkh@suse.de \
    --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