OSDN Git Service

uclinux-h8/linux.git
9 years agostaging: rtl8723au: core: rtw_wlan_util: Add blank line after declarations
Yeliz Taneroglu [Wed, 8 Oct 2014 22:22:17 +0000 (01:22 +0300)]
staging: rtl8723au: core: rtw_wlan_util: Add blank line after declarations

The following patch fixes the checkpatch.pl warning:

drivers/staging/rtl8723au/core/rtw_wlan_util.c WARNING: Missing a blank line after declarations

Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: core: rtw_pwrctrl: Add blank line after declarations
Yeliz Taneroglu [Wed, 8 Oct 2014 22:22:16 +0000 (01:22 +0300)]
staging: rtl8723au: core: rtw_pwrctrl: Add blank line after declarations

The following patch fixes the checkpatch.pl warning:

drivers/staging/rtl8723au/core/rtw_pwrctrl.c WARNING: Missing a blank line after declarations

Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: core: rtw_mlme_ext: Add blank line after declarations
Yeliz Taneroglu [Wed, 8 Oct 2014 22:22:15 +0000 (01:22 +0300)]
staging: rtl8723au: core: rtw_mlme_ext: Add blank line after declarations

The following patch fixes the checkpatch.pl warning:

drivers/staging/rtl8723au/core/rtw_mlme_ext.c WARNING: Missing a blank line after declarations

Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: core: rtw_mlme: Add blank line after declarations
Yeliz Taneroglu [Wed, 8 Oct 2014 22:22:14 +0000 (01:22 +0300)]
staging: rtl8723au: core: rtw_mlme: Add blank line after declarations

The following patch fixes the checkpatch.pl warning:

drivers/staging/rtl8723au/core/rtw_mlme.c WARNING: Missing a blank line after declarations

Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: core: rtw_led: Add blank line after declarations
Yeliz Taneroglu [Wed, 8 Oct 2014 22:22:13 +0000 (01:22 +0300)]
staging: rtl8723au: core: rtw_led: Add blank line after declarations

The following patch fixes the checkpatch.pl warning:

drivers/staging/rtl8723au/core/rtw_led.c WARNING: Missing a blank line after declarations

Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: core: rtw_ieee80211: Add blank line after declarations
Yeliz Taneroglu [Wed, 8 Oct 2014 22:22:12 +0000 (01:22 +0300)]
staging: rtl8723au: core: rtw_ieee80211: Add blank line after declarations

The following patch fixes the checkpatch.pl warning:

drivers/staging/rtl8723au/core/rtw_ieee80211.c  Warning: Missing a blank line after declarations

Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8723au: core: rtw_cmd: Add blank line after declarations
Yeliz Taneroglu [Wed, 8 Oct 2014 22:22:10 +0000 (01:22 +0300)]
staging: rtl8723au: core: rtw_cmd: Add blank line after declarations

The following patch fixes the checkpatch.pl warning:

drivers/staging/rtl8723au/core/rtw_ap.c Warning: Missing a blank line after declarations

Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: octeon: ethernet-tx: fixed coding style warnings, missing blank lines
Roberto Medina [Wed, 8 Oct 2014 19:18:44 +0000 (21:18 +0200)]
Staging: octeon: ethernet-tx: fixed coding style warnings, missing blank lines

Fixed coding style warnings due to missing blank lines.
Dubious additions removed.

Signed-off-by: Roberto Medina <robertoxmed@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon-usb: fix checkpatch.pl warnings
Aleh Suprunovich [Tue, 7 Oct 2014 11:52:52 +0000 (14:52 +0300)]
staging: octeon-usb: fix checkpatch.pl warnings

fixed several 'line over 80 characters' in places where it can be done
without changing/refactoring code

Signed-off-by: Aleh Suprunovich <br@ahlamon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rts5208: use ternary operators to reduce indentation level
Giedrius Statkevičius [Fri, 3 Oct 2014 21:31:21 +0000 (00:31 +0300)]
staging: rts5208: use ternary operators to reduce indentation level

Convert code in format of if (a) if(b) { [...] } to one line with a
simple ternary operation to avoid unnecesary increase of indentation
level.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rts5208: divide lines to make them less than 80 characters long
Giedrius Statkevičius [Fri, 3 Oct 2014 21:31:20 +0000 (00:31 +0300)]
staging: rts5208: divide lines to make them less than 80 characters long

