* fix qla2xxx inline failure.
@ 2004-09-15 11:32 Dave Jones
2004-09-15 11:43 ` Dave Jones
0 siblings, 1 reply; 2+ messages in thread
From: Dave Jones @ 2004-09-15 11:32 UTC (permalink / raw)
To: linux-scsi
CC [M] drivers/scsi/qla2xxx/qla_os.o
drivers/scsi/qla2xxx/qla_os.c: In function `qla2x00_queuecommand':
drivers/scsi/qla2xxx/qla_os.c:315: sorry, unimplemented: inlining failed in call to 'qla2x00_callback': function not considered for inlining
drivers/scsi/qla2xxx/qla_os.c:269: sorry, unimplemented: called from here
drivers/scsi/qla2xxx/qla_os.c:315: sorry, unimplemented: inlining failed in call to 'qla2x00_callback': function not considered for inlining
drivers/scsi/qla2xxx/qla_os.c:269: sorry, unimplemented: called from here
make[1]: *** [drivers/scsi/qla2xxx/qla_os.o] Error 1
Fixed by hoisting qla2x00_callback up a few dozen lines.
Also removed now useless prototype.
Signed-off-by: Dave Jones <davej@redhat.com>
--- 1/drivers/scsi/qla2xxx/qla_os.c 2004-09-15 01:16:55.000000000 +0100
+++ 2/drivers/scsi/qla2xxx/qla_os.c 2004-09-15 12:31:30.423920264 +0100
@@ -229,73 +229,11 @@ qla2x00_stop_timer(scsi_qla_host_t *ha)
void qla2x00_cmd_timeout(srb_t *);
-static __inline__ void qla2x00_callback(scsi_qla_host_t *, struct scsi_cmnd *);
static __inline__ void sp_put(struct scsi_qla_host * ha, srb_t *sp);
static __inline__ void sp_get(struct scsi_qla_host * ha, srb_t *sp);
static __inline__ void
qla2x00_delete_from_done_queue(scsi_qla_host_t *, srb_t *);
-/**************************************************************************
-* sp_put
-*
-* Description:
-* Decrement reference count and call the callback if we're the last
-* owner of the specified sp. Will get the host_lock before calling
-* the callback.
-*
-* Input:
-* ha - pointer to the scsi_qla_host_t where the callback is to occur.
-* sp - pointer to srb_t structure to use.
-*
-* Returns:
-*
-**************************************************************************/
-static inline void
-sp_put(struct scsi_qla_host * ha, srb_t *sp)
-{
- if (atomic_read(&sp->ref_count) == 0) {
- qla_printk(KERN_INFO, ha,
- "%s(): **** SP->ref_count not zero\n",
- __func__);
- DEBUG2(BUG();)
-
- return;
- }
-
- if (!atomic_dec_and_test(&sp->ref_count)) {
- return;
- }
-
- qla2x00_callback(ha, sp->cmd);
-}
-
-/**************************************************************************
-* sp_get
-*
-* Description:
-* Increment reference count of the specified sp.
-*
-* Input:
-* sp - pointer to srb_t structure to use.
-*
-* Returns:
-*
-**************************************************************************/
-static inline void
-sp_get(struct scsi_qla_host * ha, srb_t *sp)
-{
- atomic_inc(&sp->ref_count);
-
- if (atomic_read(&sp->ref_count) > 2) {
- qla_printk(KERN_INFO, ha,
- "%s(): **** SP->ref_count greater than two\n",
- __func__);
- DEBUG2(BUG();)
-
- return;
- }
-}
-
/*
* qla2x00_callback
* Returns the completed SCSI command to LINUX.
@@ -366,6 +304,67 @@ qla2x00_callback(scsi_qla_host_t *ha, st
(*(cmd)->scsi_done)(cmd);
}
+/**************************************************************************
+* sp_put
+*
+* Description:
+* Decrement reference count and call the callback if we're the last
+* owner of the specified sp. Will get the host_lock before calling
+* the callback.
+*
+* Input:
+* ha - pointer to the scsi_qla_host_t where the callback is to occur.
+* sp - pointer to srb_t structure to use.
+*
+* Returns:
+*
+**************************************************************************/
+static inline void
+sp_put(struct scsi_qla_host * ha, srb_t *sp)
+{
+ if (atomic_read(&sp->ref_count) == 0) {
+ qla_printk(KERN_INFO, ha,
+ "%s(): **** SP->ref_count not zero\n",
+ __func__);
+ DEBUG2(BUG();)
+
+ return;
+ }
+
+ if (!atomic_dec_and_test(&sp->ref_count)) {
+ return;
+ }
+
+ qla2x00_callback(ha, sp->cmd);
+}
+
+/**************************************************************************
+* sp_get
+*
+* Description:
+* Increment reference count of the specified sp.
+*
+* Input:
+* sp - pointer to srb_t structure to use.
+*
+* Returns:
+*
+**************************************************************************/
+static inline void
+sp_get(struct scsi_qla_host * ha, srb_t *sp)
+{
+ atomic_inc(&sp->ref_count);
+
+ if (atomic_read(&sp->ref_count) > 2) {
+ qla_printk(KERN_INFO, ha,
+ "%s(): **** SP->ref_count greater than two\n",
+ __func__);
+ DEBUG2(BUG();)
+
+ return;
+ }
+}
+
static inline void
qla2x00_delete_from_done_queue(scsi_qla_host_t *dest_ha, srb_t *sp)
{
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: fix qla2xxx inline failure.
2004-09-15 11:32 fix qla2xxx inline failure Dave Jones
@ 2004-09-15 11:43 ` Dave Jones
0 siblings, 0 replies; 2+ messages in thread
From: Dave Jones @ 2004-09-15 11:43 UTC (permalink / raw)
To: linux-scsi
There was a second failure..
drivers/scsi/qla2xxx/qla_rscn.c: In function `qla2x00_cancel_io_descriptors':
drivers/scsi/qla2xxx/qla_rscn.c:320: sorry, unimplemented: inlining failed in call to 'qla2x00_remove_iodesc_timer': function not considered for inlining
drivers/scsi/qla2xxx/qla_rscn.c:257: sorry, unimplemented: called from here
make[3]: *** [drivers/scsi/qla2xxx/qla_rscn.o] Error 1
Signed-off-by: Dave Jones <davej@redhat.com>
--- 1/drivers/scsi/qla2xxx/qla_rscn.c 2004-09-15 12:02:12.000000000 +0100
+++ 2/drivers/scsi/qla2xxx/qla_rscn.c 2004-09-15 12:41:48.504957664 +0100
@@ -242,6 +242,20 @@ qla2x00_free_iodesc(struct io_descriptor
}
/**
+ * qla2x00_remove_iodesc_timer() - Remove an active timer from an IO descriptor.
+ * @iodesc: io descriptor
+ */
+static inline void
+qla2x00_remove_iodesc_timer(struct io_descriptor *iodesc)
+{
+ if (iodesc->timer.function != NULL) {
+ del_timer_sync(&iodesc->timer);
+ iodesc->timer.data = (unsigned long) NULL;
+ iodesc->timer.function = NULL;
+ }
+}
+
+/**
* qla2x00_init_io_descriptors() - Initialize the pool of IO descriptors.
* @ha: HA context
*/
@@ -311,20 +325,6 @@ qla2x00_add_iodesc_timer(struct io_descr
add_timer(&iodesc->timer);
}
-/**
- * qla2x00_remove_iodesc_timer() - Remove an active timer from an IO descriptor.
- * @iodesc: io descriptor
- */
-static inline void
-qla2x00_remove_iodesc_timer(struct io_descriptor *iodesc)
-{
- if (iodesc->timer.function != NULL) {
- del_timer_sync(&iodesc->timer);
- iodesc->timer.data = (unsigned long) NULL;
- iodesc->timer.function = NULL;
- }
-}
-
/**
* IO descriptor support routines.
**/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-09-15 11:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-15 11:32 fix qla2xxx inline failure Dave Jones
2004-09-15 11:43 ` Dave Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox