{
struct bcm_flash2x_readwrite flash_2x_read = {0};
struct bcm_ioctl_buffer io_buff;
- PUCHAR pReadBuff = NULL;
+ PUCHAR read_buff = NULL;
UINT NOB = 0;
UINT BuffSize = 0;
UINT ReadBytes = 0;
ReadOffset = flash_2x_read.offset;
OutPutBuff = io_buff.OutputBuffer;
- pReadBuff = kzalloc(BuffSize , GFP_KERNEL);
+ read_buff = kzalloc(BuffSize , GFP_KERNEL);
- if (pReadBuff == NULL) {
+ if (read_buff == NULL) {
BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0,
"Memory allocation failed for Flash 2.x Read Structure");
return -ENOMEM;
DBG_LVL_ALL,
"Device is in Idle/Shutdown Mode\n");
up(&ad->NVMRdmWrmLock);
- kfree(pReadBuff);
+ kfree(read_buff);
return -EACCES;
}
ReadBytes = NOB;
/* Reading the data from Flash 2.x */
- status = BcmFlash2xBulkRead(ad, (PUINT)pReadBuff,
+ status = BcmFlash2xBulkRead(ad, (PUINT)read_buff,
flash_2x_read.Section, ReadOffset, ReadBytes);
if (status) {
BCM_DEBUG_PRINT(ad,
}
BCM_DEBUG_PRINT_BUFFER(ad, DBG_TYPE_OTHERS, OSAL_DBG,
- DBG_LVL_ALL, pReadBuff, ReadBytes);
+ DBG_LVL_ALL, read_buff, ReadBytes);
- status = copy_to_user(OutPutBuff, pReadBuff, ReadBytes);
+ status = copy_to_user(OutPutBuff, read_buff, ReadBytes);
if (status) {
BCM_DEBUG_PRINT(ad,
DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL,
"Copy to use failed with status :%d", status);
up(&ad->NVMRdmWrmLock);
- kfree(pReadBuff);
+ kfree(read_buff);
return -EFAULT;
}
NOB = NOB - ReadBytes;
}
up(&ad->NVMRdmWrmLock);
- kfree(pReadBuff);
+ kfree(read_buff);
return status;
}
INT BuffSize;
INT ReadOffset = 0;
UINT ReadBytes = 0;
- PUCHAR pReadBuff;
+ PUCHAR read_buff;
void __user *OutPutBuff;
INT status = STATUS_FAILURE;
ReadOffset = stNVMRead.uiOffset;
OutPutBuff = stNVMRead.pBuffer;
- pReadBuff = kzalloc(BuffSize , GFP_KERNEL);
- if (pReadBuff == NULL) {
+ read_buff = kzalloc(BuffSize , GFP_KERNEL);
+ if (read_buff == NULL) {
BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0,
"Memory allocation failed for Flash 2.x Read Structure");
return -ENOMEM;
BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL,
"Device is in Idle/Shutdown Mode\n");
- kfree(pReadBuff);
+ kfree(read_buff);
up(&ad->NVMRdmWrmLock);
return -EACCES;
}
ReadBytes = NOB;
/* Reading the data from Flash 2.x */
- status = BeceemNVMRead(ad, (PUINT)pReadBuff,
+ status = BeceemNVMRead(ad, (PUINT)read_buff,
ReadOffset, ReadBytes);
if (status) {
BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0,
}
BCM_DEBUG_PRINT_BUFFER(ad, DBG_TYPE_OTHERS, OSAL_DBG,
- DBG_LVL_ALL, pReadBuff, ReadBytes);
+ DBG_LVL_ALL, read_buff, ReadBytes);
- status = copy_to_user(OutPutBuff, pReadBuff, ReadBytes);
+ status = copy_to_user(OutPutBuff, read_buff, ReadBytes);
if (status) {
BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0,
"Copy to use failed with status :%d",
status);
up(&ad->NVMRdmWrmLock);
- kfree(pReadBuff);
+ kfree(read_buff);
return -EFAULT;
}
NOB = NOB - ReadBytes;
}
ad->bFlashRawRead = false;
up(&ad->NVMRdmWrmLock);
- kfree(pReadBuff);
+ kfree(read_buff);
return status;
}