usb-misc: sisusbvga: Fix coding style: horizontal whitespace changes
This patch fixes whitespace coding style issues that can be fixed within a single line. This patch fixes the following checkpatch warnings: - 83 ERROR: space required after that ',' - 13 ERROR: switch and case should be at the same indent - 08 WARNING: please, no spaces at the start of a line - 03 ERROR: space required before the open parenthesis '(' - 04 WARNING: suspect code indent for conditional statements - 01 WARNING: space prohibited between function name and open parenthesis - 01 ERROR: spaces required around that '=' - 01 ERROR: code indent should use tabs where possible Signed-off-by: Peter Senna Tschudin <peter.senna@collabora.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
20db5513b4
commit
f74a039c7e
@ -803,9 +803,7 @@ static int sisusb_write_mem_bulk(struct sisusb_usb_data *sisusb, u32 addr,
|
|||||||
length &= 0x00ffffff;
|
length &= 0x00ffffff;
|
||||||
|
|
||||||
while (length) {
|
while (length) {
|
||||||
|
|
||||||
switch (length) {
|
switch (length) {
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
if (userbuffer) {
|
if (userbuffer) {
|
||||||
if (get_user(swap8, (u8 __user *)userbuffer))
|
if (get_user(swap8, (u8 __user *)userbuffer))
|
||||||
@ -947,8 +945,8 @@ static int sisusb_write_mem_bulk(struct sisusb_usb_data *sisusb, u32 addr,
|
|||||||
packet.header = 0x001f;
|
packet.header = 0x001f;
|
||||||
packet.address = 0x00000180;
|
packet.address = 0x00000180;
|
||||||
packet.data = flag | 0x16;
|
packet.data = flag | 0x16;
|
||||||
ret |= sisusb_send_bridge_packet(sisusb, 10,
|
ret |= sisusb_send_bridge_packet(sisusb,
|
||||||
&packet, 0);
|
10, &packet, 0);
|
||||||
sisusb->flagb0 = 0x16;
|
sisusb->flagb0 = 0x16;
|
||||||
}
|
}
|
||||||
if (userbuffer) {
|
if (userbuffer) {
|
||||||
@ -1152,11 +1150,8 @@ static int sisusb_read_mem_bulk(struct sisusb_usb_data *sisusb, u32 addr,
|
|||||||
length &= 0x00ffffff;
|
length &= 0x00ffffff;
|
||||||
|
|
||||||
while (length) {
|
while (length) {
|
||||||
|
|
||||||
switch (length) {
|
switch (length) {
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
|
|
||||||
ret |= sisusb_read_memio_byte(sisusb, SISUSB_TYPE_MEM,
|
ret |= sisusb_read_memio_byte(sisusb, SISUSB_TYPE_MEM,
|
||||||
addr, &buf[0]);
|
addr, &buf[0]);
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
@ -1231,7 +1226,6 @@ static int sisusb_read_mem_bulk(struct sisusb_usb_data *sisusb, u32 addr,
|
|||||||
length -= 4;
|
length -= 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret)
|
if (ret)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1358,10 +1352,14 @@ sisusb_testreadwrite(struct sisusb_usb_data *sisusb)
|
|||||||
sisusb_copy_memory(sisusb, srcbuffer, sisusb->vrambase, 7, &dummy);
|
sisusb_copy_memory(sisusb, srcbuffer, sisusb->vrambase, 7, &dummy);
|
||||||
|
|
||||||
for (i = 1; i <= 7; i++) {
|
for (i = 1; i <= 7; i++) {
|
||||||
dev_dbg(&sisusb->sisusb_dev->dev, "sisusb: rwtest %d bytes\n", i);
|
dev_dbg(&sisusb->sisusb_dev->dev,
|
||||||
sisusb_read_memory(sisusb, destbuffer, sisusb->vrambase, i, &dummy);
|
"sisusb: rwtest %d bytes\n", i);
|
||||||
|
sisusb_read_memory(sisusb, destbuffer, sisusb->vrambase,
|
||||||
|
i, &dummy);
|
||||||
for (j = 0; j < i; j++) {
|
for (j = 0; j < i; j++) {
|
||||||
dev_dbg(&sisusb->sisusb_dev->dev, "rwtest read[%d] = %x\n", j, destbuffer[j]);
|
dev_dbg(&sisusb->sisusb_dev->dev,
|
||||||
|
"rwtest read[%d] = %x\n",
|
||||||
|
j, destbuffer[j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2551,7 +2549,6 @@ sisusb_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos)
|
|||||||
* in machine-endianness.
|
* in machine-endianness.
|
||||||
*/
|
*/
|
||||||
switch (count) {
|
switch (count) {
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
if (sisusb_read_memio_byte(sisusb,
|
if (sisusb_read_memio_byte(sisusb,
|
||||||
SISUSB_TYPE_IO,
|
SISUSB_TYPE_IO,
|
||||||
@ -2694,7 +2691,6 @@ sisusb_write(struct file *file, const char __user *buffer, size_t count,
|
|||||||
* in machine-endianness.
|
* in machine-endianness.
|
||||||
*/
|
*/
|
||||||
switch (count) {
|
switch (count) {
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
if (get_user(buf8, (u8 __user *)buffer))
|
if (get_user(buf8, (u8 __user *)buffer))
|
||||||
errno = -EFAULT;
|
errno = -EFAULT;
|
||||||
@ -2850,38 +2846,33 @@ sisusb_handle_command(struct sisusb_usb_data *sisusb, struct sisusb_command *y,
|
|||||||
|
|
||||||
switch (y->operation) {
|
switch (y->operation) {
|
||||||
case SUCMD_GET:
|
case SUCMD_GET:
|
||||||
retval = sisusb_getidxreg(sisusb, port,
|
retval = sisusb_getidxreg(sisusb, port, y->data0, &y->data1);
|
||||||
y->data0, &y->data1);
|
|
||||||
if (!retval) {
|
if (!retval) {
|
||||||
if (copy_to_user((void __user *)arg, y,
|
if (copy_to_user((void __user *)arg, y, sizeof(*y)))
|
||||||
sizeof(*y)))
|
|
||||||
retval = -EFAULT;
|
retval = -EFAULT;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SUCMD_SET:
|
case SUCMD_SET:
|
||||||
retval = sisusb_setidxreg(sisusb, port,
|
retval = sisusb_setidxreg(sisusb, port, y->data0, y->data1);
|
||||||
y->data0, y->data1);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SUCMD_SETOR:
|
case SUCMD_SETOR:
|
||||||
retval = sisusb_setidxregor(sisusb, port,
|
retval = sisusb_setidxregor(sisusb, port, y->data0, y->data1);
|
||||||
y->data0, y->data1);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SUCMD_SETAND:
|
case SUCMD_SETAND:
|
||||||
retval = sisusb_setidxregand(sisusb, port,
|
retval = sisusb_setidxregand(sisusb, port, y->data0, y->data1);
|
||||||
y->data0, y->data1);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SUCMD_SETANDOR:
|
case SUCMD_SETANDOR:
|
||||||
retval = sisusb_setidxregandor(sisusb, port,
|
retval = sisusb_setidxregandor(sisusb, port, y->data0,
|
||||||
y->data0, y->data1, y->data2);
|
y->data1, y->data2);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SUCMD_SETMASK:
|
case SUCMD_SETMASK:
|
||||||
retval = sisusb_setidxregmask(sisusb, port,
|
retval = sisusb_setidxregmask(sisusb, port, y->data0,
|
||||||
y->data0, y->data1, y->data2);
|
y->data1, y->data2);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SUCMD_CLRSCR:
|
case SUCMD_CLRSCR:
|
||||||
@ -2890,8 +2881,7 @@ sisusb_handle_command(struct sisusb_usb_data *sisusb, struct sisusb_command *y,
|
|||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
length = (y->data0 << 16) | (y->data1 << 8) | y->data2;
|
length = (y->data0 << 16) | (y->data1 << 8) | y->data2;
|
||||||
address = y->data3 -
|
address = y->data3 - SISUSB_PCI_PSEUDO_MEMBASE +
|
||||||
SISUSB_PCI_PSEUDO_MEMBASE +
|
|
||||||
SISUSB_PCI_MEMBASE;
|
SISUSB_PCI_MEMBASE;
|
||||||
retval = sisusb_clear_vram(sisusb, address, length);
|
retval = sisusb_clear_vram(sisusb, address, length);
|
||||||
break;
|
break;
|
||||||
@ -2978,7 +2968,6 @@ sisusb_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
|
|
||||||
case SISUSB_GET_CONFIG_SIZE:
|
case SISUSB_GET_CONFIG_SIZE:
|
||||||
|
|
||||||
if (put_user(sizeof(x), argp))
|
if (put_user(sizeof(x), argp))
|
||||||
|
Loading…
Reference in New Issue
Block a user