Shraddha Barke [Sat, 22 Aug 2015 10:58:12 +0000 (16:28 +0530)]
Staging: rtl8192e: r8192E_dev.c: Remove unused variable
This patch discards the variable as it is not used anywhere throughout
the kernel.
Build tested it.
Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shraddha Barke [Sat, 22 Aug 2015 10:58:13 +0000 (16:28 +0530)]
Staging: rtl819u: ieee80211: Remove unused variable
This patch discards the variable count as it is not used anywhere
throughout the kernel.
Build tested it.
Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shraddha Barke [Sat, 22 Aug 2015 10:58:14 +0000 (16:28 +0530)]
Staging: rtl8723au: core: Remove unused variable
This patch discards the variable as it is not used anywhere throughout
the kernel.
Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Shraddha Barke [Sat, 22 Aug 2015 10:58:11 +0000 (16:28 +0530)]
Staging: rtl8192e: rtl_core.c: Remove unused variable
This patch discards the variable ResetThreshold as it is not used
anywhere throughout the kernel.
Build tested it.
Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nayeemahmed Badebade [Thu, 27 Aug 2015 15:32:46 +0000 (21:02 +0530)]
staging: panel: panel.c: Fixed coding style issues
Fixed warnings reported by checkpatch.pl:
- Block comments use a trailing */ on a separate line
- Block comments use * on subsequent lines
Signed-off-by: Nayeemahmed Badebade <itachi.opsrc@gmail.com>
Acked-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Luis de Bethencourt [Thu, 3 Sep 2015 11:13:51 +0000 (13:13 +0200)]
staging: octeon-usb: Fix module autoload for OF platform driver
This platform driver has a OF device ID table but the OF module
alias information is not created so module autoloading won't work.
Signed-off-by: Luis de Bethencourt <luis@debethencourt.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Javier Martinez Canillas [Thu, 20 Aug 2015 07:07:19 +0000 (09:07 +0200)]
staging: mt29f_spinand: Export OF module alias information
The SPI core always reports the MODALIAS uevent as "spi:<modalias>"
regardless of the mechanism that was used to register the device
(i.e: OF or board code) and the table that is used later to match
the driver with the device (i.e: SPI id table or OF match table).
So drivers needs to export the SPI id table and this be built into
the module or udev won't have the necessary information to autoload
the needed driver module when the device is added.
But this means that OF-only drivers needs to have both OF and SPI id
tables that have to be kept in sync and also the dev node compatible
manufacturer prefix is stripped when reporting the MODALIAS. Which can
lead to issues if two vendors use the same SPI device name for example.
To avoid the above, the SPI core behavior may be changed in the future
to not require an SPI device table for OF-only drivers and report the
OF module alias. So, it's better to also export the OF table even when
is unused now to prevent breaking module loading when the core changes.
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Anish Bhatt [Thu, 3 Sep 2015 07:53:37 +0000 (00:53 -0700)]
staging/fbtft : Add missing whitespace around operators
Add blank spaces around operators where recommended
by checkpatch.pl
Signed-off-by: Anish Bhatt <anish@chelsio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Anish Bhatt [Thu, 3 Sep 2015 07:53:36 +0000 (00:53 -0700)]
staging/fbtft : Fix multiple/missing blank line issues
Remove or add blank lines as recommended by checkpatch.pl
Signed-off-by: Anish Bhatt <anish@chelsio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Anish Bhatt [Thu, 3 Sep 2015 07:53:35 +0000 (00:53 -0700)]
staging/fbtft : Remove unicode characters
Remove stray unicode quotes around name
Signed-off-by: Anish Bhatt <anish@chelsio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Anish Bhatt [Thu, 3 Sep 2015 07:53:34 +0000 (00:53 -0700)]
staging/fbtft : Remove repeated set_addr_win debug messages
fbtft_par_dbg(DEBUG_SET_ADDR_WIN.. ) is repeated in every
set_addr_win() handler, this could be replicated by using the kernel
function tracer instead.
Signed-off-by: Anish Bhatt <anish@chelsio.com>
Suggested-by: Greg KH <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Anish Bhatt [Thu, 3 Sep 2015 07:53:33 +0000 (00:53 -0700)]
staging/fbtft : Use BIT() macro when possible
Based on checkpatch.pl recommendations, (1 << x)
is replaced by BIT(x)
Signed-off-by: Anish Bhatt <anish@chelsio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mike Rapoport [Thu, 3 Sep 2015 05:13:14 +0000 (08:13 +0300)]
staging: fbtft: fb_watterott: define backlight_ops statically
instead of devm_kzalloc'ing them
Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mike Rapoport [Thu, 3 Sep 2015 05:13:13 +0000 (08:13 +0300)]
staging: fbtft: fb_ssd1351: define backlight_ops statically
instead of devm_kzalloc'ing them
Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mike Rapoport [Thu, 3 Sep 2015 05:13:12 +0000 (08:13 +0300)]
staging: fbtft: fbtft_request_gpios: reduce nesting
Returning immediately if no platform_data or platform_data->gpios is
specified reduceis code nesting
Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mike Rapoport [Thu, 3 Sep 2015 05:13:11 +0000 (08:13 +0300)]
staging: fbtft: fbtft-core: define backlight_ops statically
instead of devm_kzalloc'ing them
Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mike Rapoport [Thu, 3 Sep 2015 05:13:10 +0000 (08:13 +0300)]
staging: fbtft: remove unused bl_ops from fbtft_unregister_backlight
The only usage of bl_ops variable in fbtft_unregister_backlight function
was assigment of a value to that variable, therefore the assignment and
the variable itself can be safely removed
Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Anish Bhatt [Thu, 3 Sep 2015 01:46:42 +0000 (18:46 -0700)]
staging/fbtft : Remove FSF mailing address
checkpatch.pl recommends that this is no longer required.
Also replaces ASCII-art copyright notice with simple text
Signed-off-by: Anish Bhatt <anish@chelsio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Raphaël Beamonte [Tue, 18 Aug 2015 16:58:18 +0000 (12:58 -0400)]
staging: rtl8192u: r8192U_core: fix quoted string split across lines code style issue
Quoted strings should not be split to help text grep in the source.
All quoted strings that were split have thus been merged to one unique
quoted string each to follow the code style.
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Raphaël Beamonte [Tue, 18 Aug 2015 16:58:17 +0000 (12:58 -0400)]
staging: rtl8192u: r8192U_core: fix missing blank line after declarations code style issue
Adds whitespaces to separate the variables declarations and the
function content.
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Raphaël Beamonte [Tue, 18 Aug 2015 16:58:16 +0000 (12:58 -0400)]
staging: rtl8192u: r8192U_core: fix unnecessary whitespace code style issue
Whitespaces are not necessary before a quoted newline. Remove those.
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Raphaël Beamonte [Tue, 18 Aug 2015 16:58:15 +0000 (12:58 -0400)]
staging: rtl8192u: r8192U_core: fix unnecessary else after return code style issue
An else statement is not useful after a return.
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Raphaël Beamonte [Tue, 18 Aug 2015 16:58:14 +0000 (12:58 -0400)]
staging: rtl8192u: r8192U_core: fix unnecessary parentheses code style issue
Two sets of parentheses were used to contain the same statement.
In those cases, one of them has been removed, as unnecessary.
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Raphaël Beamonte [Tue, 18 Aug 2015 16:58:13 +0000 (12:58 -0400)]
staging: rtl8192u: r8192U_core: fix unnecessary check before kfree code style issue
kfree(NULL) is safe and the checks were not required.
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Raphaël Beamonte [Tue, 18 Aug 2015 16:58:12 +0000 (12:58 -0400)]
staging: rtl8192u: r8192U_core: remove forward declarations in .c file
Checkpatch was giving a "externs should be avoided in .c files" because
of these forward declarations. As these were not useful in this case,
they have been removed.
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Raphaël Beamonte [Tue, 18 Aug 2015 16:58:11 +0000 (12:58 -0400)]
staging: rtl8192u: r8192U_core: fix unecessary braces code style issue
braces {} are not necessary for any arm of a statement containing
one statement on each side.
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Raphaël Beamonte [Tue, 18 Aug 2015 16:58:10 +0000 (12:58 -0400)]
staging: rtl8192u: r8192U_core: remove return statement of void function
void function return statement was not useful in this case.
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Raphaël Beamonte [Tue, 18 Aug 2015 16:58:09 +0000 (12:58 -0400)]
staging: rtl8192u: r8192U_core: include linux/uaccess.h instead of asm/uaccess.h
Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Raphaël Beamonte [Tue, 18 Aug 2015 16:58:08 +0000 (12:58 -0400)]
staging: rtl8192u: r8192U_core: clean C99 // comments
Replace C99 // comments by /* comments */ to follow the
kernel code style. Remove some unuseful comments.
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Raphaël Beamonte [Tue, 18 Aug 2015 16:58:07 +0000 (12:58 -0400)]
staging: rtl8192u: r8192U_core: whitespace neatening to fix consistent spacing code style errors
Clean-up the file by using a cleaner spacing around symbols and
words. Mostly use the automatic checkpatch whitespacing fixes.
This takes care of the consistent spacing errors reported by
checkpatch.
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Raphaël Beamonte [Tue, 18 Aug 2015 16:58:06 +0000 (12:58 -0400)]
staging: rtl8192u: r8192U_core: fix missing struct leading to consistent spacing code style error
A missing struct keyword in variable declaration triggered a
need consistent spacing around '*' code style error. The struct
keyword thus has been added everywhere for the rtl8192_rx_info
struct, and therefore its typedef removed as not needed anymore.
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Raphaël Beamonte [Tue, 18 Aug 2015 16:58:05 +0000 (12:58 -0400)]
staging: rtl8192u: r8192U_core: fix else following close brace code style error
Fix "else should follow close brace" checkpatch error.
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Raphaël Beamonte [Tue, 18 Aug 2015 16:58:04 +0000 (12:58 -0400)]
staging: rtl8192u: r8192U_core: fix code indent using spaces code style error
Fix "code indent should use tabs where possible" checkpatch error
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Raphaël Beamonte [Tue, 18 Aug 2015 16:58:03 +0000 (12:58 -0400)]
staging: rtl8192u: r8192U_core: fix space before close parenthesis code style error
A space existed before the close parenthesis of an if statement. This patch
removes it to follow the kernel code style.
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Raphaël Beamonte [Tue, 18 Aug 2015 16:58:02 +0000 (12:58 -0400)]
staging: rtl8192u: r8192U_core: fix switch and case indent code style error
Some switch and case were not be at the same indent level.
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ronit Halder [Wed, 19 Aug 2015 05:47:09 +0000 (11:17 +0530)]
Staging: most: Use NULL instead of zero
This patch fixes the warning generated by sparse
"Using plain integer as NULL pointer" by using NULL
instead of zero.
Signed-off-by: Ronit halder <ronit.crj@gmail.com>
Acked-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Mon, 24 Aug 2015 13:49:32 +0000 (19:19 +0530)]
staging: most: NULL comparison style
checkpatch complains when a variable comparison to NULL is written as:
variable == NULL or variable != NULL.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Tue, 18 Aug 2015 15:18:28 +0000 (20:48 +0530)]
staging: most: fix Makefile
The Makefile is including "drivers/media/video". But there is no such
directory in kernel tree. Since it is aim-v4l2 this might have been
"drivers/media/v4l2-core", but the Kconfig already mentions that it
depends on VIDEO_V4L2. So no need to mention that again in the Makefile.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Tue, 18 Aug 2015 15:18:27 +0000 (20:48 +0530)]
staging: most: remove unused variable
The variable conf was only assigned the value but was never used.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Tue, 18 Aug 2015 15:18:26 +0000 (20:48 +0530)]
staging: most: use NULL pointer
sparse was complaining that an integer is used as NULL pointer. Fix it
by using NULL.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Tue, 18 Aug 2015 15:18:25 +0000 (20:48 +0530)]
staging: most: make functions static
split_arg_list() and audio_set_pcm_format() are being called from the
same file and is not referenced from outside, so make them as static.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Tue, 18 Aug 2015 15:18:24 +0000 (20:48 +0530)]
staging: most: remove unused functions
These functions were only defined but not used anywhere.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Tue, 18 Aug 2015 15:18:23 +0000 (20:48 +0530)]
staging: most: out of memory error
If kzalloc fails it will print lots of debugging information in the log,
no need to have another in the code.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Tue, 18 Aug 2015 15:18:22 +0000 (20:48 +0530)]
staging: most: remove multiple blank line
Multiple blank lines are not recommended in the kernel coding style.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Tue, 18 Aug 2015 15:18:21 +0000 (20:48 +0530)]
staging: most: bool comparison style
Mentioning true or false in the if comparison is error prone and also
not according to the coding style.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alexander Kuleshov [Thu, 27 Aug 2015 13:09:27 +0000 (19:09 +0600)]
staging/rtl8723au: Use %pM format specifier to print mac address
printk() supports %pM format specifier for printing 6-byte MAC/FDDI
addresses in hex notation small buffers, let's use it intead of %x:%x...
Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Alexander Kuleshov [Thu, 27 Aug 2015 13:08:15 +0000 (19:08 +0600)]
staging/rtl8188eu: Use %pM format specifier to print mac address
printk() supports %pM format specifier for printing 6-byte MAC/FDDI
addresses in hex notation small buffers, let's use it intead of %x:%x...
Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Hari Prasath Gujulan Elango [Thu, 20 Aug 2015 09:59:44 +0000 (09:59 +0000)]
staging: wilc1000: simplify 'memset' of 2D array
This patch simplifies the 'memset' done on a static 2D array.
Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Johnny Kim [Thu, 20 Aug 2015 07:32:53 +0000 (16:32 +0900)]
staging: wilc1000: change address to fixed value
The linux_wlan_init_test_config() is called once when net driver is loaded.
And because the pointer type of the pstrWFIDrv is changed with the interger
type, this patch replaces it with designated value instead of pointer.
Signed-off-by: Johnny Kim <johnny.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Johnny Kim [Thu, 20 Aug 2015 07:32:51 +0000 (16:32 +0900)]
staging: wilc1000: add an argument for Handle_SetWfiDrvHandler
Similar to functions of same layer, this patch add an argument for
Handle_SetWfiDrvHandler function. As a result, the redundant typecasting is
removed.
Signed-off-by: Johnny Kim <johnny.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Johnny Kim [Thu, 20 Aug 2015 07:32:50 +0000 (16:32 +0900)]
staging: wilc1000: use the real data type
This patch changes the type of gu8FlushedJoinReqDrvHandler with his real
data type becasue typecasting is not necessary. In result, typecasting
which is not necessary and some building warnings is removed.
Signed-off-by: Johnny Kim <johnny.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Wed, 19 Aug 2015 06:59:08 +0000 (15:59 +0900)]
staging: wilc1000: rename WILC_MsgQueueDestroy to wilc_mq_destroy
This patch replaces WILC_MsgQueueDestroy to wilc_mq_destroy to
shorten function name and avoid CamelCase.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Wed, 19 Aug 2015 06:59:07 +0000 (15:59 +0900)]
staging: wilc1000: rename WILC_MsgQueueRecv to wilc_mq_recv
This patch replaces WILC_MsgQueueRecv with wilc_mq_recv
to shorten function name and avoid CamelCase.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Wed, 19 Aug 2015 06:59:06 +0000 (15:59 +0900)]
staging: wilc1000: rename WILC_MsgQueueSend to wilc_mq_send
This patch replaces WILC_MsgQueueSend with wilc_mq_send to
shorten function name and avoid CamelCase.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Wed, 19 Aug 2015 06:59:05 +0000 (15:59 +0900)]
staging: wilc1000: rename WILC_MsgQueueCreate to wilc_mq_create
This patch replaces WILC_MsgQueueCreate with wilc_mq_create to
shorten function name and avoid CamelCase.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Wed, 19 Aug 2015 06:59:04 +0000 (15:59 +0900)]
staging: wilc1000: replace WILC_ErrNo by int type
This patch replaces WILC_ErrNo with int type.
WILC_ErrNo typedef is also removed.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Wed, 19 Aug 2015 06:59:03 +0000 (15:59 +0900)]
staging: wilc1000: wilc_msgqueue.c: fix bool comparison style
This patch changes bool comparison style found by checkpatch.pl
CHECK: Using comparison to true is error prone
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Wed, 19 Aug 2015 06:59:02 +0000 (15:59 +0900)]
staging: wilc1000: wilc_msgqueue.c: remove kfree NULL check
This patch removes kfree NULL check.
WARNING: kfree(NULL) is safe and this check is probably not required.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Wed, 19 Aug 2015 06:59:01 +0000 (15:59 +0900)]
staging: wilc1000: wilc_msgqueue.c: use ! operator instead of NULL comparison
This patch uses ! operator instead of NULL comparison.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Wed, 19 Aug 2015 06:59:00 +0000 (15:59 +0900)]
staging: wilc1000: wilc_msgqueue.c: remove unnecessary parentheses
This patch remove unnecessary parentheses found by checkpatch.pl
CHECK: Unnecessary parentheses around pHandle->hSem
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Wed, 19 Aug 2015 06:58:59 +0000 (15:58 +0900)]
staging: wilc1000: wilc_msgqueue.c: remove blank line before a close brace
This patch removes blank line before a close brace "}"
CHECK: Blank lines aren't necessary before a close brace '}'
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Wed, 19 Aug 2015 06:58:58 +0000 (15:58 +0900)]
staging: wilc1000: wilc_msgqueue.c: remove multiple blank lines
This patch removes multiple blank lines.
CHECK: Please don't use multiple blank lines
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Wed, 19 Aug 2015 06:58:57 +0000 (15:58 +0900)]
staging: wilc1000: wilc_msgqueue.c: remove blank line after open brace
This patch removes a blank line for open brace "{"
CHECK: Blank lines aren't necessary after an open brace '{'
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Wed, 19 Aug 2015 06:58:56 +0000 (15:58 +0900)]
staging: wilc1000: wilc_msgqueue.c: remove braces for single statement
This patch removes braces for single statement blocks.
WARNING: braces {} are not necessary for single statement blocks
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Tue, 18 Aug 2015 14:18:11 +0000 (23:18 +0900)]
staging: wilc1000: add a blank line after declaration
This patch adds a blank line after declaration found by checkpatch.pl
WARNING: Missing a blank line after declarations.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Raphaël Beamonte [Wed, 19 Aug 2015 03:14:50 +0000 (23:14 -0400)]
staging: wilc1000: replace MALLOC_WILC_BUFFER() macro to avoid possible memory leak
The MALLOC_WILC_BUFFER() macro was using a return statement, and didn't
take care of possible memory leaks and subsequent bugs when it was failing
after succeeding some allocations. This patch corrects this behavior.
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Raphaël Beamonte [Wed, 19 Aug 2015 03:14:49 +0000 (23:14 -0400)]
staging: wilc1000: remove FREE_WILC_BUFFER()
It was just a wrapper around kfree(), so call that instead.
Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Trung Thanh Le [Sat, 15 Aug 2015 14:09:45 +0000 (22:09 +0800)]
staging: android: fix coding style checks in sw_sync.c
replace comparison "obj" to NULL with "!obj"
Signed-off-by: Trung Thanh Le <trungthanh1608@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peng Sun [Thu, 27 Aug 2015 07:41:07 +0000 (15:41 +0800)]
staging: android: ashmem.c: 'Alignment' style issue
fix two CHECK issues by checkpatch.pl with --strict:
Alignment should match open parenthesis
Signed-off-by: Peng Sun <sironhide0null@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peng Sun [Thu, 27 Aug 2015 07:41:06 +0000 (15:41 +0800)]
staging: android: ashmem.c: 'No space necessary after' style issue
fix two CHECK issues by checkpatch.pl with --strict:
No space is necessary after a cast
Signed-off-by: Peng Sun <sironhide0null@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peng Sun [Thu, 27 Aug 2015 07:41:05 +0000 (15:41 +0800)]
staging: android: ashmem.c: 'spaces preferred around that -' style issue
fix a CHECK style issue by checkpatch.pl with --strict:
spaces preferred around that '-'
Signed-off-by: Peng Sun <sironhide0null@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Sat, 15 Aug 2015 20:57:35 +0000 (21:57 +0100)]
staging: vt6655: replace typedef struct tagSRxDesc
with struct vnt_rx_desc and all members the same.
volatile is removed from pointers as this generates warning
message.
Only the first four members of vnt_rx_desc need to be volatile.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Sat, 15 Aug 2015 20:57:34 +0000 (21:57 +0100)]
staging: vt6655: replace typedef struct tagDEVICE_RD_INFO
with struct vnt_rd_info
volatile is removed because it will generate a warning
(in any case this member is not) and renaming rd_info.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Sat, 15 Aug 2015 20:57:33 +0000 (21:57 +0100)]
staging: vt6655: replace typedef struct tagRDES1
with struct vnt_rdes1 and members
wReqCount -> req_count
wReserved -> reserved
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Malcolm Priestley [Sat, 15 Aug 2015 20:57:32 +0000 (21:57 +0100)]
staging: vt6655: replace typedef struct tagRDES0
with struct vnt_rdes0 replacing members as follows
wResCount -> res_count
f15Reserved -> f15_reserved
f1Owner -> owner
big endian
f8Reserved1 -> f8_reserved1
f7Reserved -> f7_reserved
Narrowing endian differences to inside structure.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
H Hartley Sweeten [Mon, 24 Aug 2015 17:14:06 +0000 (10:14 -0700)]
staging: comedi: usbduxfast: remove unnecessary clearing of private data
The clearing of the private data members in the (*detatch) is not
necessary. The comedi core is going to kfree the private data as soon
as the (*detach) finishes.
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>
H Hartley Sweeten [Mon, 24 Aug 2015 17:14:05 +0000 (10:14 -0700)]
staging: comedi: usbduxfast: absorb usbduxfast_attach_common()
This function is only called by the (*auto_attach) to do the final
setup of the analog input subdevice.
For aesthetics absorb it into usbduxfast_auto_attach() and reorder
the initialization of the subdevice to better follow the "norm" in
comedi drivers.
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>
H Hartley Sweeten [Mon, 24 Aug 2015 17:14:04 +0000 (10:14 -0700)]
staging: comedi: usbduxfast: remove unnecessary semaphore down/up
The semaphore down/up in usbduxfast_attach_common() is not necessary.
This function is only called as part of the (*auto_attach) and does
not talk to the USB device.
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>
H Hartley Sweeten [Mon, 24 Aug 2015 17:14:03 +0000 (10:14 -0700)]
staging: comedi: usbduxfast: document strange ai maxdata
The subdevice 'maxdata' is typically a mask of the valid bits that can
be returned by a subdevice, (1 << bits) - 1. The analog inputs of this
device have a resolution of 12-bits so the 'maxdata' should be 0x0fff.
But, this hardware can produce a value of 0x1000 indicating an overflow
from the ADC. The comedilib library's comedi_to_phys() function will
then return NAN when this value is read from the hardware.
Add a comment to clarify the strage 'maxdata' value.
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>
H Hartley Sweeten [Mon, 24 Aug 2015 17:14:02 +0000 (10:14 -0700)]
staging: comedi: usbduxfast: use a common exit path in ai (*do_cmd)
For aesthetics, use 'goto' and a common exit point in this function so
that the up of the semaphore is not overlooked.
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>
H Hartley Sweeten [Mon, 24 Aug 2015 17:14:01 +0000 (10:14 -0700)]
staging: comedi: usbduxfast: tidy up the conversion timing validation
Cleanup the validation of the cmd->convert_arg to use the same calculation
in the (*do_cmdtest) and the (*do_cmd).
Remove the, then unnecessary, redundant check in the (*do_cmd).
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>
H Hartley Sweeten [Mon, 24 Aug 2015 17:14:00 +0000 (10:14 -0700)]
staging: comedi: usbduxfast: TRIG_EXT is only valid for cmd->start_src
According to the code, and verified with the author Bernd Porr, the
TRIG_EXT trigger is only valid for the cmd->start_src. Remove this
trigger from the cmd->scan_begin_src and cmd->convert_src.
The only valid scan_begin_src is then TRIG_FOLLOW and the convert_src
is only TRIG_TIMER. Remove the redundant unique trigger checks in Step
2b of the (*do_cmdtest) as well as any other unnecessary checks of
those trigger sources.
Also remove the incorrect comment for a cmd->stop_src of TRIG_EXT.
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>
H Hartley Sweeten [Mon, 24 Aug 2015 17:13:59 +0000 (10:13 -0700)]
staging: comedi: usbduxfast: TRIG_EXT only works for 1 or 16 channels
Move this check from the (*do_cmd) to the (*do_cmdtest).
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>
H Hartley Sweeten [Mon, 24 Aug 2015 17:13:58 +0000 (10:13 -0700)]
staging: comedi: usbduxfast: fix multi-line comment
This comment does not need to be multi-line. Fix it to remove the
checkpatch warning.
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>
H Hartley Sweeten [Mon, 24 Aug 2015 17:13:57 +0000 (10:13 -0700)]
staging: comedi: usbduxfast: use preferred kernel types
As suggested by checkpatch.pl:
CHECK: Prefer kernel type 'u8' over 'uint8_t'
CHECK: Prefer kernel type 's8' over 'int8_t'
For consistency, also change the uint16_t and int16_t types to
u16 and s16.
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>
H Hartley Sweeten [Mon, 24 Aug 2015 17:13:56 +0000 (10:13 -0700)]
staging: comedi: usbduxfast: remove impossible 'if (!devpriv)' checks
The private data 'devpriv' is allocated in the (*auto_attach) before
the subdevices are initialized and the (*auto_attach) has to complete
successfully before the core will call any of the subdevice operations.
Because of this the (!devpriv) checks in the subdevice code can never
fail. Remove them.
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>
H Hartley Sweeten [Mon, 24 Aug 2015 17:13:55 +0000 (10:13 -0700)]
staging: comedi: usbduxfast: only chanlist of 1, 2, 3, or 16 are supported
The analog input (*do_cmd) only supports channel lists of 1, 2, 3, or 16
channels. Add a check for this to usbduxfast_ai_check_chanlist() and remove
the check from usbduxfast_ai_cmd().
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>
H Hartley Sweeten [Mon, 24 Aug 2015 17:13:54 +0000 (10:13 -0700)]
staging: comedi: usbduxfast: chanlist check is Step 5 of (*do_cmdtest)
The channel list should be checked in Step 5 of the (*do_cmdtest) not
as part of the (*do_cmd). Factor the check out of usbduxfast_ai_cmd().
Tidy up the factored out code. The channel number 'i' will never be
greater than NUMCHANNELS due to the subdevice setup and the checks
done in the code. The up/down of the semaphore is also not needed
because the (*do_cmdtest) never actually tries to access the hardware.
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>
H Hartley Sweeten [Mon, 17 Aug 2015 23:58:27 +0000 (16:58 -0700)]
staging: comedi: s526: fix the block comments
Tidy up the block comments to fix the checkpatch.pl warnings.
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>
H Hartley Sweeten [Mon, 17 Aug 2015 23:58:26 +0000 (16:58 -0700)]
staging: comedi: s526: remove #if 0'ed out code block
This #if 0'ed out code is not necessary. It's actually just a copy
of the psuedo code in the S526 Hardware Manual that shows an example
of a counter application. 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>
H Hartley Sweeten [Mon, 17 Aug 2015 23:58:25 +0000 (16:58 -0700)]
staging: comedi: s526: remove unnecessary defines
Remove a couple unused defines,
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>
H Hartley Sweeten [Mon, 17 Aug 2015 23:58:24 +0000 (16:58 -0700)]
staging: comedi: s526: remove s526_ai_insn_config()
This (*insn_config) does not follow the comedi core API. It also
would not work as expected.
It appears to be trying to configure the analog input subdevice so
that the (*insn_read) would read multiple channels (data[0]) and
optionally enable the 15us delay (data[1]) needed for the multiplexor
to change channels between samples.
Unfortunately, the comedi core expects (*insn_read) operations to
return 1 or more samples for a single channel, which is what the
(*insn_read) in this driver does.
The (*insn_config) is also enabling the analog input end-of-conversion
interrupt. This isn't needed, and might be a problem since the driver
does not currently request and interrupt. The enable bit does not
need to be set for the end-of-conversion to occur in the interrupt
status register.
Remove the (*insn_config) and modify the (*insn_read) to automatically
handle the 15us delay when needed.
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>
H Hartley Sweeten [Mon, 17 Aug 2015 23:58:23 +0000 (16:58 -0700)]
staging: comedi: s526: tidy up s526_ai_rinsn()
Rename this function to follow the normal naming in comedi drivers.
Use the comedi_offset_munge() helper to munge the hardware two's
complement data to the comedi offset binary format.
Change the final return to insn->n to clarify the return value without
the need for the comment.
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>
H Hartley Sweeten [Mon, 17 Aug 2015 23:58:22 +0000 (16:58 -0700)]
staging: comedi: s526: wait for analog output conversions to complete
It's possible for the user to write more than one value to an analog
output channel with the (*insn_write) operation. Use comedi_timeout()
to check the interrupt status register to ensure that each data
conversion is complete before writing the next value.
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>
H Hartley Sweeten [Mon, 17 Aug 2015 23:58:21 +0000 (16:58 -0700)]
staging: comedi: s526: tidy up subdevice init
For aesthetics, add some whitespace to the subdevice initialization.
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>
H Hartley Sweeten [Mon, 17 Aug 2015 23:58:20 +0000 (16:58 -0700)]
staging: comedi: s526: define the eeprom data and control registers
Define these registers and their bits.
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>
H Hartley Sweeten [Mon, 17 Aug 2015 23:58:19 +0000 (16:58 -0700)]
staging: comedi: s526: define the miscellaneous register and bits
Define this register and its bits.
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>
H Hartley Sweeten [Mon, 17 Aug 2015 23:58:18 +0000 (16:58 -0700)]
staging: comedi: s526: define the digtial I/O control register and bits
Define this register and its bits and remove the magic numbers.
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>
H Hartley Sweeten [Mon, 17 Aug 2015 23:58:17 +0000 (16:58 -0700)]
staging: comedi: s526: define the interrupt enable/status registers
These registers use the same bit defines. Define both of them and
the bits.
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>
H Hartley Sweeten [Mon, 17 Aug 2015 23:58:16 +0000 (16:58 -0700)]
staging: comedi: s526: add defines for the ao/ai data register
The same register is used for analog output and input data. Add defines
for both for added clarity.
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>