public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix gcc 3.4 inlining errors in drivers/scsi/dc395x.c
@ 2004-08-01 12:02 Jesper Juhl
  2004-08-01 14:15 ` Adrian Bunk
  0 siblings, 1 reply; 4+ messages in thread
From: Jesper Juhl @ 2004-08-01 12:02 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-scsi, LKML, Oliver Neukum, Ali Akcaagac, Jamie Lenehan,
	Adrian Bunk


drivers/scsi/dc395x.c fails to build in 2.6.8-rc2-mm1 with gcc 3.4.0 with 
the following errors :

drivers/scsi/dc395x.c: In function `dc395x_handle_interrupt':
drivers/scsi/dc395x.c:388: sorry, unimplemented: inlining failed in call to 'enable_msgout_abort': function body not available
drivers/scsi/dc395x.c:1740: sorry, unimplemented: called from here

drivers/scsi/dc395x.c: In function `msgin_set_async':
drivers/scsi/dc395x.c:394: sorry, unimplemented: inlining failed in call to 'set_xfer_rate': function body not available
drivers/scsi/dc395x.c:2677: sorry, unimplemented: called from here

The patch below fixes the build by un-inlining the functions (an 
alternative would be to rework the file so the functions move before their 
first use). As for 'set_xfer_rate' the function itself was not declared 
inline, only the prototype.

Patch against 2.6.8-rc2-mm1

Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>


diff -up linux-2.6.8-rc2-mm1-orig/drivers/scsi/dc395x.c linux-2.6.8-rc2-mm1/drivers/scsi/dc395x.c
--- linux-2.6.8-rc2-mm1-orig/drivers/scsi/dc395x.c	2004-07-31 13:09:46.000000000 +0200
+++ linux-2.6.8-rc2-mm1/drivers/scsi/dc395x.c	2004-07-31 23:22:47.000000000 +0200
@@ -384,13 +384,13 @@ static void scsi_reset_detect(struct Ada
 static void pci_unmap_srb(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb);
 static void pci_unmap_srb_sense(struct AdapterCtlBlk *acb,
 		struct ScsiReqBlk *srb);
-static inline void enable_msgout_abort(struct AdapterCtlBlk *acb,
+static void enable_msgout_abort(struct AdapterCtlBlk *acb,
 		struct ScsiReqBlk *srb);
 static void srb_done(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb,
 		struct ScsiReqBlk *srb);
 static void request_sense(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb,
 		struct ScsiReqBlk *srb);
-static inline void set_xfer_rate(struct AdapterCtlBlk *acb,
+static void set_xfer_rate(struct AdapterCtlBlk *acb,
 		struct DeviceCtlBlk *dcb);
 static void waiting_timeout(unsigned long ptr);
 
@@ -2604,7 +2604,7 @@ static inline void msgin_reject(struct A
 
 
 /* abort command */
-static inline void enable_msgout_abort(struct AdapterCtlBlk *acb,
+static void enable_msgout_abort(struct AdapterCtlBlk *acb,
 		struct ScsiReqBlk *srb)
 {
 	srb->msgout_buf[0] = ABORT;


--
Jesper Juhl <juhl-lkml@dif.dk>



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

* Re: [PATCH] fix gcc 3.4 inlining errors in drivers/scsi/dc395x.c
  2004-08-01 12:02 [PATCH] fix gcc 3.4 inlining errors in drivers/scsi/dc395x.c Jesper Juhl
@ 2004-08-01 14:15 ` Adrian Bunk
  2004-08-01 14:45   ` Jesper Juhl
  0 siblings, 1 reply; 4+ messages in thread
From: Adrian Bunk @ 2004-08-01 14:15 UTC (permalink / raw)
  To: Jesper Juhl
  Cc: Andrew Morton, linux-scsi, LKML, Oliver Neukum, Ali Akcaagac,
	Jamie Lenehan

On Sun, Aug 01, 2004 at 02:02:50PM +0200, Jesper Juhl wrote:
> 
> drivers/scsi/dc395x.c fails to build in 2.6.8-rc2-mm1 with gcc 3.4.0 with 
> the following errors :
> 
> drivers/scsi/dc395x.c: In function `dc395x_handle_interrupt':
> drivers/scsi/dc395x.c:388: sorry, unimplemented: inlining failed in call to 'enable_msgout_abort': function body not available
> drivers/scsi/dc395x.c:1740: sorry, unimplemented: called from here
> 
> drivers/scsi/dc395x.c: In function `msgin_set_async':
> drivers/scsi/dc395x.c:394: sorry, unimplemented: inlining failed in call to 'set_xfer_rate': function body not available
> drivers/scsi/dc395x.c:2677: sorry, unimplemented: called from here
> 
> The patch below fixes the build by un-inlining the functions (an 
> alternative would be to rework the file so the functions move before their 
> first use). As for 'set_xfer_rate' the function itself was not declared 
> inline, only the prototype.
>...

Jamie Lenehan already ACK'ed a similar patch I sent two weeks ago which 
moves enable_msgout_abort instead of un-inlining it.

Both approaches are feasible, it's up to the maintainers to decide which 
one is better in this case.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

* Re: [PATCH] fix gcc 3.4 inlining errors in drivers/scsi/dc395x.c
  2004-08-01 14:15 ` Adrian Bunk