Make a couple of lines shorter than the max limit by diving them and
also make sure to align them properly where possible.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rts5208: align divided lines to opening paranthesis
Giedrius Statkevičius [Fri, 3 Oct 2014 21:31:19 +0000 (00:31 +0300)]
staging: rts5208: align divided lines to opening paranthesis

Make all divided lines aligned to the opening paranthesis.

Basically makes all lines aligned to the opening paranthesis to make the
code more readable and it also gets rid of a lot of checkpatch.pl
"checks".

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rts5208: get rid of Camel Case, remove unneeded lines and parantheses
Giedrius Statkevičius [Fri, 3 Oct 2014 21:31:18 +0000 (00:31 +0300)]
staging: rts5208: get rid of Camel Case, remove unneeded lines and parantheses

Convert labels from Camel Case to lower case, remove unnecessary
parantheses around operands of dereference operators and remove unneeded
empty lines before }.

Gets rid of a checkpatch.pl "check" that code should avoid Camel Case,
also the code had a bunch of &(a) where a is some variable so it gets
rid of them too.  Finally, in a few places there were a empty line
before } so remove them.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rts5208: combine ifs where possible
Giedrius Statkevičius [Fri, 3 Oct 2014 21:31:17 +0000 (00:31 +0300)]
staging: rts5208: combine ifs where possible

Join together chained if's where possible to lower the indentation
level.

In a lot of places of this code the indentation level is already very
high.
As a result, this patch increases the code flow and readability.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrivers: staging: rtl8723au: Fix "open brace '{' following struct go on the same...
Greg Donald [Fri, 3 Oct 2014 15:36:40 +0000 (10:36 -0500)]
drivers: staging: rtl8723au: Fix "open brace '{' following struct go on the same line" errors

Fix checkpatch.pl "open brace '{' following struct go on the same line" errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agodrivers: staging: rtl8723au: core: Fix "'foo * bar' should be 'foo *bar'" errors
Greg Donald [Thu, 2 Oct 2014 23:28:41 +0000 (18:28 -0500)]
drivers: staging: rtl8723au: core: Fix "'foo * bar' should be 'foo *bar'" errors

Fix checkpatch.pl "'foo * bar' should be 'foo *bar'" errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: Add Xilinx Clocking Wizard driver
Soren Brinkmann [Thu, 2 Oct 2014 16:13:35 +0000 (09:13 -0700)]
staging: Add Xilinx Clocking Wizard driver

Add a driver for the Xilinx Clocking Wizard soft IP. The clocking wizard
provides an AXI interface to dynamically reconfigure the clocking
resources of Xilinx FPGAs.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: gs_fpgaboot: Use print_hex_dump_bytes instead of pr_info
Joe Perches [Tue, 7 Oct 2014 15:53:20 +0000 (17:53 +0200)]
staging: gs_fpgaboot: Use print_hex_dump_bytes instead of pr_info

Use print_hex_dump_bytes instead of pr_info

Signed-off-by: Dzmitry Sledneu <dzmitry.sledneu@gmail.com>
Reviewed-by: Insop Song <insop.song@gainspeed.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: fix unnecessary elses after return/break in rtl8712_efuse.c
Serguey Parkhomovsky [Wed, 8 Oct 2014 03:42:45 +0000 (20:42 -0700)]
staging: rtl8712: fix unnecessary elses after return/break in rtl8712_efuse.c

This patch fixes two unnecessary else conditions that were found by checkpatch.pl.

Signed-off-by: Serguey Parkhomovsky <sergueyparkhomovsky@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoStaging: rtl8712:ieee80211 remove unnecessary else
Nitin Kuppelur [Wed, 1 Oct 2014 15:04:27 +0000 (17:04 +0200)]
Staging: rtl8712:ieee80211 remove unnecessary else

Removed unnecessary else after return/break to solve
checkpatch.pl warning

Signed-off-by: Nitin Kuppelur <nitinkuppelur@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgap: change function names properly
Daeseok Youn [Wed, 8 Oct 2014 11:13:21 +0000 (20:13 +0900)]
staging: dgap: change function names properly

dgap_do_remap() and dgap_release_remap() names could be
changed to dgap_remap() and dgap_unmap().

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgap: remove unnecessary if statement for checking NULL
Daeseok Youn [Wed, 8 Oct 2014 11:12:48 +0000 (20:12 +0900)]
staging: dgap: remove unnecessary if statement for checking NULL

dgap_release_remap() function is only called after the memory
has been remapped so if statement for checking NULL doesn't
need.

