From: David Gibson <david@gibson.dropbear.id.au>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org
Subject: Re: [PATCH 1/2] wrapper: rename offset in offset_devp().
Date: Mon, 17 Dec 2007 11:44:15 +1100 [thread overview]
Message-ID: <20071217004415.GC2394@localhost.localdomain> (raw)
In-Reply-To: <20071212154528.7aaaa829.sfr@canb.auug.org.au>
[-- Attachment #1: Type: text/plain, Size: 931 bytes --]
On Wed, Dec 12, 2007 at 03:45:28PM +1100, Stephen Rothwell wrote:
> On Tue, 11 Dec 2007 15:23:04 -0600 Scott Wood <scottwood@freescale.com> wrote:
> >
> > #define offset_devp(off) \
> > ({ \
> > - int offset = (off); \
> > - check_err(offset) ? NULL : (void *)(offset+1); \
> > + int _offset = (off); \
> > + check_err(_offset) ? NULL : (void *)(_offset+1); \
> > })
>
> Just wondering if this could be a static inline function?
Alas, not really. If we did that, then the __FUNCTION__ and __LINE__
we use in the error message inside check_err() would always refer to
the offset_devp() function, which would be substantially less useful
than referring to the function which invoked the offset_devp() macro.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2007-12-17 0:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-11 21:23 [PATCH 1/2] wrapper: rename offset in offset_devp() Scott Wood
2007-12-12 4:45 ` Stephen Rothwell
2007-12-17 0:44 ` David Gibson [this message]
2007-12-17 0:40 ` David Gibson
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=20071217004415.GC2394@localhost.localdomain \
--to=david@gibson.dropbear.id.au \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
--cc=sfr@canb.auug.org.au \
/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).