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

Staging: bcm: Bcmchar.c: Renamed variable "IoBuffer" -> "io_buff"

Renamed variable "IoBuffer" -> "io_buff" in

    bcm_char_ioctl_reg_read_private()
    bcm_char_ioctl_reg_write_private()
    bcm_char_ioctl_reg_write_private()
    bcm_char_ioctl_eeprom_reg_read()
    bcm_char_ioctl_gpio_set_request()
Signed-off-by: default avatarMatthias Beyer <mail@beyermatthias.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 201893bc
...@@ -247,7 +247,7 @@ static int bcm_char_ioctl_reg_read_private(void __user *argp, ...@@ -247,7 +247,7 @@ static int bcm_char_ioctl_reg_read_private(void __user *argp,
struct bcm_mini_adapter *ad) struct bcm_mini_adapter *ad)
{ {
struct bcm_rdm_buffer rdm_buff = {0}; struct bcm_rdm_buffer rdm_buff = {0};
struct bcm_ioctl_buffer IoBuffer; struct bcm_ioctl_buffer io_buff;
PCHAR temp_buff; PCHAR temp_buff;
INT status = STATUS_FAILURE; INT status = STATUS_FAILURE;
UINT Bufflen; UINT Bufflen;
...@@ -255,22 +255,22 @@ static int bcm_char_ioctl_reg_read_private(void __user *argp, ...@@ -255,22 +255,22 @@ static int bcm_char_ioctl_reg_read_private(void __user *argp,
int bytes; int bytes;
/* Copy Ioctl Buffer structure */ /* Copy Ioctl Buffer structure */
if (copy_from_user(&IoBuffer, argp, sizeof(struct bcm_ioctl_buffer))) if (copy_from_user(&io_buff, argp, sizeof(struct bcm_ioctl_buffer)))
return -EFAULT; return -EFAULT;
if (IoBuffer.InputLength > sizeof(rdm_buff)) if (io_buff.InputLength > sizeof(rdm_buff))
return -EINVAL; return -EINVAL;
if (copy_from_user(&rdm_buff, IoBuffer.InputBuffer, if (copy_from_user(&rdm_buff, io_buff.InputBuffer,
IoBuffer.InputLength)) io_buff.InputLength))
return -EFAULT; return -EFAULT;
if (IoBuffer.OutputLength > USHRT_MAX || if (io_buff.OutputLength > USHRT_MAX ||
IoBuffer.OutputLength == 0) { io_buff.OutputLength == 0) {
return -EINVAL; return -EINVAL;
} }
Bufflen = IoBuffer.OutputLength; Bufflen = io_buff.OutputLength;
temp_value = 4 - (Bufflen % 4); temp_value = 4 - (Bufflen % 4);
Bufflen += temp_value % 4; Bufflen += temp_value % 4;
...@@ -282,7 +282,7 @@ static int bcm_char_ioctl_reg_read_private(void __user *argp, ...@@ -282,7 +282,7 @@ static int bcm_char_ioctl_reg_read_private(void __user *argp,
(PUINT)temp_buff, Bufflen); (PUINT)temp_buff, Bufflen);
if (bytes > 0) { if (bytes > 0) {
status = STATUS_SUCCESS; status = STATUS_SUCCESS;
if (copy_to_user(IoBuffer.OutputBuffer, temp_buff, bytes)) { if (copy_to_user(io_buff.OutputBuffer, temp_buff, bytes)) {
kfree(temp_buff); kfree(temp_buff);
return -EFAULT; return -EFAULT;
} }
...@@ -298,21 +298,21 @@ static int bcm_char_ioctl_reg_write_private(void __user *argp, ...@@ -298,21 +298,21 @@ static int bcm_char_ioctl_reg_write_private(void __user *argp,
struct bcm_mini_adapter *ad) struct bcm_mini_adapter *ad)
{ {
struct bcm_wrm_buffer sWrmBuffer = {0}; struct bcm_wrm_buffer sWrmBuffer = {0};
struct bcm_ioctl_buffer IoBuffer; struct bcm_ioctl_buffer io_buff;
UINT uiTempVar = 0; UINT uiTempVar = 0;
INT status; INT status;
/* Copy Ioctl Buffer structure */ /* Copy Ioctl Buffer structure */
if (copy_from_user(&IoBuffer, argp, sizeof(struct bcm_ioctl_buffer))) if (copy_from_user(&io_buff, argp, sizeof(struct bcm_ioctl_buffer)))
return -EFAULT; return -EFAULT;
if (IoBuffer.InputLength > sizeof(sWrmBuffer)) if (io_buff.InputLength > sizeof(sWrmBuffer))
return -EINVAL; return -EINVAL;
/* Get WrmBuffer structure */ /* Get WrmBuffer structure */
if (copy_from_user(&sWrmBuffer, IoBuffer.InputBuffer, if (copy_from_user(&sWrmBuffer, io_buff.InputBuffer,
IoBuffer.InputLength)) io_buff.InputLength))
return -EFAULT; return -EFAULT;
uiTempVar = sWrmBuffer.Register & EEPROM_REJECT_MASK; uiTempVar = sWrmBuffer.Register & EEPROM_REJECT_MASK;
...@@ -345,7 +345,7 @@ static int bcm_char_ioctl_eeprom_reg_read(void __user *argp, ...@@ -345,7 +345,7 @@ static int bcm_char_ioctl_eeprom_reg_read(void __user *argp,
struct bcm_mini_adapter *ad) struct bcm_mini_adapter *ad)
{ {
struct bcm_rdm_buffer rdm_buff = {0}; struct bcm_rdm_buffer rdm_buff = {0};
struct bcm_ioctl_buffer IoBuffer; struct bcm_ioctl_buffer io_buff;
PCHAR temp_buff = NULL; PCHAR temp_buff = NULL;
UINT uiTempVar = 0; UINT uiTempVar = 0;
INT status; INT status;
...@@ -361,22 +361,22 @@ static int bcm_char_ioctl_eeprom_reg_read(void __user *argp, ...@@ -361,22 +361,22 @@ static int bcm_char_ioctl_eeprom_reg_read(void __user *argp,
} }
/* Copy Ioctl Buffer structure */ /* Copy Ioctl Buffer structure */
if (copy_from_user(&IoBuffer, argp, sizeof(struct bcm_ioctl_buffer))) if (copy_from_user(&io_buff, argp, sizeof(struct bcm_ioctl_buffer)))
return -EFAULT; return -EFAULT;
if (IoBuffer.InputLength > sizeof(rdm_buff)) if (io_buff.InputLength > sizeof(rdm_buff))
return -EINVAL; return -EINVAL;
if (copy_from_user(&rdm_buff, IoBuffer.InputBuffer, if (copy_from_user(&rdm_buff, io_buff.InputBuffer,
IoBuffer.InputLength)) io_buff.InputLength))
return -EFAULT; return -EFAULT;
if (IoBuffer.OutputLength > USHRT_MAX || if (io_buff.OutputLength > USHRT_MAX ||
IoBuffer.OutputLength == 0) { io_buff.OutputLength == 0) {
return -EINVAL; return -EINVAL;
} }
temp_buff = kmalloc(IoBuffer.OutputLength, GFP_KERNEL); temp_buff = kmalloc(io_buff.OutputLength, GFP_KERNEL);
if (!temp_buff) if (!temp_buff)
return STATUS_FAILURE; return STATUS_FAILURE;
...@@ -393,11 +393,11 @@ static int bcm_char_ioctl_eeprom_reg_read(void __user *argp, ...@@ -393,11 +393,11 @@ static int bcm_char_ioctl_eeprom_reg_read(void __user *argp,
uiTempVar = rdm_buff.Register & EEPROM_REJECT_MASK; uiTempVar = rdm_buff.Register & EEPROM_REJECT_MASK;
bytes = rdmaltWithLock(ad, (UINT)rdm_buff.Register, bytes = rdmaltWithLock(ad, (UINT)rdm_buff.Register,
(PUINT)temp_buff, IoBuffer.OutputLength); (PUINT)temp_buff, io_buff.OutputLength);
if (bytes > 0) { if (bytes > 0) {
status = STATUS_SUCCESS; status = STATUS_SUCCESS;
if (copy_to_user(IoBuffer.OutputBuffer, temp_buff, bytes)) { if (copy_to_user(io_buff.OutputBuffer, temp_buff, bytes)) {
kfree(temp_buff); kfree(temp_buff);
return -EFAULT; return -EFAULT;
} }
...@@ -414,7 +414,7 @@ static int bcm_char_ioctl_eeprom_reg_write(void __user *argp, ...@@ -414,7 +414,7 @@ static int bcm_char_ioctl_eeprom_reg_write(void __user *argp,
UINT cmd) UINT cmd)
{ {
struct bcm_wrm_buffer sWrmBuffer = {0}; struct bcm_wrm_buffer sWrmBuffer = {0};
struct bcm_ioctl_buffer IoBuffer; struct bcm_ioctl_buffer io_buff;
UINT uiTempVar = 0; UINT uiTempVar = 0;
INT status; INT status;
...@@ -428,15 +428,15 @@ static int bcm_char_ioctl_eeprom_reg_write(void __user *argp, ...@@ -428,15 +428,15 @@ static int bcm_char_ioctl_eeprom_reg_write(void __user *argp,
} }
/* Copy Ioctl Buffer structure */ /* Copy Ioctl Buffer structure */
if (copy_from_user(&IoBuffer, argp, sizeof(struct bcm_ioctl_buffer))) if (copy_from_user(&io_buff, argp, sizeof(struct bcm_ioctl_buffer)))
return -EFAULT; return -EFAULT;
if (IoBuffer.InputLength > sizeof(sWrmBuffer)) if (io_buff.InputLength > sizeof(sWrmBuffer))
return -EINVAL; return -EINVAL;
/* Get WrmBuffer structure */ /* Get WrmBuffer structure */
if (copy_from_user(&sWrmBuffer, IoBuffer.InputBuffer, if (copy_from_user(&sWrmBuffer, io_buff.InputBuffer,
IoBuffer.InputLength)) io_buff.InputLength))
return -EFAULT; return -EFAULT;
if ((((ULONG)sWrmBuffer.Register & 0x0F000000) != 0x0F000000) || if ((((ULONG)sWrmBuffer.Register & 0x0F000000) != 0x0F000000) ||
...@@ -480,7 +480,7 @@ static int bcm_char_ioctl_gpio_set_request(void __user *argp, ...@@ -480,7 +480,7 @@ static int bcm_char_ioctl_gpio_set_request(void __user *argp,
struct bcm_mini_adapter *ad) struct bcm_mini_adapter *ad)
{ {
struct bcm_gpio_info gpio_info = {0}; struct bcm_gpio_info gpio_info = {0};
struct bcm_ioctl_buffer IoBuffer; struct bcm_ioctl_buffer io_buff;
UCHAR ucResetValue[4]; UCHAR ucResetValue[4];
UINT value = 0; UINT value = 0;
UINT uiBit = 0; UINT uiBit = 0;
...@@ -498,14 +498,14 @@ static int bcm_char_ioctl_gpio_set_request(void __user *argp, ...@@ -498,14 +498,14 @@ static int bcm_char_ioctl_gpio_set_request(void __user *argp,
return -EACCES; return -EACCES;
} }
if (copy_from_user(&IoBuffer, argp, sizeof(struct bcm_ioctl_buffer))) if (copy_from_user(&io_buff, argp, sizeof(struct bcm_ioctl_buffer)))
return -EFAULT; return -EFAULT;
if (IoBuffer.InputLength > sizeof(gpio_info)) if (io_buff.InputLength > sizeof(gpio_info))
return -EINVAL; return -EINVAL;
if (copy_from_user(&gpio_info, IoBuffer.InputBuffer, if (copy_from_user(&gpio_info, io_buff.InputBuffer,
IoBuffer.InputLength)) io_buff.InputLength))
return -EFAULT; return -EFAULT;
uiBit = gpio_info.uiGpioNumber; uiBit = gpio_info.uiGpioNumber;
......
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