Commit Graph

132 Commits

Author SHA1 Message Date
Markus Elfring e23afff948 staging: most: Delete an unnecessary check before the function call "module_put"
The module_put() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Chaehyun Lim c904ffdaf3 staging: most: rename DIM_EnqueueBuffer to dim_enqueue_buffer
This patch renames DIM_EnqueueBuffer to dim_enqueue_buffer to avoid
camelcase found by checkpatch.

CHECK: Avoid CamelCase: <DIM_EnqueueBuffer>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:877:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Chaehyun Lim 60d5f66ce5 staging: most: rename DIM_GetChannelState to dim_get_channel_state
This patch renames DIM_GetChannelState to dim_get_channel_state to avoid
camelcase found by checkpatch.

CHECK: Avoid CamelCase: <DIM_GetChannelState>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:865:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Chaehyun Lim e380925312 staging: most: fix argument name of DIM_GetChannelState
The second argument name of DIM_GetChannelState declaration changes from
dim_ch_state_ptr to state_ptr. The DIM_GetChannelState declaration and
definition has same argument name as state_ptr.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Chaehyun Lim 0d08d54f8d staging: most: rename DIM_ServiceChannel to dim_service_channel
This patch renames DIM_ServiceChannel to dim_service_channel to avoid
camelcase found by checkpatch.

CHECK: Avoid CamelCase: <DIM_ServiceChannel>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:857:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Chaehyun Lim e5baa9e99c staging: most: rename DIM_ServiceIrq to dim_service_irq
This patch renames DIM_ServiceIrq to dim_service_irq to avoid camelcase
found by checkpatch.

CHECK: Avoid CamelCase: <DIM_ServiceIrq>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:819:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Chaehyun Lim a5e4d891a3 staging: most: rename DIM_DestroyChannel to dim_destroy_channel
This patch renames DIM_DestroyChannel to dim_destroy_channel to avoid
camelcase found by checkpatch.

CHECK: Avoid CamelCase: <DIM_DestroyChannel>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:806:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Chaehyun Lim 10e5efb7b5 staging: most: rename DIM_InitSync to dim_init_sync
This patch renames DIM_InitSync to dim_init_sync to avoid camelcase
found by checkpatch.

CHECK: Avoid CamelCase: <DIM_InitSync>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:781:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Chaehyun Lim f1383176c9 staging: most: rename DIM_InitIsoc to dim_init_isoc
This patch renames DIM_InitIsoc to dim_init_isoc to avoid camelcase
found by checkpatch.

CHECK: Avoid CamelCase: <DIM_InitIsoc>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:756:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Chaehyun Lim 26303150c3 staging: most: rename DIM_InitAsync to dim_init_async
This patch renames DIM_InitAsync to dim_init_async to avoid camelcase
found by checkpatch.

CHECK: Avoid CamelCase: <DIM_InitAsync>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:749:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Chaehyun Lim a3f3e92119 staging: most: rename DIM_InitControl to dim_init_control
This patch renames DIM_InitControl to dim_init_control to avoid
camelcase found by checkpatch.

CHECK: Avoid CamelCase: <DIM_InitControl>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:742:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Chaehyun Lim aff1924508 staging: most: rename DIM_NormSyncBufferSize to dim_norm_sync_buffer_size
This patch renames DIM_NormSyncBufferSize to dim_norm_sync_buffer_size
to avoid camelcase found by checkpatch.

CHECK: Avoid CamelCase: <DIM_NormSyncBufferSize>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:734:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Chaehyun Lim e302ca47b5 staging: most: rename DIM_NormIsocBufferSize to dim_norm_isoc_buffer_size
This patch renames DIM_NormIsocBufferSize to dim_norm_isoc_buffer_size
to avoid camelcase found by checkpatch.

CHECK: Avoid CamelCase: <DIM_NormIsocBufferSize>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:720:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Chaehyun Lim c64c6073e8 staging: most: rename DIM_NormCtrlAsyncBufferSize to dim_norm_ctrl_async_buffer_size
This patch renames DIM_NormCtrlAsyncBufferSize to
dim_norm_ctrl_async_buffer_size to avoid camelcase found by checkpatch