And also release_mem_region() calls are moved after iounmap() calls.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgap: remove unused variable 'orig_count'
Rahul Bedarkar [Wed, 1 Oct 2014 17:11:36 +0000 (22:41 +0530)]
staging: dgap: remove unused variable 'orig_count'

This patch fixes sparse warning
warning: variable ‘orig_count’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: bcm: fix sparse warning in module_param
Rahul Bedarkar [Wed, 1 Oct 2014 16:56:01 +0000 (22:26 +0530)]
staging: bcm: fix sparse warning in module_param

This patch fixes sparse warning in module_param
warning: pointer targets in return differ in signedness [-Wpointer-sign]

Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedi_fc.h: remove cfc_inc_scan_progress()
H Hartley Sweeten [Thu, 18 Sep 2014 18:46:06 +0000 (11:46 -0700)]
staging: comedi: comedi_fc.h: remove cfc_inc_scan_progress()

This inline function is no longer used. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: mite: use comedi_inc_scan_progress()
H Hartley Sweeten [Thu, 18 Sep 2014 18:46:05 +0000 (11:46 -0700)]
staging: comedi: mite: use comedi_inc_scan_progress()

This inline function is just a wrapper around comedi_inc_scan_progress().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedi_fc.h: remove cfc_bytes_per_scan()
H Hartley Sweeten [Thu, 18 Sep 2014 18:41:20 +0000 (11:41 -0700)]
staging: comedi: comedi_fc.h: remove cfc_bytes_per_scan()

This inline function is no longer used. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: pcl818: use comedi_bytes_per_scan()
H Hartley Sweeten [Thu, 18 Sep 2014 18:41:19 +0000 (11:41 -0700)]
staging: comedi: pcl818: use comedi_bytes_per_scan()

This inline function is just a wrapper around comedi_bytes_per_scan().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: pcl816: use comedi_bytes_per_scan()
H Hartley Sweeten [Thu, 18 Sep 2014 18:41:18 +0000 (11:41 -0700)]
staging: comedi: pcl816: use comedi_bytes_per_scan()

This inline function is just a wrapper around comedi_bytes_per_scan().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: pcl812: use comedi_bytes_per_scan()
H Hartley Sweeten [Thu, 18 Sep 2014 18:41:17 +0000 (11:41 -0700)]
staging: comedi: pcl812: use comedi_bytes_per_scan()

This inline function is just a wrapper around comedi_bytes_per_scan().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: mite: use comedi_bytes_per_scan()
H Hartley Sweeten [Thu, 18 Sep 2014 18:41:16 +0000 (11:41 -0700)]
staging: comedi: mite: use comedi_bytes_per_scan()

This inline function is just a wrapper around comedi_bytes_per_scan().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: das16: use comedi_bytes_per_scan()
H Hartley Sweeten [Thu, 18 Sep 2014 18:41:15 +0000 (11:41 -0700)]
staging: comedi: das16: use comedi_bytes_per_scan()

This inline function is just a wrapper around comedi_bytes_per_scan().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: amplc_pci230: use comedi_bytes_per_scan()
H Hartley Sweeten [Thu, 18 Sep 2014 18:41:14 +0000 (11:41 -0700)]
staging: comedi: amplc_pci230: use comedi_bytes_per_scan()

This inline function is just a wrapper around comedi_bytes_per_scan().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: amplc_pci224: use comedi_bytes_per_scan()
H Hartley Sweeten [Thu, 18 Sep 2014 18:41:13 +0000 (11:41 -0700)]
staging: comedi: amplc_pci224: use comedi_bytes_per_scan()

This inline function is just a wrapper around comedi_bytes_per_scan().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: amplc_pci230: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:35:42 +0000 (11:35 -0700)]
staging: comedi: amplc_pci230: use comedi_handle_events()

Use comedi_handle_events() to automatically (*cancel) the async command
for an end-of-acquisition or if an error/overflow occurs.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: rtd520: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:35:41 +0000 (11:35 -0700)]
staging: comedi: rtd520: use comedi_handle_events()

Use comedi_handle_events() to automatically (*cancel) the async command
for an end-of-acquisition or if an error/overflow occurs.

The code to cancel the async command can then be removed from rtd_interrupt().

Since the (*cancel) will also clear the FIFO, the ai_read_dregs() function
can also be removed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: rtd520: clear FIFO when canceling async command
H Hartley Sweeten [Thu, 18 Sep 2014 18:35:40 +0000 (11:35 -0700)]
staging: comedi: rtd520: clear FIFO when canceling async command

