summaryrefslogtreecommitdiff
path: root/drivers/block/cciss.c
diff options
context:
space:
mode:
authorMike Miller <mike.miller@hp.com>2010-06-11 13:13:35 +0200
committerJens Axboe <jaxboe@fusionio.com>2010-08-07 18:15:25 +0200
commit29979a71227c46b2ed970b9d603d529c718e5fc8 (patch)
tree645d790dfb28a2a53a198a778ec1b41509cf73f0 /drivers/block/cciss.c
parentb14aa6dcd083ad00fb416a93f76131734e6c3c17 (diff)
downloadlinux-3.10-29979a71227c46b2ed970b9d603d529c718e5fc8.tar.gz
linux-3.10-29979a71227c46b2ed970b9d603d529c718e5fc8.tar.bz2
linux-3.10-29979a71227c46b2ed970b9d603d529c718e5fc8.zip
cciss: move next_command function from ifdef
The definition of next_command also ended up in wrong place It ended up inside an "#ifdef CONFIG_PROCFS". Already caught by Randy Dunlap and a couple others. Tried to put it somewhere that made sense. Signed-off-by: Mike Miller <mike.miller@hp.com> Cc: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'drivers/block/cciss.c')
-rw-r--r--drivers/block/cciss.c45
1 files changed, 23 insertions, 22 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 156ea365c14..10a0268a1f9 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -213,6 +213,7 @@ static void cciss_hba_release(struct device *dev);
static void cciss_device_release(struct device *dev);
static void cciss_free_gendisk(ctlr_info_t *h, int drv_index);
static void cciss_free_drive_info(ctlr_info_t *h, int drv_index);
+static inline u32 next_command(ctlr_info_t *h);
/* performant mode helper functions */
static void calc_bucket_map(int *bucket, int num_buckets, int nsgs,
@@ -374,28 +375,6 @@ static const char *raid_label[] = { "0", "4", "1(1+0)", "5", "5+1", "ADG",
#ifdef CONFIG_PROC_FS
-static inline u32 next_command(ctlr_info_t *h)
-{
- u32 a;
-
- if (unlikely(h->transMethod != CFGTBL_Trans_Performant))
- return h->access.command_completed(h);
-
- if ((*(h->reply_pool_head) & 1) == (h->reply_pool_wraparound)) {
- a = *(h->reply_pool_head); /* Next cmd in ring buffer */
- (h->reply_pool_head)++;
- h->commands_outstanding--;
- } else {
- a = FIFO_EMPTY;
- }
- /* Check for wraparound */
- if (h->reply_pool_head == (h->reply_pool + h->max_commands)) {
- h->reply_pool_head = h->reply_pool;
- h->reply_pool_wraparound ^= 1;
- }
- return a;
-}
-
/*
* Report information about this controller.
*/
@@ -3411,6 +3390,28 @@ static inline void finish_cmd(ctlr_info_t *h, CommandList_struct *c,
#endif
}
+static inline u32 next_command(ctlr_info_t *h)
+{
+ u32 a;
+
+ if (unlikely(h->transMethod != CFGTBL_Trans_Performant))
+ return h->access.command_completed(h);
+
+ if ((*(h->reply_pool_head) & 1) == (h->reply_pool_wraparound)) {
+ a = *(h->reply_pool_head); /* Next cmd in ring buffer */
+ (h->reply_pool_head)++;
+ h->commands_outstanding--;
+ } else {
+ a = FIFO_EMPTY;
+ }
+ /* Check for wraparound */
+ if (h->reply_pool_head == (h->reply_pool + h->max_commands)) {
+ h->reply_pool_head = h->reply_pool;
+ h->reply_pool_wraparound ^= 1;
+ }
+ return a;
+}
+
/* process completion of an indexed ("direct lookup") command */
static inline u32 process_indexed_cmd(ctlr_info_t *h, u32 raw_tag)
{