public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: ebiederm@xmission.com (Eric W. Biederman)
Cc: bcrl@kvack.org, galak@kernel.crashing.org, vgoyal@in.ibm.com,
	linux-kernel@vger.kernel.org, fastboot@lists.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 14:13:05 -0800	[thread overview]
Message-ID: <20060315141305.13864705.akpm@osdl.org> (raw)
In-Reply-To: <m1fylje5sv.fsf@ebiederm.dsl.xmission.com>

ebiederm@xmission.com (Eric W. Biederman) wrote:
>
> Benjamin LaHaise <bcrl@kvack.org> writes:
> 
> > On Wed, Mar 15, 2006 at 02:29:32PM -0700, Eric W. Biederman wrote:
> >> If the impact is very slight or unmeasurable this means the option
> >> needs to fall under CONFIG_EMBEDDED, where you can change if
> >> every last bit of RAM counts but otherwise you won't care.
> >
> > But we have a data type that is correct for this usage: dma_addr_t.
> 
> Well the name is wrong.  Because these are in general not DMA addresses,
> but it may have the other desired properties.  So it may be
> useable.

Yes, dma_addr_t does the right thing but has the wrong name.

I guess it should have been called bus_addr_t (?).  If so, I guess a
suitable compromise might be:

#ifndef bus_addr_t
#define bus_addr_t dma_addr_t
#endif

then use bus_addr_t in struct resource.

Yes, we'd like to see the impact on vmlinux size, please.

Many of the problems will be in printks.  Whoever does this work should
capture stderr from before- and after- allmodconfig builds and diff them.

The appropriate way to printk a bus_addr_t will be

	printk("%lld", (unsigned long long)val);

which will increase code size even if bus_addr_t is u32, sadly.


Finally, we shouldn't just slavishly fix up great piles of printks to fix
the warnings (actually they're bugs).  Lots of the printks we have are
fairly useless, and there are other ways of finding out a device's IO and
IOMEM addresses anyway.

So IMO the preferred way of fixing a printk which is generating warnings is
to delete the thing.  Chances are that if the affected code actually has a
maintainer, he won't notice anyway ;)


  reply	other threads:[~2006-03-15 22:10 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
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 [this message]
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=20060315141305.13864705.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=bcrl@kvack.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 \
    --cc=vgoyal@in.ibm.com \
    /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