Clear the A/D FIFO as part of the analog input (*cancel) to help with
cleaning up the async command.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: s626: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:35:39 +0000 (11:35 -0700)]
staging: comedi: s626: use comedi_handle_events()

Use comedi_handle_events() to automatically (*cancel) the async command
for an end-of-acquisition or if an error/overflow occurs.

The s626_mc_disable() call when the end-of-acquisition is detected can
then be removed. The (*cancel) does the same thing.

For aesthetics, also remove the 'finished' local variable and just return
the ai_cmd_running state.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: pcmuio: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:35:38 +0000 (11:35 -0700)]
staging: comedi: pcmuio: use comedi_handle_events()

Use comedi_handle_events() to automatically (*cancel) the async command
for an end-of-acquisition or if an error/overflow occurs.

Also, comedi_handle_events() does nothing if no events are set so the
local variable 'oldevents' can be removed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: pcmmio: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:35:37 +0000 (11:35 -0700)]
staging: comedi: pcmmio: use comedi_handle_events()

Use comedi_handle_events() to automatically (*cancel) the async command
for an end-of-acquisition or if an error/overflow occurs.

Also, comedi_handle_events() does nothing if no events are set so the
local variable 'oldevents' can be removed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: pcl711: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:35:36 +0000 (11:35 -0700)]
staging: comedi: pcl711: use comedi_handle_events()

Use comedi_handle_events() to automatically (*cancel) the async command
for an end-of-acquisition or if an error/overflow occurs.

The pcl711_ai_set_mode() call when the end-of-acquisition is detected
can then be removed. The (*cancel) does the same thing.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: me4000: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:35:35 +0000 (11:35 -0700)]
staging: comedi: me4000: use comedi_handle_events()

Use comedi_handle_events() to automatically (*cancel) the async command
for an end-of-acquisition or if an error/overflow occurs.

Also, comedi_handle_events() does nothing if no events are set so the
check can be removed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedi_test: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:35:34 +0000 (11:35 -0700)]
staging: comedi: comedi_test: use comedi_handle_events()

Use comedi_handle_events() to automatically (*cancel) the async command
for an end-of-acquisition or if an error/overflow occurs.

For aesthetics, add a local variable for the comedi_subdevice pointer.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: amplc_dio200_common: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:35:33 +0000 (11:35 -0700)]
staging: comedi: amplc_dio200_common: use comedi_handle_events()

Use comedi_handle_events() to automatically (*cancel) the async command
for an end-of-acquisition or if an error/overflow occurs.

Also, comedi_handle_events() does nothing if no events are set so the
local variable 'oldevents' can be removed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: addi_apci_2032: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:35:32 +0000 (11:35 -0700)]
staging: comedi: addi_apci_2032: use comedi_handle_events()

Use comedi_handle_events() to automatically (*cancel) the async command
for an end-of-acquisition or if an error/overflow occurs.

Also, comedi_handle_events() does nothing if no events are set so the
local variable 'do_event' can be removed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: hwdrv_apci3120: do comedi_handle_events() at end of interrupt
H Hartley Sweeten [Thu, 18 Sep 2014 18:35:31 +0000 (11:35 -0700)]
staging: comedi: hwdrv_apci3120: do comedi_handle_events() at end of interrupt

Currently comedi_handle_events() is done by both the DMA and non-DMA helper
functions that are called by the interrupt handler. For aesthetics, move
the comedi_handle_events() to the end of the interrupt handler and do it in
one place.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: hwdrv_apci3120: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:35:30 +0000 (11:35 -0700)]
staging: comedi: hwdrv_apci3120: use comedi_handle_events()

Use comedi_handle_events() to automatically (*cancel) the async command
for an end-of-acquisition or if an error/overflow occurs.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: pcl726: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:35:29 +0000 (11:35 -0700)]
staging: comedi: pcl726: use comedi_handle_events()

Use comedi_handle_events() to automatically (*cancel) the async command
for an end-of-acquisition or if an error/overflow occurs.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_atmio16d: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:35:28 +0000 (11:35 -0700)]
staging: comedi: ni_atmio16d: use comedi_handle_events()

Use comedi_handle_events() to automatically (*cancel) the async command
for an end-of-acquisition or if an error/overflow occurs.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_65xx: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:35:27 +0000 (11:35 -0700)]
staging: comedi: ni_65xx: use comedi_handle_events()

