[PATCH 11/17] Staging: bcm: Bcmchar.c: Renamed variable "IoBuffer" -> "io_buff"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: Matthias Beyer <mail@xxxxxxxxxxxxxxxx>
---
 drivers/staging/bcm/Bcmchar.c | 68 +++++++++++++++++++++----------------------
 1 file changed, 34 insertions(+), 34 deletions(-)

diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c
index d605e9c..7eac6be 100644
--- a/drivers/staging/bcm/Bcmchar.c
+++ b/drivers/staging/bcm/Bcmchar.c
@@ -247,7 +247,7 @@ static int bcm_char_ioctl_reg_read_private(void __user *argp,
 					   struct bcm_mini_adapter *ad)
 {
 	struct bcm_rdm_buffer rdm_buff = {0};
-	struct bcm_ioctl_buffer IoBuffer;
+	struct bcm_ioctl_buffer io_buff;
 	PCHAR temp_buff;
 	INT status = STATUS_FAILURE;
 	UINT Bufflen;
@@ -255,22 +255,22 @@ static int bcm_char_ioctl_reg_read_private(void __user *argp,
 	int bytes;
 
 	/* 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;
 
-	if (IoBuffer.InputLength > sizeof(rdm_buff))
+	if (io_buff.InputLength > sizeof(rdm_buff))
 		return -EINVAL;
 
-	if (copy_from_user(&rdm_buff, IoBuffer.InputBuffer,
-		IoBuffer.InputLength))
+	if (copy_from_user(&rdm_buff, io_buff.InputBuffer,
+		io_buff.InputLength))
 		return -EFAULT;
 
-	if (IoBuffer.OutputLength > USHRT_MAX ||
-		IoBuffer.OutputLength == 0) {
+	if (io_buff.OutputLength > USHRT_MAX ||
+		io_buff.OutputLength == 0) {
 		return -EINVAL;
 	}
 
-	Bufflen = IoBuffer.OutputLength;
+	Bufflen = io_buff.OutputLength;
 	temp_value = 4 - (Bufflen % 4);
 	Bufflen += temp_value % 4;
 
@@ -282,7 +282,7 @@ static int bcm_char_ioctl_reg_read_private(void __user *argp,
 			(PUINT)temp_buff, Bufflen);
 	if (bytes > 0) {
 		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);
 			return -EFAULT;
 		}
@@ -298,21 +298,21 @@ static int bcm_char_ioctl_reg_write_private(void __user *argp,
 					    struct bcm_mini_adapter *ad)
 {
 	struct bcm_wrm_buffer sWrmBuffer = {0};
-	struct bcm_ioctl_buffer IoBuffer;
+	struct bcm_ioctl_buffer io_buff;
 	UINT uiTempVar = 0;
 	INT status;
 
 	/* 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;
 
-	if (IoBuffer.InputLength > sizeof(sWrmBuffer))
+	if (io_buff.InputLength > sizeof(sWrmBuffer))
 		return -EINVAL;
 
 	/* Get WrmBuffer structure */
-	if (copy_from_user(&sWrmBuffer, IoBuffer.InputBuffer,
-		IoBuffer.InputLength))
+	if (copy_from_user(&sWrmBuffer, io_buff.InputBuffer,
+		io_buff.InputLength))
 		return -EFAULT;
 
 	uiTempVar = sWrmBuffer.Register & EEPROM_REJECT_MASK;
@@ -345,7 +345,7 @@ static int bcm_char_ioctl_eeprom_reg_read(void __user *argp,
 					  struct bcm_mini_adapter *ad)
 {
 	struct bcm_rdm_buffer rdm_buff = {0};
-	struct bcm_ioctl_buffer IoBuffer;
+	struct bcm_ioctl_buffer io_buff;
 	PCHAR temp_buff = NULL;
 	UINT uiTempVar = 0;
 	INT status;
@@ -361,22 +361,22 @@ static int bcm_char_ioctl_eeprom_reg_read(void __user *argp,
 	}
 
 	/* 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;
 
-	if (IoBuffer.InputLength > sizeof(rdm_buff))
+	if (io_buff.InputLength > sizeof(rdm_buff))
 		return -EINVAL;
 
-	if (copy_from_user(&rdm_buff, IoBuffer.InputBuffer,
-		IoBuffer.InputLength))
+	if (copy_from_user(&rdm_buff, io_buff.InputBuffer,
+		io_buff.InputLength))
 		return -EFAULT;
 
-	if (IoBuffer.OutputLength > USHRT_MAX ||
-		IoBuffer.OutputLength == 0) {
+	if (io_buff.OutputLength > USHRT_MAX ||
+		io_buff.OutputLength == 0) {
 		return -EINVAL;
 	}
 
-	temp_buff = kmalloc(IoBuffer.OutputLength, GFP_KERNEL);
+	temp_buff = kmalloc(io_buff.OutputLength, GFP_KERNEL);
 	if (!temp_buff)
 		return STATUS_FAILURE;
 
@@ -393,11 +393,11 @@ static int bcm_char_ioctl_eeprom_reg_read(void __user *argp,
 
 	uiTempVar = rdm_buff.Register & EEPROM_REJECT_MASK;
 	bytes = rdmaltWithLock(ad, (UINT)rdm_buff.Register,
-			       (PUINT)temp_buff, IoBuffer.OutputLength);
+			       (PUINT)temp_buff, io_buff.OutputLength);
 
 	if (bytes > 0) {
 		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);
 			return -EFAULT;
 		}
@@ -414,7 +414,7 @@ static int bcm_char_ioctl_eeprom_reg_write(void __user *argp,
 					   UINT cmd)
 {
 	struct bcm_wrm_buffer sWrmBuffer = {0};
-	struct bcm_ioctl_buffer IoBuffer;
+	struct bcm_ioctl_buffer io_buff;
 	UINT uiTempVar = 0;
 	INT status;
 
@@ -428,15 +428,15 @@ static int bcm_char_ioctl_eeprom_reg_write(void __user *argp,
 	}
 
 	/* 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;
 
-	if (IoBuffer.InputLength > sizeof(sWrmBuffer))
+	if (io_buff.InputLength > sizeof(sWrmBuffer))
 		return -EINVAL;
 
 	/* Get WrmBuffer structure */
-	if (copy_from_user(&sWrmBuffer, IoBuffer.InputBuffer,
-		IoBuffer.InputLength))
+	if (copy_from_user(&sWrmBuffer, io_buff.InputBuffer,
+		io_buff.InputLength))
 		return -EFAULT;
 
 	if ((((ULONG)sWrmBuffer.Register & 0x0F000000) != 0x0F000000) ||
@@ -480,7 +480,7 @@ static int bcm_char_ioctl_gpio_set_request(void __user *argp,
 					   struct bcm_mini_adapter *ad)
 {
 	struct bcm_gpio_info gpio_info = {0};
-	struct bcm_ioctl_buffer IoBuffer;
+	struct bcm_ioctl_buffer io_buff;
 	UCHAR ucResetValue[4];
 	UINT value = 0;
 	UINT uiBit = 0;
@@ -498,14 +498,14 @@ static int bcm_char_ioctl_gpio_set_request(void __user *argp,
 		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;
 
-	if (IoBuffer.InputLength > sizeof(gpio_info))
+	if (io_buff.InputLength > sizeof(gpio_info))
 		return -EINVAL;
 
-	if (copy_from_user(&gpio_info, IoBuffer.InputBuffer,
-			   IoBuffer.InputLength))
+	if (copy_from_user(&gpio_info, io_buff.InputBuffer,
+			   io_buff.InputLength))
 		return -EFAULT;
 
 	uiBit  = gpio_info.uiGpioNumber;
-- 
2.0.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux