From: Robert Schiele <rschiele@uni-mannheim.de>
To: Philip Blundell <philb@gnu.org>
Cc: Steven Cole <elenstev@mesatop.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Re: 2.4.8-pre1 build error in drivers/parport/parport_pc.c
Date: Sun, 29 Jul 2001 02:03:44 +0200 [thread overview]
Message-ID: <20010729020344.A9303@schiele.swm.uni-mannheim.de> (raw)
In-Reply-To: <01072619531103.06728@localhost.localdomain> <20010727101241.A15014@schiele.swm.uni-mannheim.de> <rschiele@uni-mannheim.de> <E15QX7a-0000gl-00@kings-cross.london.uk.eu.org> <20010728222943.A24586@schiele.swm.uni-mannheim.de> <rschiele@uni-mannheim.de> <E15QbIJ-0001kG-00@kings-cross.london.uk.eu.org>
In-Reply-To: <E15QbIJ-0001kG-00@kings-cross.london.uk.eu.org>; from philb@gnu.org on Sat, Jul 28, 2001 at 10:06:43PM +0100
[-- Attachment #1: Type: text/plain, Size: 2071 bytes --]
On Sat, Jul 28, 2001 at 10:06:43PM +0100, Philip Blundell wrote:
> >The "extern" was only an escape for the case that the compiler cannot
> >inline the function. Due to the fact, that current gcc has "static
> >inline" it is better to use this, because with "static inline" we do
> >not need to keep a global symbol just for the case the compiler is not
> >capable to inline the function in some place.
>
> The versions in the .c file are there so that the "ops" structure can point to
> them. The ones in the .h file are purely an optimisation to allow you to
> short-circuit the ops struct if you know only one driver is involved.
Because of that the compiler has to create a "real" function from the
code anyway. The way this is handled by gcc is stated in the gcc info
pages:
"When a function is both inline and `static', if all calls to the
function are integrated into the caller, and the function's
address is never used, then the function's own assembler code is
never referenced. In this case, GNU CC does not actually output
assembler code for the function, unless you specify the option
`-fkeep-inline-functions'. Some calls cannot be integrated for
various reasons (in particular, calls that precede the function's
definition cannot be integrated, and neither can recursive calls
within the definition). If there is a nonintegrated call, then
the function is compiled to assembler code as usual. The function
must also be compiled as usual if the program refers to its
address, because that can't be inlined."
>
> Changing this stuff to "static inline" still offends my sense of aesthetics
> somewhat, but I guess it's okay if you have checked that it still does the
> right thing in the CONFIG_PARPORT_OTHER case.
I didn't test this before your mail. But to be absolutely sure, I
tested it now. --- And it works perfectly.
Robert
--
Robert Schiele mailto:rschiele@uni-mannheim.de
Tel./Fax: +49-621-10059 http://webrum.uni-mannheim.de/math/rschiele/
[-- Attachment #2: Type: application/pgp-signature, Size: 524 bytes --]
prev parent reply other threads:[~2001-07-29 0:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-27 1:53 Steven Cole
2001-07-27 8:12 ` [PATCH] " Robert Schiele
2001-07-27 18:04 ` Steven Cole
2001-07-28 16:39 ` Philip Blundell
2001-07-28 20:29 ` Robert Schiele
2001-07-28 21:06 ` Philip Blundell
2001-07-29 0:03 ` Robert Schiele [this message]
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=20010729020344.A9303@schiele.swm.uni-mannheim.de \
--to=rschiele@uni-mannheim.de \
--cc=elenstev@mesatop.com \
--cc=linux-kernel@vger.kernel.org \
--cc=philb@gnu.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
all inboxes | Powered by JetHome®