CHECK: Avoid CamelCase: <DIM_NormCtrlAsyncBufferSize>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:709:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Chaehyun Lim 58889788fc staging: most: rename DIMCB_IoRead to dimcb_io_read
This patch renames DIMCB_IoRead to dimcb_io_read to avoid camelcase
found by checkpatch.

CHECK: Avoid CamelCase: <DIMCB_IoRead>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:157:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Chaehyun Lim 1efc456462 staging: most: rename DIMCB_IoWrite to dimcb_io_write
This patch renames DIMCB_IoWrite to dimcb_io_write to avoid camelcase
found by checkpatch.

CHECK: Avoid CamelCase: <DIMCB_IoWrite>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:154:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Chaehyun Lim de6687313d staging: most: rename DIMCB_OnError to dimcb_on_error
This patch renames DIMCB_OnError to dimcb_on_error to avoid camelcase
found by checkpatch.

CHECK: Avoid CamelCase: <DIMCB_OnError>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:77:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Chaehyun Lim b724207b41 staging: most: rename DIM_GetLockState to dim_get_lock_state
This patch renames DIM_GetLockState to dim_get_lock_state to avoid
camelcase found by checkpatch.

CHECK: Avoid CamelCase: <DIM_GetLockState>
FILE: drivers/staging/most/hdm-dim2/dim2_hdm.c:131:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Chaehyun Lim 38c3854490 staging: most: rename DIM_DetachBuffers to dim_detach_buffers
This patch renames DIM_DetachBuffers to dim_detach_buffers to avoid
camelcase found by checkpatch.

CHECK: Avoid CamelCase: <DIM_DetachBuffers>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:886:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Chaehyun Lim 50a45b170c staging: most: rename DIM_Shutdown to dim_shutdown
This patch renames DIM_Shutdown to dim_shutdown to avoid camelcase
found by checkpatch.

CHECK: Avoid CamelCase: <DIM_Shutdown>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:676:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Chaehyun Lim 6417267f17 staging: most: rename DIM_Startup to dim_startup
This patch renames DIM_Startup to dim_startup to avoid camelcase
found by checkpatch.

CHECK: Avoid CamelCase: <DIM_Startup>
FILE: drivers/staging/most/hdm-dim2/dim2_hal.c:653:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Chaehyun Lim 3c70754250 staging: most: add spaces preferred around that '<<'
This patch adds space around '<<' found by checkpatch.

CHECK: spaces preferred around that '<<' (ctx:VxV)
FILE: drivers/staging/most/hdm-dim2/dim2_reg.h:69:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Chaehyun Lim 23242684c1 staging: most: remove blank line after an open brace
This patch removes blank line after an open brace found by checkpatch.
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>
2015-11-15 20:02:47 -08:00
Chaehyun Lim fabb93f18f staging: most: remove multiple blank lines
This patch removes multiple blank lines found by checkpatch.
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>
2015-11-15 20:02:47 -08:00
Christian Gromm c27fc351cf staging: most: remove exclusive wait_queue
This patch removes the unnecessary wait_queue that has exclusively been
used for the poll function and its poll_table. Instead, an already
existing one is used.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:57:19 +09:00
Christian Gromm 7f9cacb62d staging: most: hdm-dim2: use min_t()
This patch replaces the usage of min() by min_t().

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:57:19 +09:00
Muhammad Falak R Wani bff1d83d78 staging: most: hdm-usb: Use setup_timer
Use the timer API function setup_timer instead of init_timer, removing
the structure field assignments.

<smpl>

@timer@
expression e1,e2,e3,fn_ptr;
@@
-init_timer(&e1);
+setup_timer(&e1, fn_ptr, e2);
... when != fn_ptr = e3
-e1.function = fn_ptr;
-e1.data = e2;

