All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ondrej Zary <linux@rainbow-software.org>
To: linux-scsi@vger.kernel.org
Subject: [PATCH 07/13] aha1542: Reorder functions to remove forward declarations
Date: Mon, 19 Jan 2015 23:37:51 +0100	[thread overview]
Message-ID: <1421707077-25291-8-git-send-email-linux@rainbow-software.org> (raw)
In-Reply-To: <1421707077-25291-1-git-send-email-linux@rainbow-software.org>

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
---
 drivers/scsi/aha1542.c |   51 +++++++++++++++++++++++-------------------------
 drivers/scsi/aha1542.h |   12 ------------
 2 files changed, 24 insertions(+), 39 deletions(-)

diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c
index 8851719..af1e8fa 100644
--- a/drivers/scsi/aha1542.c
+++ b/drivers/scsi/aha1542.c
@@ -124,10 +124,6 @@ static DEFINE_SPINLOCK(aha1542_lock);
 
 #define WAITnexttimeout 3000000
 
-static void setup_mailboxes(int base_io, struct Scsi_Host *shpnt);
-static int aha1542_restart(struct Scsi_Host *shost);
-static void aha1542_intr_handle(struct Scsi_Host *shost);
-
 static inline void aha1542_intr_reset(u16 base)
 {
 	outb(IRST, CONTROL(base));
@@ -368,16 +364,20 @@ fail:
 	return 0;		/* 0 = not ok */
 }
 
-/* A quick wrapper for do_aha1542_intr_handle to grab the spin lock */
-static irqreturn_t do_aha1542_intr_handle(int dummy, void *dev_id)
+static int aha1542_restart(struct Scsi_Host *shost)
 {
-	unsigned long flags;
-	struct Scsi_Host *shost = dev_id;
+	struct aha1542_hostdata *aha1542 = shost_priv(shost);
+	int i;
+	int count = 0;
 
-	spin_lock_irqsave(shost->host_lock, flags);
-	aha1542_intr_handle(shost);
-	spin_unlock_irqrestore(shost->host_lock, flags);
-	return IRQ_HANDLED;
+	for (i = 0; i < AHA1542_MAILBOXES; i++)
+		if (aha1542->SCint[i] &&
+		    !(aha1542->SCint[i]->device->soft_reset)) {
+			count++;
+		}
+	printk(KERN_DEBUG "Potential to restart %d stalled commands...\n", count);
+
+	return 0;
 }
 
 /* A "high" level interrupt handler */
@@ -539,6 +539,18 @@ static void aha1542_intr_handle(struct Scsi_Host *shost)
 	};
 }
 
+/* A quick wrapper for do_aha1542_intr_handle to grab the spin lock */
+static irqreturn_t do_aha1542_intr_handle(int dummy, void *dev_id)
+{
+	unsigned long flags;
+	struct Scsi_Host *shost = dev_id;
+
+	spin_lock_irqsave(shost->host_lock, flags);
+	aha1542_intr_handle(shost);
+	spin_unlock_irqrestore(shost->host_lock, flags);
+	return IRQ_HANDLED;
+}
+
 static int aha1542_queuecommand_lck(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
 {
 	struct aha1542_hostdata *aha1542 = shost_priv(SCpnt->device->host);
@@ -1078,21 +1090,6 @@ static int aha1542_release(struct Scsi_Host *shost)
 	return 0;
 }
 
-static int aha1542_restart(struct Scsi_Host *shost)
-{
-	struct aha1542_hostdata *aha1542 = shost_priv(shost);
-	int i;
-	int count = 0;
-
-	for (i = 0; i < AHA1542_MAILBOXES; i++)
-		if (aha1542->SCint[i] &&
-		    !(aha1542->SCint[i]->device->soft_reset)) {
-			count++;
-		}
-	printk(KERN_DEBUG "Potential to restart %d stalled commands...\n", count);
-
-	return 0;
-}
 
 /*
  * This is a device reset.  This is handled by sending a special command
diff --git a/drivers/scsi/aha1542.h b/drivers/scsi/aha1542.h
index 6b418bb..f0b862b 100644
--- a/drivers/scsi/aha1542.h
+++ b/drivers/scsi/aha1542.h
@@ -125,18 +125,6 @@ struct ccb {		/* Command Control Block 5.3 */
 					/* REQUEST SENSE */
 };
 
-static struct Scsi_Host *aha1542_hw_init(struct scsi_host_template *tpnt, struct device *pdev, int indx);
-static int aha1542_queuecommand(struct Scsi_Host *, struct scsi_cmnd *);
-static int aha1542_bus_reset(Scsi_Cmnd * SCpnt);
-static int aha1542_dev_reset(Scsi_Cmnd * SCpnt);
-static int aha1542_host_reset(Scsi_Cmnd * SCpnt);
-#if 0
-static int aha1542_old_abort(Scsi_Cmnd * SCpnt);
-static int aha1542_old_reset(Scsi_Cmnd *, unsigned int);
-#endif
-static int aha1542_biosparam(struct scsi_device *, struct block_device *,
-		sector_t, int *);
-
 #define AHA1542_MAILBOXES 8
 
 #endif
-- 
Ondrej Zary


  parent reply	other threads:[~2015-01-19 22:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-19 22:37 [RFC PATCH 0/13] aha1542: Various improvements Ondrej Zary
2015-01-19 22:37 ` [PATCH 01/13] aha1542: Stop using scsi_module.c Ondrej Zary
2015-01-19 22:37 ` [PATCH 02/13] aha1542: remove dead code Ondrej Zary
2015-01-19 22:37 ` [PATCH 03/13] aha1542: Remove SCSI_BUF_PA, SCSI_SG_PA, AHA1542_SCATTER and AHA1542_CMDLUN Ondrej Zary
2015-01-19 22:37 ` [PATCH 04/13] aha1542: Remove HOSTDATA macro Ondrej Zary
2015-01-19 22:37 ` [PATCH 05/13] aha1542: Convert aha1542_intr_reset to function Ondrej Zary
2015-01-19 22:37 ` [PATCH 06/13] aha1542: Use u8 instead of unchar Ondrej Zary
2015-01-19 22:37 ` Ondrej Zary [this message]
2015-01-19 22:37 ` [PATCH 08/13] aha1542: remove empty aha1542_stat Ondrej Zary
2015-01-19 22:37 ` [PATCH 09/13] aha1542: Use BIT() macro Ondrej Zary
2015-01-19 22:37 ` [PATCH 10/13] aha1542: Remove WAIT and WAITd macros Ondrej Zary
2015-01-19 22:37 ` [PATCH 11/13] aha1542: Unify aha1542_in and aha1542_in1 Ondrej Zary
2015-01-19 22:37 ` [PATCH 12/13] aha1542: Split aha1542_out Ondrej Zary
2015-01-19 22:37 ` [PATCH 13/13] aha1542: Remove unneeded gotos Ondrej Zary

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1421707077-25291-8-git-send-email-linux@rainbow-software.org \
    --to=linux@rainbow-software.org \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.