Commit b69e66bc authored by Matthias Beyer's avatar Matthias Beyer Committed by Greg Kroah-Hartman

Staging: bcm: Bcmchar.c: Renamed variable: "WriteBytes" -> "write_bytes"

Signed-off-by: default avatarMatthias Beyer <mail@beyermatthias.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ca3c80c2
...@@ -1724,7 +1724,7 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, ...@@ -1724,7 +1724,7 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp,
UINT NOB = 0; UINT NOB = 0;
UINT buff_size = 0; UINT buff_size = 0;
UINT WriteOffset = 0; UINT WriteOffset = 0;
UINT WriteBytes = 0; UINT write_bytes = 0;
INT status = STATUS_FAILURE; INT status = STATUS_FAILURE;
if (IsFlash2x(ad) != TRUE) { if (IsFlash2x(ad) != TRUE) {
...@@ -1783,14 +1783,14 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, ...@@ -1783,14 +1783,14 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp,
return -ENOMEM; return -ENOMEM;
/* extracting the remainder of the given offset. */ /* extracting the remainder of the given offset. */
WriteBytes = ad->uiSectorSize; write_bytes = ad->uiSectorSize;
if (WriteOffset % ad->uiSectorSize) { if (WriteOffset % ad->uiSectorSize) {
WriteBytes = ad->uiSectorSize - write_bytes = ad->uiSectorSize -
(WriteOffset % ad->uiSectorSize); (WriteOffset % ad->uiSectorSize);
} }
if (NOB < WriteBytes) if (NOB < write_bytes)
WriteBytes = NOB; write_bytes = NOB;
down(&ad->NVMRdmWrmLock); down(&ad->NVMRdmWrmLock);
...@@ -1807,7 +1807,7 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, ...@@ -1807,7 +1807,7 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp,
BcmFlash2xCorruptSig(ad, sFlash2xWrite.Section); BcmFlash2xCorruptSig(ad, sFlash2xWrite.Section);
do { do {
status = copy_from_user(pWriteBuff, InputAddr, WriteBytes); status = copy_from_user(pWriteBuff, InputAddr, write_bytes);
if (status) { if (status) {
BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0, BCM_DEBUG_PRINT(ad, DBG_TYPE_PRINTK, 0, 0,
"Copy to user failed with status :%d", status); "Copy to user failed with status :%d", status);
...@@ -1816,13 +1816,13 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, ...@@ -1816,13 +1816,13 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp,
return -EFAULT; return -EFAULT;
} }
BCM_DEBUG_PRINT_BUFFER(ad, DBG_TYPE_OTHERS, BCM_DEBUG_PRINT_BUFFER(ad, DBG_TYPE_OTHERS,
OSAL_DBG, DBG_LVL_ALL, pWriteBuff, WriteBytes); OSAL_DBG, DBG_LVL_ALL, pWriteBuff, write_bytes);
/* Writing the data from Flash 2.x */ /* Writing the data from Flash 2.x */
status = BcmFlash2xBulkWrite(ad, (PUINT)pWriteBuff, status = BcmFlash2xBulkWrite(ad, (PUINT)pWriteBuff,
sFlash2xWrite.Section, sFlash2xWrite.Section,
WriteOffset, WriteOffset,
WriteBytes, write_bytes,
sFlash2xWrite.bVerify); sFlash2xWrite.bVerify);
if (status) { if (status) {
...@@ -1831,14 +1831,14 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp, ...@@ -1831,14 +1831,14 @@ static int bcm_char_ioctl_flash2x_section_write(void __user *argp,
break; break;
} }
NOB = NOB - WriteBytes; NOB = NOB - write_bytes;
if (NOB) { if (NOB) {
WriteOffset = WriteOffset + WriteBytes; WriteOffset = WriteOffset + write_bytes;
InputAddr = InputAddr + WriteBytes; InputAddr = InputAddr + write_bytes;
if (NOB > ad->uiSectorSize) if (NOB > ad->uiSectorSize)
WriteBytes = ad->uiSectorSize; write_bytes = ad->uiSectorSize;
else else
WriteBytes = NOB; write_bytes = NOB;
} }
} while (NOB > 0); } while (NOB > 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment