* [2.6 patch] SCSI dc395x.c: fix inline compile errors
@ 2004-07-15 22:26 Adrian Bunk
0 siblings, 0 replies; only message in thread
From: Adrian Bunk @ 2004-07-15 22:26 UTC (permalink / raw)
To: Kurt Garloff, Oliver Neukum, Ali Akcaagac, Jamie Lenehan
Cc: James.Bottomley, linux-scsi
Trying to compile drivers/scsi/dc395x.c in 2.6.8-rc1-mm1 using gcc 3.4
results in compile errors starting with the following:
<-- snip -->
...
CC drivers/scsi/dc395x.o
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
make[2]: *** [drivers/scsi/dc395x.o] Error 1
<-- snip -->
The patch below moves enable_msgout_abort above the place where it is
called the first time and removes the bogus inline from the prototype of
set_xfer_rate (the function itself isn't marked as inline).
An alternative approach would be to remove the inline from
enable_msgout_abort.
diffstat output:
drivers/scsi/dc395x.c | 40 ++++++++++++++++++++--------------------
1 files changed, 20 insertions(+), 20 deletions(-)
Signed-off-by: Adrian Bunk <bunk@fs.tum.de>
--- linux-2.6.8-rc1-mm1-full-3.4/drivers/scsi/dc395x.c.old 2004-07-16 00:19:23.000000000 +0200
+++ linux-2.6.8-rc1-mm1-full-3.4/drivers/scsi/dc395x.c 2004-07-16 00:21:32.000000000 +0200
@@ -376,6 +376,8 @@
static void reselect(struct AdapterCtlBlk *acb);
static u8 start_scsi(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb,
struct ScsiReqBlk *srb);
+static inline void enable_msgout_abort(struct AdapterCtlBlk *acb,
+ struct ScsiReqBlk *srb);
static void build_srb(struct scsi_cmnd *cmd, struct DeviceCtlBlk *dcb,
struct ScsiReqBlk *srb);
static void doing_srb_done(struct AdapterCtlBlk *acb, u8 did_code,
@@ -384,13 +386,11 @@
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,
- 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);
@@ -1676,6 +1676,23 @@
}
+#define DC395x_ENABLE_MSGOUT \
+ DC395x_write16 (acb, TRM_S1040_SCSI_CONTROL, DO_SETATN); \
+ srb->state |= SRB_MSGOUT
+
+
+/* abort command */
+static inline void enable_msgout_abort(struct AdapterCtlBlk *acb,
+ struct ScsiReqBlk *srb)
+{
+ srb->msgout_buf[0] = ABORT;
+ srb->msg_count = 1;
+ DC395x_ENABLE_MSGOUT;
+ srb->state &= ~SRB_MSGIN;
+ srb->state |= SRB_MSGOUT;
+}
+
+
/**
* dc395x_handle_interrupt - Handle an interrupt that has been confirmed to
* have been triggered for this card.
@@ -2583,11 +2600,6 @@
return 1;
}
-#define DC395x_ENABLE_MSGOUT \
- DC395x_write16 (acb, TRM_S1040_SCSI_CONTROL, DO_SETATN); \
- srb->state |= SRB_MSGOUT
-
-
/* reject_msg */
static inline void msgin_reject(struct AdapterCtlBlk *acb,
struct ScsiReqBlk *srb)
@@ -2603,18 +2615,6 @@
}
-/* abort command */
-static inline void enable_msgout_abort(struct AdapterCtlBlk *acb,
- struct ScsiReqBlk *srb)
-{
- srb->msgout_buf[0] = ABORT;
- srb->msg_count = 1;
- DC395x_ENABLE_MSGOUT;
- srb->state &= ~SRB_MSGIN;
- srb->state |= SRB_MSGOUT;
-}
-
-
static struct ScsiReqBlk *msgin_qtag(struct AdapterCtlBlk *acb,
struct DeviceCtlBlk *dcb, u8 tag)
{
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-07-15 22:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-15 22:26 [2.6 patch] SCSI dc395x.c: fix inline compile errors Adrian Bunk
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.