Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 857cc4df authored by Ilpo Järvinen's avatar Ilpo Järvinen Committed by Greg Kroah-Hartman
Browse files

USB: usbtmc: indent & braces disagree, something else is desired



It seems that there's rather involved way to say something
which is commonly written in a plain simple form.

Some type changes would probably be necessary to get gcc
to do bitops instead of divide but it's no worse after my
change than before I think.

Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b404299f
Loading
Loading
Loading
Loading
+3 −6
Original line number Original line Diff line number Diff line
@@ -21,6 +21,7 @@


#include <linux/init.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/fs.h>
#include <linux/uaccess.h>
#include <linux/uaccess.h>
#include <linux/kref.h>
#include <linux/kref.h>
@@ -482,7 +483,6 @@ static ssize_t usbtmc_write(struct file *filp, const char __user *buf,
	int retval;
	int retval;
	int actual;
	int actual;
	unsigned long int n_bytes;
	unsigned long int n_bytes;
	int n;
	int remaining;
	int remaining;
	int done;
	int done;
	int this_part;
	int this_part;
@@ -526,11 +526,8 @@ static ssize_t usbtmc_write(struct file *filp, const char __user *buf,
			goto exit;
			goto exit;
		}
		}


		n_bytes = 12 + this_part;
		n_bytes = roundup(12 + this_part, 4);
		if (this_part % 4)
		memset(buffer + 12 + this_part, 0, n_bytes - (12 + this_part));
			n_bytes += 4 - this_part % 4;
			for (n = 12 + this_part; n < n_bytes; n++)
				buffer[n] = 0;


		retval = usb_bulk_msg(data->usb_dev,
		retval = usb_bulk_msg(data->usb_dev,
				      usb_sndbulkpipe(data->usb_dev,
				      usb_sndbulkpipe(data->usb_dev,