Use comedi_handle_events() to automatically (*cancel) the async command
for an end-of-acquisition or if an error/overflow occurs.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_6527: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:35:26 +0000 (11:35 -0700)]
staging: comedi: ni_6527: use comedi_handle_events()

Use comedi_handle_events() to automatically (*cancel) the async command
for an end-of-acquisition or if an error/overflow occurs.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: dt2814: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:35:25 +0000 (11:35 -0700)]
staging: comedi: dt2814: use comedi_handle_events()

Use comedi_handle_events() to automatically (*cancel) the async command
for an end-of-acquisition or if an error/overflow occurs.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: dmm32at: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:35:24 +0000 (11:35 -0700)]
staging: comedi: dmm32at: use comedi_handle_events()

Use comedi_handle_events() to automatically (*cancel) the async command
for an end-of-acquisition or if an error/overflow occurs.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedi_parport: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:35:23 +0000 (11:35 -0700)]
staging: comedi: comedi_parport: use comedi_handle_events()

Use comedi_handle_events() to automatically (*cancel) the async command
for an end-of-acquisition or if an error/overflow occurs.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: amplc_pc236_common: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:35:22 +0000 (11:35 -0700)]
staging: comedi: amplc_pc236_common: use comedi_handle_events()

Use comedi_handle_events() to automatically (*cancel) the async command
for an end-of-acquisition or if an error/overflow occurs.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: addi_apci_3xxx: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:35:21 +0000 (11:35 -0700)]
staging: comedi: addi_apci_3xxx: use comedi_handle_events()

Use comedi_handle_events() to automatically (*cancel) the async command
for an end-of-acquisition or if an error/overflow occurs.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: addi_apci_1564: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:35:20 +0000 (11:35 -0700)]
staging: comedi: addi_apci_1564: use comedi_handle_events()

Use comedi_handle_events() to automatically (*cancel) the async command
for an end-of-acquisition or if an error/overflow occurs.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: addi_apci_1032: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:35:19 +0000 (11:35 -0700)]
staging: comedi: addi_apci_1032: use comedi_handle_events()

Use comedi_handle_events() to automatically (*cancel) the async command
for an end-of-acquisition or if an error/overflow occurs.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: hwdrv_apci3200: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:35:18 +0000 (11:35 -0700)]
staging: comedi: hwdrv_apci3200: use comedi_handle_events()

Use comedi_handle_events() to automatically (*cancel) the async command
for an end-of-acquisition or if an error/overflow occurs.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: comedi_fc.h: remove cfc_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:11:36 +0000 (11:11 -0700)]
staging: comedi: comedi_fc.h: remove cfc_handle_events()

This inline function is no longer used. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: quatech_daqp_cs: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:11:35 +0000 (11:11 -0700)]
staging: comedi: quatech_daqp_cs: use comedi_handle_events()

cfc_handle_events() is just a wrapper around comedi_handle_events().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: pcl818: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:11:34 +0000 (11:11 -0700)]
staging: comedi: pcl818: use comedi_handle_events()

cfc_handle_events() is just a wrapper around comedi_handle_events().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: pcl816: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:11:33 +0000 (11:11 -0700)]
staging: comedi: pcl816: use comedi_handle_events()

cfc_handle_events() is just a wrapper around comedi_handle_events().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: pcl812: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:11:32 +0000 (11:11 -0700)]
staging: comedi: pcl812: use comedi_handle_events()

cfc_handle_events() is just a wrapper around comedi_handle_events().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_pcidio: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:11:31 +0000 (11:11 -0700)]
staging: comedi: ni_pcidio: use comedi_handle_events()

cfc_handle_events() is just a wrapper around comedi_handle_events().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_mio_common: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:11:30 +0000 (11:11 -0700)]
staging: comedi: ni_mio_common: use comedi_handle_events()

cfc_handle_events() is just a wrapper around comedi_handle_events().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_labpc_common: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:11:29 +0000 (11:11 -0700)]
staging: comedi: ni_labpc_common: use comedi_handle_events()

cfc_handle_events() is just a wrapper around comedi_handle_events().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_at_a2150: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:11:28 +0000 (11:11 -0700)]
staging: comedi: ni_at_a2150: use comedi_handle_events()

cfc_handle_events() is just a wrapper around comedi_handle_events().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: ni_660x: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:11:27 +0000 (11:11 -0700)]
staging: comedi: ni_660x: use comedi_handle_events()

cfc_handle_events() is just a wrapper around comedi_handle_events().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: gsc_hpdi: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:11:26 +0000 (11:11 -0700)]
staging: comedi: gsc_hpdi: use comedi_handle_events()

