Staging: comedi: drivers.c: Checkpatch cleanup
authorAndrea Gelmini <andrea.gelmini@gelma.net>
Fri, 26 Feb 2010 16:37:00 +0000 (17:37 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 4 Mar 2010 00:43:07 +0000 (16:43 -0800)
commit5617f9da4619ec975514e6b385a052e024215da3
tree01dac9b66afacfa6dd1e9a510a3809a5ef2518f0
parentb91665e95d1968c3cd8dd0c3a9a8d617639db1a6
Staging: comedi: drivers.c: Checkpatch cleanup

WARNING: Use #include <linux/io.h> instead of <asm/io.h>
+#include <asm/io.h>

WARNING: braces {} are not necessary for any arm of this statement
+ if (dev->driver) {
[...]
+ } else {
[...]

WARNING: braces {} are not necessary for single statement blocks
+ if (insn->insn == INSN_READ) {
+ data[0] = (new_data[1] >> (chan - base_bitfield_channel)) & 1;
+ }

WARNING: braces {} are not necessary for single statement blocks
+ if (async->prealloc_buf && async->prealloc_bufsz == new_size) {
+ return 0;
+ }

WARNING: braces {} are not necessary for single statement blocks
+ if (async->buf_page_list[i].virt_addr == NULL) {
+ break;
+ }

WARNING: braces {} are not necessary for single statement blocks
+ if ((int)(async->buf_write_alloc_count + nbytes - free_end) > 0) {
+ nbytes = free_end - async->buf_write_alloc_count;
+ }

WARNING: braces {} are not necessary for single statement blocks
+ if ((int)(async->buf_write_alloc_count + nbytes - free_end) > 0) {
+ nbytes = 0;
+ }

WARNING: braces {} are not necessary for single statement blocks
+ if (async->buf_write_ptr >= async->prealloc_bufsz) {
+ async->buf_write_ptr %= async->prealloc_bufsz;
+ }

Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/comedi/drivers.c