linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ata: Remove inline attribute from ata_sff_host_intr()
@ 2008-11-21  0:39 David Daney
  2008-11-24  5:20 ` Tejun Heo
  0 siblings, 1 reply; 5+ messages in thread
From: David Daney @ 2008-11-21  0:39 UTC (permalink / raw)
  To: linux-ide

ata: Remove inline attribute from ata_sff_host_intr()

ata_sff_host_intr is a public function, it should not be declared inline.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
---
 drivers/ata/libata-sff.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 9033d16..73d7dbb 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -1542,8 +1542,8 @@ bool ata_sff_qc_fill_rtf(struct ata_queued_cmd *qc)
  *	RETURNS:
  *	One if interrupt was handled, zero if not (shared irq).
  */
-inline unsigned int ata_sff_host_intr(struct ata_port *ap,
-				      struct ata_queued_cmd *qc)
+unsigned int ata_sff_host_intr(struct ata_port *ap,
+			       struct ata_queued_cmd *qc)
 {
 	struct ata_eh_info *ehi = &ap->link.eh_info;
 	u8 status, host_stat = 0;

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ata: Remove inline attribute from ata_sff_host_intr()
  2008-11-21  0:39 [PATCH] ata: Remove inline attribute from ata_sff_host_intr() David Daney
@ 2008-11-24  5:20 ` Tejun Heo
  2008-11-24  5:42   ` Robert Hancock
  0 siblings, 1 reply; 5+ messages in thread
From: Tejun Heo @ 2008-11-24  5:20 UTC (permalink / raw)
  To: David Daney; +Cc: linux-ide

David Daney wrote:
> ata: Remove inline attribute from ata_sff_host_intr()
> 
> ata_sff_host_intr is a public function, it should not be declared inline.

Why not?

-- 
tejun

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ata: Remove inline attribute from ata_sff_host_intr()
  2008-11-24  5:20 ` Tejun Heo
@ 2008-11-24  5:42   ` Robert Hancock
  2008-11-24  5:49     ` Tejun Heo
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Hancock @ 2008-11-24  5:42 UTC (permalink / raw)
  To: linux-ide; +Cc: David Daney

Tejun Heo wrote:
> David Daney wrote:
>> ata: Remove inline attribute from ata_sff_host_intr()
>>
>> ata_sff_host_intr is a public function, it should not be declared inline.
> 
> Why not?
> 

Well, it's a bit unusual to have a non-static inline (an exported symbol 
no less) in a C file.. how could any callers outside the file ever 
actually inline it? Aside from that it seems a bit big for inlining..


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ata: Remove inline attribute from ata_sff_host_intr()
  2008-11-24  5:42   ` Robert Hancock
@ 2008-11-24  5:49     ` Tejun Heo
  2008-11-24 17:21       ` David Daney
  0 siblings, 1 reply; 5+ messages in thread
From: Tejun Heo @ 2008-11-24  5:49 UTC (permalink / raw)
  To: Robert Hancock; +Cc: David Daney, IDE/ATA development list

Robert Hancock wrote:
> Tejun Heo wrote:
>> David Daney wrote:
>>> ata: Remove inline attribute from ata_sff_host_intr()
>>>
>>> ata_sff_host_intr is a public function, it should not be declared
>>> inline.
>>
>> Why not?
>>
> 
> Well, it's a bit unusual to have a non-static inline (an exported symbol
> no less) in a C file.. how could any callers outside the file ever
> actually inline it? Aside from that it seems a bit big for inlining..

The goal there is to inline ata_sff_host_intr() into ata_sff_interrupt()
and then export a separate copy to other users as ata_sff_interrupt() is
very hot.  Looking at the disassembly, gcc is doing what it's told to
do, so the inline actually is doing something useful there.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ata: Remove inline attribute from ata_sff_host_intr()
  2008-11-24  5:49     ` Tejun Heo
@ 2008-11-24 17:21       ` David Daney
  0 siblings, 0 replies; 5+ messages in thread
From: David Daney @ 2008-11-24 17:21 UTC (permalink / raw)
  To: Tejun Heo; +Cc: Robert Hancock, IDE/ATA development list

Tejun Heo wrote:
> Robert Hancock wrote:
>> Tejun Heo wrote:
>>> David Daney wrote:
>>>> ata: Remove inline attribute from ata_sff_host_intr()
>>>>
>>>> ata_sff_host_intr is a public function, it should not be declared
>>>> inline.
>>> Why not?
>>>
>> Well, it's a bit unusual to have a non-static inline (an exported symbol
>> no less) in a C file.. how could any callers outside the file ever
>> actually inline it? Aside from that it seems a bit big for inlining..
> 
> The goal there is to inline ata_sff_host_intr() into ata_sff_interrupt()
> and then export a separate copy to other users as ata_sff_interrupt() is
> very hot.  Looking at the disassembly, gcc is doing what it's told to
> do, so the inline actually is doing something useful there.
> 

Have you actually profiled it both ways?

I was assuming that the function used to be 'static inline' and that the 
inline was some sort of typo left over from when static might have been 
removed.

In any event, do with it what you wish, it just looked weird to me.

David Daney

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-11-24 17:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-21  0:39 [PATCH] ata: Remove inline attribute from ata_sff_host_intr() David Daney
2008-11-24  5:20 ` Tejun Heo
2008-11-24  5:42   ` Robert Hancock
2008-11-24  5:49     ` Tejun Heo
2008-11-24 17:21       ` David Daney

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).