@ 2004-08-01 14:45   ` Jesper Juhl
  2004-08-01 14:57     ` Adrian Bunk
  0 siblings, 1 reply; 4+ messages in thread
From: Jesper Juhl @ 2004-08-01 14:45 UTC (permalink / raw)
  To: Adrian Bunk
  Cc: Andrew Morton, linux-scsi, LKML, Oliver Neukum, Ali Akcaagac,
	Jamie Lenehan

On Sun, 1 Aug 2004, Adrian Bunk wrote:

> On Sun, Aug 01, 2004 at 02:02:50PM +0200, Jesper Juhl wrote:
> > 
> > drivers/scsi/dc395x.c fails to build in 2.6.8-rc2-mm1 with gcc 3.4.0 with 
> > the following errors :
> > 
> > drivers/scsi/dc395x.c: In function `dc395x_handle_interrupt':
> > drivers/scsi/dc395x.c:388: sorry, unimplemented: inlining failed in call to 'enable_msgout_abort': function body not available
> > drivers/scsi/dc395x.c:1740: sorry, unimplemented: called from here
> > 
> > drivers/scsi/dc395x.c: In function `msgin_set_async':
> > drivers/scsi/dc395x.c:394: sorry, unimplemented: inlining failed in call to 'set_xfer_rate': function body not available
> > drivers/scsi/dc395x.c:2677: sorry, unimplemented: called from here
> > 
> > The patch below fixes the build by un-inlining the functions (an 
> > alternative would be to rework the file so the functions move before their 
> > first use). As for 'set_xfer_rate' the function itself was not declared 
> > inline, only the prototype.
> >...
> 
> Jamie Lenehan already ACK'ed a similar patch I sent two weeks ago which 
> moves enable_msgout_abort instead of un-inlining it.
> 
Ohh, OK, I did a search in my lkml mailbox before sending off the patch, 
guess I missed it.

Since you already did a bunch of these I'm trying to avoid sending patches 
for the ones you alrady did, but a few might slip. Just trying to fill in 
the remaining blanks :)


> Both approaches are feasible, it's up to the maintainers to decide which 
> one is better in this case.
> 
Agreed.


/Jesper


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

* Re: [PATCH] fix gcc 3.4 inlining errors in drivers/scsi/dc395x.c
  2004-08-01 14:45   ` Jesper Juhl
@ 2004-08-01 14:57     ` Adrian Bunk
  0 siblings, 0 replies; 4+ messages in thread
From: Adrian Bunk @ 2004-08-01 14:57 UTC (permalink / raw)
  To: Jesper Juhl
  Cc: Andrew Morton, linux-scsi, LKML, Oliver Neukum, Ali Akcaagac,
	Jamie Lenehan

On Sun, Aug 01, 2004 at 04:45:38PM +0200, Jesper Juhl wrote:
>
> Ohh, OK, I did a search in my lkml mailbox before sending off the patch, 
> guess I missed it.
>...

No, I accidentially sent this patch only to linux-scsi.

> /Jesper

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


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

end of thread, other threads:[~2004-08-01 14:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-01 12:02 [PATCH] fix gcc 3.4 inlining errors in drivers/scsi/dc395x.c Jesper Juhl
2004-08-01 14:15 ` Adrian Bunk
2004-08-01 14:45   ` Jesper Juhl
2004-08-01 14:57     ` Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox