ata: Remove inline attribute from ata_sff_host_intr()
PATCH 1/1 ata: Remove inline attribute from ata_sff_host_intr()
ata: Remove inline attribute from ata_sff_host_intr()
ata_sff_host_intr is a public function, it should not be declared inline.
---drivers/ata/libata-sff.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
drivers/ata/libata-sff.c +2 -2
@@ -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;Quoted 3 lines · David Daney
ata: Remove inline attribute from
ata_sff_host_intr()
ata_sff_host_intris a public function, it should not be declared inline.
Why not?
Signature · 1 line
tejun
Quoted 7 lines · Tejun Heo
Quoted 3 lines · David Daney
ata: Remove inline attribute from
ata_sff_host_intr()
ata_sff_host_intris 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..
Quoted 7 lines · Robert Hancock
Quoted 6 lines · Tejun Heo
Quoted 4 lines · David Daney
ata: Remove inline attribute from
ata_sff_host_intr()
ata_sff_host_intris a public function, it should not be declared inline.
Quoted 6 lines
Quoted 2 lines
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.
Signature · 1 line
tejun
Quoted 9 lines · Tejun Heo
Quoted 8 lines · Robert Hancock
Quoted 7 lines · Tejun Heo
Quoted 4 lines · David Daney
ata: Remove inline attribute from
ata_sff_host_intr()
ata_sff_host_intris a public function, it should not be declared inline.Why not?
Quoted 9 lines
Quoted 3 lines
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()intoata_sff_interrupt()and then export a separate copy to other users asata_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