Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: ced1401: fix ced_get_circ_block()

Rename camel case arguments and locals in function ced_get_circ_block()

Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Luca Ellero and committed by
Greg Kroah-Hartman
7b7f6020 d9b57d9f

+18 -18
+17 -17
drivers/staging/ced1401/ced_ioc.c
··· 1406 1406 ** 1407 1407 ** Return the next available block of circularly-transferred data. 1408 1408 ****************************************************************************/ 1409 - int ced_get_circ_block(struct ced_data *ced, TCIRCBLOCK __user *pCB) 1409 + int ced_get_circ_block(struct ced_data *ced, TCIRCBLOCK __user *ucb) 1410 1410 { 1411 - int iReturn = U14ERR_NOERROR; 1412 - unsigned int nArea; 1411 + int ret = U14ERR_NOERROR; 1412 + unsigned int area; 1413 1413 TCIRCBLOCK cb; 1414 1414 1415 1415 dev_dbg(&ced->interface->dev, "%s\n", __func__); 1416 1416 1417 - if (copy_from_user(&cb, pCB, sizeof(cb))) 1417 + if (copy_from_user(&cb, ucb, sizeof(cb))) 1418 1418 return -EFAULT; 1419 1419 1420 1420 mutex_lock(&ced->io_mutex); 1421 1421 1422 - nArea = cb.nArea; /* Retrieve parameters first */ 1422 + area = cb.nArea; /* Retrieve parameters first */ 1423 1423 cb.dwOffset = 0; /* set default result (nothing) */ 1424 1424 cb.dwSize = 0; 1425 1425 1426 - if (nArea < MAX_TRANSAREAS) { /* The area number must be OK */ 1426 + if (area < MAX_TRANSAREAS) { /* The area number must be OK */ 1427 1427 /* Pointer to relevant info */ 1428 - struct transarea *pArea = &ced->trans_def[nArea]; 1428 + struct transarea *ta = &ced->trans_def[area]; 1429 1429 spin_lock_irq(&ced->staged_lock); /* Lock others out */ 1430 1430 1431 - if ((pArea->used) && (pArea->circular) && /* Must be circular area */ 1432 - (pArea->circ_to_host)) { /* For now at least must be to host */ 1433 - if (pArea->blocks[0].size > 0) { /* Got anything? */ 1434 - cb.dwOffset = pArea->blocks[0].offset; 1435 - cb.dwSize = pArea->blocks[0].size; 1431 + if ((ta->used) && (ta->circular) && /* Must be circular area */ 1432 + (ta->circ_to_host)) { /* For now at least must be to host */ 1433 + if (ta->blocks[0].size > 0) { /* Got anything? */ 1434 + cb.dwOffset = ta->blocks[0].offset; 1435 + cb.dwSize = ta->blocks[0].size; 1436 1436 dev_dbg(&ced->interface->dev, 1437 1437 "%s: return block 0: %d bytes at %d\n", 1438 1438 __func__, cb.dwSize, cb.dwOffset); 1439 1439 } 1440 1440 } else 1441 - iReturn = U14ERR_NOTSET; 1441 + ret = U14ERR_NOTSET; 1442 1442 1443 1443 spin_unlock_irq(&ced->staged_lock); 1444 1444 } else 1445 - iReturn = U14ERR_BADAREA; 1445 + ret = U14ERR_BADAREA; 1446 1446 1447 - if (copy_to_user(pCB, &cb, sizeof(cb))) 1448 - iReturn = -EFAULT; 1447 + if (copy_to_user(ucb, &cb, sizeof(cb))) 1448 + ret = -EFAULT; 1449 1449 1450 1450 mutex_unlock(&ced->io_mutex); 1451 - return iReturn; 1451 + return ret; 1452 1452 } 1453 1453 1454 1454 /****************************************************************************
+1 -1
drivers/staging/ced1401/usb1401.h
··· 253 253 extern int ced_dbg_stop_loop(struct ced_data *ced); 254 254 extern int ced_set_circular(struct ced_data *ced, 255 255 struct transfer_area_desc __user *utd); 256 - extern int ced_get_circ_block(struct ced_data *ced, TCIRCBLOCK __user *pCB); 256 + extern int ced_get_circ_block(struct ced_data *ced, TCIRCBLOCK __user *ucb); 257 257 extern int ced_free_circ_block(struct ced_data *ced, TCIRCBLOCK __user *pCB); 258 258 extern int ced_wait_event(struct ced_data *ced, int area, int time_out); 259 259 extern int ced_test_event(struct ced_data *ced, int area);