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

staging: ced1401: fix ced_set_circular()

Rename camel case arguments and locals in function ced_set_circular()

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
d9b57d9f 7bbddb60

+16 -12
+14 -11
drivers/staging/ced1401/ced_ioc.c
··· 1373 1373 ** booked and a transfer to that area is in progress. Otherwise, we will 1374 1374 ** release the area and re-assign it. 1375 1375 ****************************************************************************/ 1376 - int ced_set_circular(struct ced_data *ced, struct transfer_area_desc __user *pTD) 1376 + int ced_set_circular(struct ced_data *ced, 1377 + struct transfer_area_desc __user *utd) 1377 1378 { 1378 - int iReturn; 1379 - bool bToHost; 1379 + int ret; 1380 + bool to_host; 1380 1381 struct transfer_area_desc td; 1381 1382 1382 - if (copy_from_user(&td, pTD, sizeof(td))) 1383 + if (copy_from_user(&td, utd, sizeof(td))) 1383 1384 return -EFAULT; 1384 1385 1385 1386 mutex_lock(&ced->io_mutex); 1386 1387 dev_dbg(&ced->interface->dev, "%s: area:%d, size:%08x\n", 1387 1388 __func__, td.wAreaNum, td.dwLength); 1388 - bToHost = td.eSize != 0; /* this is used as the tohost flag */ 1389 + to_host = td.eSize != 0; /* this is used as the tohost flag */ 1389 1390 1390 - /* The strange cast is done so that we don't get warnings in 32-bit linux about the size of the */ 1391 - /* pointer. The pointer is always passed as a 64-bit object so that we don't have problems using */ 1392 - /* a 32-bit program on a 64-bit system. unsigned long is 64-bits on a 64-bit system. */ 1393 - iReturn = 1391 + /* The strange cast is done so that we don't get warnings in 32-bit */ 1392 + /* linux about the size of the pointer. The pointer is always passed */ 1393 + /* as a 64-bit object so that we don't have problems using a 32-bit */ 1394 + /* program on a 64-bit system. unsigned long is 64-bits on a 64-bit */ 1395 + /* system. */ 1396 + ret = 1394 1397 ced_set_area(ced, td.wAreaNum, 1395 1398 (char __user *)((unsigned long)td.lpvBuff), td.dwLength, 1396 - true, bToHost); 1399 + true, to_host); 1397 1400 mutex_unlock(&ced->io_mutex); 1398 - return iReturn; 1401 + return ret; 1399 1402 } 1400 1403 1401 1404 /****************************************************************************
+2 -1
drivers/staging/ced1401/usb1401.h
··· 251 251 extern int ced_dbg_ramp_addr(struct ced_data *ced, TDBGBLOCK __user *udb); 252 252 extern int ced_dbg_get_data(struct ced_data *ced, TDBGBLOCK __user *udb); 253 253 extern int ced_dbg_stop_loop(struct ced_data *ced); 254 - extern int ced_set_circular(struct ced_data *ced, struct transfer_area_desc __user *pTD); 254 + extern int ced_set_circular(struct ced_data *ced, 255 + struct transfer_area_desc __user *utd); 255 256 extern int ced_get_circ_block(struct ced_data *ced, TCIRCBLOCK __user *pCB); 256 257 extern int ced_free_circ_block(struct ced_data *ced, TCIRCBLOCK __user *pCB); 257 258 extern int ced_wait_event(struct ced_data *ced, int area, int time_out);