Commit f74a039c authored by Peter Senna Tschudin's avatar Peter Senna Tschudin Committed by Greg Kroah-Hartman
Browse files

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: default avatarPeter Senna Tschudin <peter.senna@collabora.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 20db5513
Loading
Loading
Loading
Loading
+471 −482
Original line number Diff line number Diff line
@@ -803,9 +803,7 @@ static int sisusb_write_mem_bulk(struct sisusb_usb_data *sisusb, u32 addr,
	length &= 0x00ffffff;

	while (length) {

		switch (length) {

		case 1:
			if (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.address = 0x00000180;
					packet.data    = flag | 0x16;
				ret |= sisusb_send_bridge_packet(sisusb, 10,
								&packet, 0);
					ret |= sisusb_send_bridge_packet(sisusb,
							10, &packet, 0);
					sisusb->flagb0 = 0x16;
				}
				if (userbuffer) {
@@ -1152,11 +1150,8 @@ static int sisusb_read_mem_bulk(struct sisusb_usb_data *sisusb, u32 addr,
	length &= 0x00ffffff;

	while (length) {

		switch (length) {

		case 1:

			ret |= sisusb_read_memio_byte(sisusb, SISUSB_TYPE_MEM,
					addr, &buf[0]);
			if (!ret) {
@@ -1231,7 +1226,6 @@ static int sisusb_read_mem_bulk(struct sisusb_usb_data *sisusb, u32 addr,
				length -= 4;
			}
		}

		if (ret)
			break;
	}
@@ -1358,10 +1352,14 @@ sisusb_testreadwrite(struct sisusb_usb_data *sisusb)
	sisusb_copy_memory(sisusb, srcbuffer, sisusb->vrambase, 7, &dummy);

	for (i = 1; i <= 7; i++) {
        dev_dbg(&sisusb->sisusb_dev->dev, "sisusb: rwtest %d bytes\n", i);
	sisusb_read_memory(sisusb, destbuffer, sisusb->vrambase, i, &dummy);
		dev_dbg(&sisusb->sisusb_dev->dev,
				"sisusb: rwtest %d bytes\n", i);
		sisusb_read_memory(sisusb, destbuffer, sisusb->vrambase,
				i, &dummy);
		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.
		 */
		switch (count) {

		case 1:
			if (sisusb_read_memio_byte(sisusb,
					SISUSB_TYPE_IO,
@@ -2694,7 +2691,6 @@ sisusb_write(struct file *file, const char __user *buffer, size_t count,
		 * in machine-endianness.
		 */
		switch (count) {

		case 1:
			if (get_user(buf8, (u8 __user *)buffer))
				errno = -EFAULT;
@@ -2850,38 +2846,33 @@ sisusb_handle_command(struct sisusb_usb_data *sisusb, struct sisusb_command *y,

	switch (y->operation) {
	case SUCMD_GET:
			retval = sisusb_getidxreg(sisusb, port,
							 y->data0, &y->data1);
		retval = sisusb_getidxreg(sisusb, port, y->data0, &y->data1);
		if (!retval) {
				if (copy_to_user((void __user *)arg, y,
							sizeof(*y)))
			if (copy_to_user((void __user *)arg, y, sizeof(*y)))
				retval = -EFAULT;
		}
		break;

	case SUCMD_SET:
			retval = sisusb_setidxreg(sisusb, port,
						y->data0, y->data1);
		retval = sisusb_setidxreg(sisusb, port, y->data0, y->data1);
		break;

	case SUCMD_SETOR:
			retval = sisusb_setidxregor(sisusb, port,
						y->data0, y->data1);
		retval = sisusb_setidxregor(sisusb, port, y->data0, y->data1);
		break;

	case SUCMD_SETAND:
			retval = sisusb_setidxregand(sisusb, port,
						y->data0, y->data1);
		retval = sisusb_setidxregand(sisusb, port, y->data0, y->data1);
		break;

	case SUCMD_SETANDOR:
			retval = sisusb_setidxregandor(sisusb, port,
						y->data0, y->data1, y->data2);
		retval = sisusb_setidxregandor(sisusb, port, y->data0,
				y->data1, y->data2);
		break;

	case SUCMD_SETMASK:
			retval = sisusb_setidxregmask(sisusb, port,
						y->data0, y->data1, y->data2);
		retval = sisusb_setidxregmask(sisusb, port, y->data0,
				y->data1, y->data2);
		break;

	case SUCMD_CLRSCR:
@@ -2890,8 +2881,7 @@ sisusb_handle_command(struct sisusb_usb_data *sisusb, struct sisusb_command *y,
			return -ENODEV;

		length = (y->data0 << 16) | (y->data1 << 8) | y->data2;
			address = y->data3 -
				SISUSB_PCI_PSEUDO_MEMBASE +
		address = y->data3 - SISUSB_PCI_PSEUDO_MEMBASE +
				SISUSB_PCI_MEMBASE;
		retval = sisusb_clear_vram(sisusb, address, length);
		break;
@@ -2978,7 +2968,6 @@ sisusb_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
	}

	switch (cmd) {

	case SISUSB_GET_CONFIG_SIZE:

		if (put_user(sizeof(x), argp))