cfc_handle_events() is just a wrapper around comedi_handle_events().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: dt3000: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:11:25 +0000 (11:11 -0700)]
staging: comedi: dt3000: use comedi_handle_events()

cfc_handle_events() is just a wrapper around comedi_handle_events().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: dt282x: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:11:24 +0000 (11:11 -0700)]
staging: comedi: dt282x: use comedi_handle_events()

cfc_handle_events() is just a wrapper around comedi_handle_events().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: das1800: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:11:23 +0000 (11:11 -0700)]
staging: comedi: das1800: use comedi_handle_events()

cfc_handle_events() is just a wrapper around comedi_handle_events().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: das800: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:11:22 +0000 (11:11 -0700)]
staging: comedi: das800: use comedi_handle_events()

cfc_handle_events() is just a wrapper around comedi_handle_events().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: das16m1: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:11:21 +0000 (11:11 -0700)]
staging: comedi: das16m1: use comedi_handle_events()

cfc_handle_events() is just a wrapper around comedi_handle_events().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: das16: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:11:20 +0000 (11:11 -0700)]
staging: comedi: das16: use comedi_handle_events()

cfc_handle_events() is just a wrapper around comedi_handle_events().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: cb_pcidas64: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:11:19 +0000 (11:11 -0700)]
staging: comedi: cb_pcidas64: use comedi_handle_events()

cfc_handle_events() is just a wrapper around comedi_handle_events().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: cb_pcidas: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:11:18 +0000 (11:11 -0700)]
staging: comedi: cb_pcidas: use comedi_handle_events()

cfc_handle_events() is just a wrapper around comedi_handle_events().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: amplc_pci224: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:11:17 +0000 (11:11 -0700)]
staging: comedi: amplc_pci224: use comedi_handle_events()

cfc_handle_events() is just a wrapper around comedi_handle_events().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: adv_pci1710: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:11:16 +0000 (11:11 -0700)]
staging: comedi: adv_pci1710: use comedi_handle_events()

cfc_handle_events() is just a wrapper around comedi_handle_events().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: adl_pci9118: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:11:15 +0000 (11:11 -0700)]
staging: comedi: adl_pci9118: use comedi_handle_events()

cfc_handle_events() is just a wrapper around comedi_handle_events().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: adl_pci9111: use comedi_handle_events()
H Hartley Sweeten [Thu, 18 Sep 2014 18:11:14 +0000 (11:11 -0700)]
staging: comedi: adl_pci9111: use comedi_handle_events()

cfc_handle_events() is just a wrapper around comedi_handle_events().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vt6655: Use ether_addr_copy function
Dilek Uzulmez [Wed, 8 Oct 2014 20:32:11 +0000 (23:32 +0300)]
staging: vt6655: Use ether_addr_copy function

This patch fixes the following checkpatch.pl warnings:
WARNING: "Prefer ether_addr_copy() over memcpy() if the Ethernet
addresses are __aligned(2)" in file iwctl.c
Pahole shows that the addresses are aligned

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: bcm: Removed unnecessary 'else' after 'return' statement in Qos.c
Esra Altintas [Wed, 8 Oct 2014 18:21:50 +0000 (21:21 +0300)]
staging: bcm: Removed unnecessary 'else' after 'return' statement in Qos.c

The following patch fixes the checkpatch.pl warning:
WARNING: else is not generally useful after a break or return

Signed-off-by: Esra Altintas <es.altintas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: drivers: Use DIV_ROUND_CLOSEST
Tapasweni Pathak [Wed, 8 Oct 2014 17:43:47 +0000 (23:13 +0530)]
staging: comedi: drivers: Use DIV_ROUND_CLOSEST

The kernel.h macro DIV_ROUND_CLOSEST performs the computation (x + d/2)/d
but is perhaps more readable.

The Coccinelle script used:
// <smpl>
@haskernel@
@@
@depends on haskernel@
expression x,__divisor;
@@
- (((x) + ((__divisor) / 2)) / (__divisor))
+ DIV_ROUND_CLOSEST(x,__divisor)
// </smpl>

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: octeon-usb: use DIV_ROUND_UP
Tapasweni Pathak [Wed, 8 Oct 2014 17:26:57 +0000 (22:56 +0530)]
staging: octeon-usb: use DIV_ROUND_UP

The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /
(d)) but is perhaps more readable.

Coccinelle script used :