</smpl>

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:09:03 -07:00
Christian Gromm f96d48aaa9 staging: most: remove comparison to NULL
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:08:20 -07:00
Christian Gromm 181a2aa185 staging: most: use preferred kzalloc parameters
This patch uses the preferred call to kzalloc. It replaces
kzalloc(sizeof(struct aim_fh)...) by kzalloc(sizeof(*fh)...).

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:08:20 -07:00
Christian Gromm 2aa9b96ff6 staging: most: use preferred kernel types
This patch makes use of the preferred kernel types such as u16, u32.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:08:20 -07:00
Christian Gromm 623d800252 staging: most: fix logical operator position
This patch puts logical continuations on the previous line to meet
coding style.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:08:20 -07:00
Christian Gromm df8da2e3e4 staging: most: remove unnecessary parentheses
This patch simply removes unnecessary parentheses.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:08:20 -07:00
Christian Gromm 9cbe5aa65d staging: most: use blank line after declarations
This patch fixes style violation regarding blank lines after
function/struct/union/enum declarations.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:08:16 -07:00
Christian Gromm 9deba73de5 staging: most: use braces on all arms of statement
This patch fixes style issues regarding braces on all arms of a statement.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:08:16 -07:00
Christian Gromm edaa1e33e2 staging: most: make alignment match open parenthesis
This patch fixes coding style violations by making alignments match
open parenthesis.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:08:16 -07:00
Christian Gromm c6c3f3458f staging: most: remove multiple assignment
This patch removes multiple assignments as specified in coding style.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:08:16 -07:00
Christian Gromm a64557bae3 staging: most: removed redundant code
This patch removes redundant code.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:08:16 -07:00
Christian Gromm 16dc374338 staging: most: put spaces around operator
This patch puts spaces around the asterisk operator. It is needed to
prevent checkpatch from reporting an issue.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:08:16 -07:00
Christian Gromm 9ac23b344e staging: most: remove multiple blank lines
This patch removes the usage of multiple blank lines from driver modules.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:08:16 -07:00
Christian Gromm 1446ff09ff staging: most: fix line-over-80-characters violations
This patch prevents code from crossing the 80 character margin.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 23:09:41 -07:00
Christian Gromm b2db4b245e staging: most: change parameter description
This patch changes the description of a function parameter for a better
understanding.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 23:09:41 -07:00
Christian Gromm d58b0ee39a staging: most: replace memcpy by ether_addr_copy
This patch replaces memcpy() by the preferred function ether_addr_copy().

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 23:09:41 -07:00
Christian Gromm 47af41b0d9 staging: most: fix misplaced constants in comparisons
This patch removes and fixes constants being misplaced in comparisons.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 23:09:41 -07:00
Christian Gromm ba170ee2b9 staging: most: make hdm-usb follow the coding style
This patch fixes a couple of issues of the hdm-usb module found by
checkpatch.pl.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 23:09:41 -07:00
Christian Gromm bfa1a42ec3 staging: most: fix checkpatch issues of hdm i2c
This patch fixes the issues of HDM module i2c found by checkpatch.pl

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 23:09:41 -07:00
Christian Gromm ff466a5bc2 staging: most: remove constants from comparisons
This patch removes constants from comparisons and fixes checkpatch warnings
about constants being put in the wrong place inside a comparison.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 23:09:41 -07:00
Christian Gromm 9158d33a5d staging: most: correct coding style breaches
This patch fixes line-over-80-characters violation and removes the
splitting of quoted strings.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 23:08:39 -07:00
Shivani Bhardwaj bba76322c3 Staging: most: cdev: Remove useless check
The variable mbo is already NULL tested so, check on it should be
removed.
Semantic patch used:

@@ expression E;
statement S; @@
if(E==NULL) {... return ...;}
- if(E)
  S

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 23:08:39 -07:00
Gavin Thomas Claugus b981da1251 Staging: most: fix style issue in aim-cdev/cdev.c
Fix 80+ character line in cdev.c to stop checkpatch from whining.

Signed-off-by: Gavin Thomas Claugus <gclaugus@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 23:08:39 -07:00
Shraddha Barke 98b5afd833 Staging: most: Remove unnecessary cast on void pointer
void pointers do not need to be cast to other pointer types.

The semantic patch used to find this:

@r@
expression x;
void* e;
type T;
identifier f;
@@

(
  *((T *)e)
|
  ((T *)x)[...]
|
  ((T *)x)->f
|
- (T *)
  e
)

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16 22:51:48 -07:00