diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2007-10-08 19:22:29 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:55:29 -0400 |
commit | 9265fabf0d4c3d0a52e169d4b9149d52fd91db69 (patch) | |
tree | 3e3f642719fd05cc2cd4759d7365b10ac89dda2c /drivers/net/cxgb3/cxgb3_offload.c | |
parent | 33a85aa1c915c2f114bdac9b6d1ec00cc0fbc485 (diff) |
cxgb3 sparse warning fixes
Fix warnings from sparse related to shadowed variables and routines
that should be declared static.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/cxgb3/cxgb3_offload.c')
-rw-r--r-- | drivers/net/cxgb3/cxgb3_offload.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/drivers/net/cxgb3/cxgb3_offload.c b/drivers/net/cxgb3/cxgb3_offload.c index 1c8eec38bde3..bd25421bc12a 100644 --- a/drivers/net/cxgb3/cxgb3_offload.c +++ b/drivers/net/cxgb3/cxgb3_offload.c | |||
@@ -222,32 +222,32 @@ static int cxgb_rdma_ctl(struct adapter *adapter, unsigned int req, void *data) | |||
222 | int ret = 0; | 222 | int ret = 0; |
223 | 223 | ||
224 | switch (req) { | 224 | switch (req) { |
225 | case RDMA_GET_PARAMS:{ | 225 | case RDMA_GET_PARAMS: { |
226 | struct rdma_info *req = data; | 226 | struct rdma_info *rdma = data; |
227 | struct pci_dev *pdev = adapter->pdev; | 227 | struct pci_dev *pdev = adapter->pdev; |
228 | 228 | ||
229 | req->udbell_physbase = pci_resource_start(pdev, 2); | 229 | rdma->udbell_physbase = pci_resource_start(pdev, 2); |
230 | req->udbell_len = pci_resource_len(pdev, 2); | 230 | rdma->udbell_len = pci_resource_len(pdev, 2); |
231 | req->tpt_base = | 231 | rdma->tpt_base = |
232 | t3_read_reg(adapter, A_ULPTX_TPT_LLIMIT); | 232 | t3_read_reg(adapter, A_ULPTX_TPT_LLIMIT); |
233 | req->tpt_top = t3_read_reg(adapter, A_ULPTX_TPT_ULIMIT); | 233 | rdma->tpt_top = t3_read_reg(adapter, A_ULPTX_TPT_ULIMIT); |
234 | req->pbl_base = | 234 | rdma->pbl_base = |
235 | t3_read_reg(adapter, A_ULPTX_PBL_LLIMIT); | 235 | t3_read_reg(adapter, A_ULPTX_PBL_LLIMIT); |
236 | req->pbl_top = t3_read_reg(adapter, A_ULPTX_PBL_ULIMIT); | 236 | rdma->pbl_top = t3_read_reg(adapter, A_ULPTX_PBL_ULIMIT); |
237 | req->rqt_base = t3_read_reg(adapter, A_ULPRX_RQ_LLIMIT); | 237 | rdma->rqt_base = t3_read_reg(adapter, A_ULPRX_RQ_LLIMIT); |
238 | req->rqt_top = t3_read_reg(adapter, A_ULPRX_RQ_ULIMIT); | 238 | rdma->rqt_top = t3_read_reg(adapter, A_ULPRX_RQ_ULIMIT); |
239 | req->kdb_addr = adapter->regs + A_SG_KDOORBELL; | 239 | rdma->kdb_addr = adapter->regs + A_SG_KDOORBELL; |
240 | req->pdev = pdev; | 240 | rdma->pdev = pdev; |
241 | break; | 241 | break; |
242 | } | 242 | } |
243 | case RDMA_CQ_OP:{ | 243 | case RDMA_CQ_OP:{ |
244 | unsigned long flags; | 244 | unsigned long flags; |
245 | struct rdma_cq_op *req = data; | 245 | struct rdma_cq_op *rdma = data; |
246 | 246 | ||
247 | /* may be called in any context */ | 247 | /* may be called in any context */ |
248 | spin_lock_irqsave(&adapter->sge.reg_lock, flags); | 248 | spin_lock_irqsave(&adapter->sge.reg_lock, flags); |
249 | ret = t3_sge_cqcntxt_op(adapter, req->id, req->op, | 249 | ret = t3_sge_cqcntxt_op(adapter, rdma->id, rdma->op, |
250 | req->credits); | 250 | rdma->credits); |
251 | spin_unlock_irqrestore(&adapter->sge.reg_lock, flags); | 251 | spin_unlock_irqrestore(&adapter->sge.reg_lock, flags); |
252 | break; | 252 | break; |
253 | } | 253 | } |
@@ -274,15 +274,15 @@ static int cxgb_rdma_ctl(struct adapter *adapter, unsigned int req, void *data) | |||
274 | break; | 274 | break; |
275 | } | 275 | } |
276 | case RDMA_CQ_SETUP:{ | 276 | case RDMA_CQ_SETUP:{ |
277 | struct rdma_cq_setup *req = data; | 277 | struct rdma_cq_setup *rdma = data; |
278 | 278 | ||
279 | spin_lock_irq(&adapter->sge.reg_lock); | 279 | spin_lock_irq(&adapter->sge.reg_lock); |
280 | ret = | 280 | ret = |
281 | t3_sge_init_cqcntxt(adapter, req->id, | 281 | t3_sge_init_cqcntxt(adapter, rdma->id, |
282 | req->base_addr, req->size, | 282 | rdma->base_addr, rdma->size, |
283 | ASYNC_NOTIF_RSPQ, | 283 | ASYNC_NOTIF_RSPQ, |
284 | req->ovfl_mode, req->credits, | 284 | rdma->ovfl_mode, rdma->credits, |
285 | req->credit_thres); | 285 | rdma->credit_thres); |
286 | spin_unlock_irq(&adapter->sge.reg_lock); | 286 | spin_unlock_irq(&adapter->sge.reg_lock); |
287 | break; | 287 | break; |
288 | } | 288 | } |
@@ -292,13 +292,13 @@ static int cxgb_rdma_ctl(struct adapter *adapter, unsigned int req, void *data) | |||
292 | spin_unlock_irq(&adapter->sge.reg_lock); | 292 | spin_unlock_irq(&adapter->sge.reg_lock); |
293 | break; | 293 | break; |
294 | case RDMA_CTRL_QP_SETUP:{ | 294 | case RDMA_CTRL_QP_SETUP:{ |
295 | struct rdma_ctrlqp_setup *req = data; | 295 | struct rdma_ctrlqp_setup *rdma = data; |
296 | 296 | ||
297 | spin_lock_irq(&adapter->sge.reg_lock); | 297 | spin_lock_irq(&adapter->sge.reg_lock); |
298 | ret = t3_sge_init_ecntxt(adapter, FW_RI_SGEEC_START, 0, | 298 | ret = t3_sge_init_ecntxt(adapter, FW_RI_SGEEC_START, 0, |
299 | SGE_CNTXT_RDMA, | 299 | SGE_CNTXT_RDMA, |
300 | ASYNC_NOTIF_RSPQ, | 300 | ASYNC_NOTIF_RSPQ, |
301 | req->base_addr, req->size, | 301 | rdma->base_addr, rdma->size, |
302 | FW_RI_TID_START, 1, 0); | 302 | FW_RI_TID_START, 1, 0); |
303 | spin_unlock_irq(&adapter->sge.reg_lock); | 303 | spin_unlock_irq(&adapter->sge.reg_lock); |
304 | break; | 304 | break; |