// <smpl>
@haskernel@
@@
@depends on haskernel@
expression n,d;
@@
(
- (n + d - 1) / d
+ DIV_ROUND_UP(n,d)
|
- (n + (d - 1)) / d
+ DIV_ROUND_UP(n,d)
)
@depends on haskernel@
expression n,d;
@@
- DIV_ROUND_UP((n),d)
+ DIV_ROUND_UP(n,d)
@depends on haskernel@
expression n,d;
@@
- DIV_ROUND_UP(n,(d))
+ DIV_ROUND_UP(n,d)
// </smpl>

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: iio: adc: use DIV_ROUND_UP
Tapasweni Pathak [Wed, 8 Oct 2014 17:26:15 +0000 (22:56 +0530)]
staging: iio: adc: use DIV_ROUND_UP

The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /
(d)) but is perhaps more readable.

Coccinelle script used :

// <smpl>
@haskernel@
@@
@depends on haskernel@
expression n,d;
@@
(
- (n + d - 1) / d
+ DIV_ROUND_UP(n,d)
|
- (n + (d - 1)) / d
+ DIV_ROUND_UP(n,d)
)
@depends on haskernel@
expression n,d;
@@
- DIV_ROUND_UP((n),d)
+ DIV_ROUND_UP(n,d)
@depends on haskernel@
expression n,d;
@@
- DIV_ROUND_UP(n,(d))
+ DIV_ROUND_UP(n,d)
// </smpl>

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: drivers: use DIV_ROUND_UP
Tapasweni Pathak [Wed, 8 Oct 2014 17:26:01 +0000 (22:56 +0530)]
staging: comedi: drivers: use DIV_ROUND_UP

The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /
(d)) but is perhaps more readable.

Coccinelle script used :

// <smpl>
@haskernel@
@@
@depends on haskernel@
expression n,d;
@@
(
- (n + d - 1) / d
+ DIV_ROUND_UP(n,d)
|
- (n + (d - 1)) / d
+ DIV_ROUND_UP(n,d)
)
@depends on haskernel@
expression n,d;
@@
- DIV_ROUND_UP((n),d)
+ DIV_ROUND_UP(n,d)
@depends on haskernel@
expression n,d;
@@
- DIV_ROUND_UP(n,(d))
+ DIV_ROUND_UP(n,d)
// </smpl>

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: comedi: use DIV_ROUND_UP
Tapasweni Pathak [Wed, 8 Oct 2014 17:25:45 +0000 (22:55 +0530)]
staging: comedi: use DIV_ROUND_UP

The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /
(d)) but is perhaps more readable.

Coccinelle script used :

// <smpl>
@haskernel@
@@
@depends on haskernel@
expression n,d;
@@
(
- (n + d - 1) / d
+ DIV_ROUND_UP(n,d)
|
- (n + (d - 1)) / d
+ DIV_ROUND_UP(n,d)
)
@depends on haskernel@
expression n,d;
@@
- DIV_ROUND_UP((n),d)
+ DIV_ROUND_UP(n,d)
@depends on haskernel@
expression n,d;
@@
- DIV_ROUND_UP(n,(d))
+ DIV_ROUND_UP(n,d)
// </smpl>

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: speakup: Use time_after_eq to compare jiffies in speakup_keypc.c
Esra Altintas [Wed, 8 Oct 2014 11:32:10 +0000 (14:32 +0300)]
staging: speakup: Use time_after_eq to compare jiffies in speakup_keypc.c

The following patch fixes the checkpatch.pl warning:
WARNING: Comparing jiffies is almost always wrong; prefer time_after,
time_before and friends

Signed-off-by: Esra Altintas <es.altintas@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: wlan-ng: replace kmalloc and memset with kzalloc
Tapasweni Pathak [Wed, 8 Oct 2014 18:03:40 +0000 (23:33 +0530)]
staging: wlan-ng: replace kmalloc and memset with kzalloc

Replace kmalloc and memset with a single call of kzalloc in
file of wlan-ng.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: rtl8712: Remove unnecessary cast for argument of kfree
Tapasweni Pathak [Wed, 8 Oct 2014 15:11:26 +0000 (20:41 +0530)]
staging: rtl8712: Remove unnecessary cast for argument of kfree

This patch removes all occurrences of unnecessary cast on the
argument to kfree, all over in rtl8712.

There is no need of the cast on the argument to kfree.

Greped to find occurrences.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: slicoss: Fix warning of prefer ether_addr_copy().
Dilek Uzulmez [Mon, 6 Oct 2014 23:50:28 +0000 (02:50 +0300)]
staging: slicoss: Fix warning of prefer ether_addr_copy().

