diff options
author | Anup Patel <anup.patel@broadcom.com> | 2017-08-22 05:56:55 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2017-08-28 07:14:24 -0400 |
commit | abfa251afe27ee7820c3a082fe573ec5bedb3488 (patch) | |
tree | 7218ce44e3372f85d91555e1116aea5c5a177e6a | |
parent | e7ae72aa65a1241bc3eec0ad5906e64da1158623 (diff) |
dmaengine: bcm-sba-raid: Remove reqs_free_count from sba_device
The reqs_free_count member of sba_device is not used anywhere
hence no point in tracking number of free sba_request.
Signed-off-by: Anup Patel <anup.patel@broadcom.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | drivers/dma/bcm-sba-raid.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/dma/bcm-sba-raid.c b/drivers/dma/bcm-sba-raid.c index 9d3ed92e162c..fdc9891f1e2f 100644 --- a/drivers/dma/bcm-sba-raid.c +++ b/drivers/dma/bcm-sba-raid.c | |||
@@ -162,7 +162,6 @@ struct sba_device { | |||
162 | struct list_head reqs_completed_list; | 162 | struct list_head reqs_completed_list; |
163 | struct list_head reqs_aborted_list; | 163 | struct list_head reqs_aborted_list; |
164 | struct list_head reqs_free_list; | 164 | struct list_head reqs_free_list; |
165 | int reqs_free_count; | ||
166 | }; | 165 | }; |
167 | 166 | ||
168 | /* ====== Command helper routines ===== */ | 167 | /* ====== Command helper routines ===== */ |
@@ -207,10 +206,8 @@ static struct sba_request *sba_alloc_request(struct sba_device *sba) | |||
207 | spin_lock_irqsave(&sba->reqs_lock, flags); | 206 | spin_lock_irqsave(&sba->reqs_lock, flags); |
208 | req = list_first_entry_or_null(&sba->reqs_free_list, | 207 | req = list_first_entry_or_null(&sba->reqs_free_list, |
209 | struct sba_request, node); | 208 | struct sba_request, node); |
210 | if (req) { | 209 | if (req) |
211 | list_move_tail(&req->node, &sba->reqs_alloc_list); | 210 | list_move_tail(&req->node, &sba->reqs_alloc_list); |
212 | sba->reqs_free_count--; | ||
213 | } | ||
214 | spin_unlock_irqrestore(&sba->reqs_lock, flags); | 211 | spin_unlock_irqrestore(&sba->reqs_lock, flags); |
215 | if (!req) | 212 | if (!req) |
216 | return NULL; | 213 | return NULL; |
@@ -276,7 +273,6 @@ static void _sba_free_request(struct sba_device *sba, | |||
276 | list_move_tail(&req->node, &sba->reqs_free_list); | 273 | list_move_tail(&req->node, &sba->reqs_free_list); |
277 | if (list_empty(&sba->reqs_active_list)) | 274 | if (list_empty(&sba->reqs_active_list)) |
278 | sba->reqs_fence = false; | 275 | sba->reqs_fence = false; |
279 | sba->reqs_free_count++; | ||
280 | } | 276 | } |
281 | 277 | ||
282 | static void sba_received_request(struct sba_request *req) | 278 | static void sba_received_request(struct sba_request *req) |
@@ -1523,8 +1519,6 @@ static int sba_prealloc_channel_resources(struct sba_device *sba) | |||
1523 | list_add_tail(&req->node, &sba->reqs_free_list); | 1519 | list_add_tail(&req->node, &sba->reqs_free_list); |
1524 | } | 1520 | } |
1525 | 1521 | ||
1526 | sba->reqs_free_count = sba->max_req; | ||
1527 | |||
1528 | return 0; | 1522 | return 0; |
1529 | 1523 | ||
1530 | fail_free_cmds_pool: | 1524 | fail_free_cmds_pool: |