This patch fixes the following checkpatch.pl warnings:
WARNING: "Prefer ether_addr_copy() over memcpy() if the Ethernet
addresses are __aligned(2)" in file slicoss.c
Pahole shows that the addresses are aligned.

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: vme: devices: Added a paragraph to describe Kconfig symbol
Kumari Radha [Wed, 8 Oct 2014 09:18:44 +0000 (14:48 +0530)]
staging: vme: devices: Added a paragraph to describe Kconfig symbol

This patch adds module name information about config symbol fixing the following checkpatch.pl warning in Kconfig:
WARNING: please write a paragraph that describes the config symbol fully

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Union ULTRA_COMPONENT_VERSION not used, removed
Veronika Kabatova [Wed, 8 Oct 2014 01:47:35 +0000 (03:47 +0200)]
staging: unisys: Union ULTRA_COMPONENT_VERSION not used, removed

Remove unused union ULTRA_COMPONENT_VERSION

Signed-off-by: Veronika Kabátová <veronicca114@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: unisys: Remove typedef and rename enum to lowercase
Veronika Kabatova [Wed, 8 Oct 2014 01:59:55 +0000 (03:59 +0200)]
staging: unisys: Remove typedef and rename enum to lowercase

Remove typedef and rename enum to lowercase (control_vm_id)

Signed-off-by: Veronika Kabátová <veronicca114@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: gdm72xx: Removed unnecesarry out of memory usage
Sarah Khan [Sun, 5 Oct 2014 18:55:51 +0000 (00:25 +0530)]
staging: gdm72xx: Removed unnecesarry out of memory usage

WARNING: Possible unnecessary out of memory usage
checkpatch.pl warning in gdm_wimax.c

Signed-off-by: Sarah Khan <sarahjmi07@gmail.com>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: gdm724x: Fix incorrect type in assignment
Ebru Akagunduz [Tue, 7 Oct 2014 08:41:08 +0000 (11:41 +0300)]
staging: gdm724x: Fix incorrect type in assignment

This patch fixes following sparse warnings:
drivers/staging/gdm724x/gdm_mux.c:389:32: warning: incorrect type in assignment (different base types)
drivers/staging/gdm724x/gdm_mux.c:389:32:    expected unsigned int [unsigned] start_flag
drivers/staging/gdm724x/gdm_mux.c:389:32:    got restricted __le32 [usertype] <noident
drivers/staging/gdm724x/gdm_mux.c:390:29: warning: incorrect type in assignment (different base types)
drivers/staging/gdm724x/gdm_mux.c:390:29:    expected unsigned int [unsigned] seq_num
drivers/staging/gdm724x/gdm_mux.c:390:29:    got restricted __le32 [usertype] <noident>
drivers/staging/gdm724x/gdm_mux.c:391:34: warning: incorrect type in assignment (different base types)
drivers/staging/gdm724x/gdm_mux.c:391:34:    expected unsigned int [unsigned] payload_size
drivers/staging/gdm724x/gdm_mux.c:391:34:    got restricted __le32 [usertype] <noident>
drivers/staging/gdm724x/gdm_mux.c:392:33: warning: incorrect type in assignment (different base types)
drivers/staging/gdm724x/gdm_mux.c:392:33:    expected unsigned short [unsigned] packet_type
drivers/staging/gdm724x/gdm_mux.c:392:33:    got restricted __le16 [usertype] <noident>

Sparse found above warnings, so this patch changes variable types of
structs. Because expected and got variable types are different.

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Reviewed-by: Octavian Purdila <octavian.purdila@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: gdm724x: Fix warning of prefer ether_addr_copy.
Dilek Uzulmez [Tue, 7 Oct 2014 12:26:23 +0000 (15:26 +0300)]
staging: gdm724x: Fix warning of prefer ether_addr_copy.

This patch fixes the following checkpatch.pl warnings:
WARNING: "Prefer ether_addr_copy() over memcpy() if the Ethernet
addresses are __aligned(2)" in file gdm_lte.c
Pahole shows that the addresses are aligned.

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agostaging: dgnc: Remove space before tabs
Dilek Uzulmez [Wed, 8 Oct 2014 10:49:51 +0000 (13:49 +0300)]
staging: dgnc: Remove space before tabs

This patch fixes the warning of "Please, no space before tab" produced
by checkpatch.pl. The modified file: dgnc_tty.c

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>