Commit Graph

36387 Commits

Author SHA1 Message Date
Ian Abbott
5afdcad2f8 staging: comedi: comedi_test: limit maximum convert_arg
When testing the parameters for setting up an asynchronous command on
the AI subdevice, limit the maximum conversion period
(`cmd->convert_arg`) so that the number of conversions in a scan
(`cmd->scan_end_arg`, same as `cmd->chanlist_len`) multiplied by the
conversion period fits within an `unsigned int`, as that is used to
limit the minimum scan period (`cmd->scan_begin_arg`).

Also ensure rounding of the conversion period and scan period to the
nearest microsecond both fit in an `unsigned int`.  Do all this in stage
4 ("fix up any arguments") of the command testing.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:58:36 +09:00
Ian Abbott
87f64803ca staging: comedi: comedi_test: remove nano_per_micro
The `static const int nano_per_micro` variable is set to 1000, the
number of nanoseconds in a microsecond.  Remove it and use the
`NSEC_PER_USEC` macro from <linux/time.h> instead.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:58:36 +09:00
Ian Abbott
19e86985b0 staging: comedi: comedi_test: saturate fake waveform values
While an asynchronous command is running on the analog input subdevice,
fake waveform generators are connected to each channel to provide the
input voltages that are converted to sample value.  Channel 0 is
connected to a sawtooth generator, channel 1 is connected to a
squarewave generator, and the remaining channels are connected to a
flatline generator.  The non-flatline generators share the same
amplitude (in microvolts) and period (in microseconds) which are
configured when the COMEDI device is attached.  All waveforms are
centered around 0 microvolts and the non-flatline waveforms go between
-amplitude and +amplitude.

It is possible for the waveforms to swing outside the input range of the
channels to which they are connected.  When that happens, the sample
values resulting from simulated A-to-D conversion will wrap around due
to integer overflow.  Prevent that by clamping the sample values that
would go out of range.  This is closer to how a real hardware device
would behave (assuming the input voltage is not high enough to damage
the hardware!).

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:58:36 +09:00
Ian Abbott
cbad8cf426 staging: comedi: comedi_test: reformat multi-line comments
Use the preferred style for multi-line comments.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:58:36 +09: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
Ioana Ciornei
806535b623 staging: iio: accel: add bracket on all branches of the if/else
This patch adds brackets on all of the conditional branches in
order to follow the linux coding style.

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:53:42 +09:00
Ioana Ciornei
48948abe05 staging: iio: accel: place logical operators on the previous line
This patch moves the logical operators on the previous line in order
to follow the linux coding style.

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:53:42 +09:00
Ioana Ciornei
663b03d8ae staging: iio: accel: remove unwanted blank lines
This patch removes unwanted blank lines in order to follow
the linux coding style.

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:53:42 +09:00
Ioana Ciornei
c50ea26641 staging: iio: accel: fix block comments alignment
This patch properly aligns the block comment in order
to follow the linux coding style convetions.

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:53:42 +09:00
Ioana Ciornei
4a613ad42d staging: iio: accel: add blank lines after function definitions
This patch add blank lines after functions definitions in
order to follow the linux coding style.

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:53:42 +09:00
Ioana Ciornei
89ea25c7ae staging: iio: accel: change uint8_t to u8
This patch changes uint8_t type to preferred kernel
type u8 in order to follow the linux coding style
conventions.

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:53:42 +09:00
Ioana Ciornei
252b1d8466 staging: iio: accel: properly align function arguments
This patch properly aligns the function arguments or
its parameters in order to match the open bracket.

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:53:42 +09:00
Ioana Ciornei
1abe0c9a72 staging: iio: accel: add spaces aroung binary operators
This patch adds spaces around binary operators such as '*',
'/', '+' in order to improve readability.

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:53:42 +09:00
Punit Vara
0bc852413b Staging: wilc1000: Prefer eth_broadcast_addr over memset()
This patch is to the host_interface.c that fixes up following
warning by checkpatch:

-prefer eth_broadcast_addr() over memset()

Signed-off-by: Punit Vara <punitvara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:51:27 +09:00
Chaehyun Lim
0d21ad20f4 staging: wilc1000: fix line over 80 characters
This patch fixes line over 80 characters found by checkpatch.

WARNING: line over 80 characters
FILE: drivers/staging/wilc1000/host_interface.h:424:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:50:45 +09:00
Chaehyun Lim
58eabd68a4 staging: wilc1000: replace kmalloc/memcpy with kmemdup
This patch replaces kmalloc followed by memcpy with kmemdup.
It is also added error checking to return -ENOMEM when kmemdup is
failed.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:50:45 +09:00
Chaehyun Lim
ff3bce2f6c staging: wilc1000: rename tenuAuth_type in host_int_add_wep_key_bss_ap
This patch changes tenuAuth_type to auth_type that is sixth argument of
this function to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:50:45 +09:00
Chaehyun Lim
730a28da66 staging: wilc1000: rename u8mode in host_int_add_wep_key_bss_ap
This patch changes u8mode to mode that is fifth argument of this
function to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:50:45 +09:00
Chaehyun Lim
a76dc953d5 staging: wilc1000: rename u8Keyidx in host_int_add_wep_key_bss_ap
This patch changes u8Keyidx to index that is fourth argument of this
function to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:50:45 +09:00
Chaehyun Lim
a5389b0749 staging: wilc1000: rename u8WepKeylen in host_int_add_wep_key_bss_ap
This patch changes u8WepKeylen to len that is third argument of this
function to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:50:45 +09:00
Chaehyun Lim
8111725a3a staging: wilc1000: rename pu8WepKey in host_int_add_wep_key_bss_ap
This patch changes pu8WepKey to key that is second argument of this
function to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:50:45 +09:00
Chaehyun Lim
fd74146158 staging: wilc1000: replace u8 with int.
This patch changes data type of variable i from u8 to int.
It is used as index of an array to print its content. It's better
to use as data type of int.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:50:45 +09:00
Chaehyun Lim
a558ac6c97 staging: wilc1000: fix parameter name of function declaration
This patch changes struct host_if_drv of host_int_add_wep_key_bss_ap
function declaration from hWFIDrv to hif_drv.
With this change, first parameter name of this function declaration and
definition has same name as hif_drv.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:50:45 +09:00
Chaehyun Lim
641c20a635 staging: wilc1000: fix return type of host_int_add_wep_key_bss_ap
This patch changes return type of host_int_add_wep_key_bss_ap from s32
to int. The result variable gets return value from wilc_mq_send that has
return type of int. It should be changed return type of this function as
well as data type of result variable.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:50:45 +09:00
Chaehyun Lim
cf491d935a staging: wilc1000: fix line over 80 characters
This patch fixes line over 80 characters found by checkpatch.

WARNING: line over 80 characters
FILE: drivers/staging/wilc1000/host_interface.h:408:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:49:50 +09:00
Chaehyun Lim
1cc0c328d5 staging: wilc1000: replace kmalloc/memcpy with kmemdup
This patch replaces kmalloc followed by memcpy with kmemdup.
It is also added error checking of kmemdup.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:49:50 +09:00
Chaehyun Lim
0b2cc3e57c staging: wilc1000: rename u8Keyidx in host_int_add_wep_key_bss_sta
This patch changes u8Keyidx to index that is fourth argument of
host_int_add_wep_key_bss_sta to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:49:50 +09:00
Chaehyun Lim
dbc53194f8 staging: wilc1000: rename u8WepKeylen in host_int_add_wep_key_bss_sta
This patch changes u8WepKeylen to len that is third argument of
host_int_add_wep_key_bss_sta to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:49:50 +09:00
Chaehyun Lim
fba778b11d staging: wilc1000: rename pu8WepKey in host_int_add_wep_key_bss_sta
This patch changes pu8WepKey to key that is second argument of
host_int_add_wep_key_bss_sta to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:49:50 +09:00
Chaehyun Lim
5e4aebe1c0 staging: wilc1000: fix parameter name of function declaration
This patch changes struct host_if_drv of host_int_add_wep_key_bss_sta
function declaration from hWFIDrv to hif_drv.
With this change, first parameter name of this function declaration and
definition has same name as hif_drv.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:49:50 +09:00
Chaehyun Lim
66b8cb89e1 staging: wilc1000: fix return type of host_int_add_wep_key_bss_sta
This patch changes return type of host_int_add_wep_key_bss_sta from s32
to int. The result variable gets return value from wilc_mq_send that has
return type of int. It should be changed return type of this function
as well as data type of result variable.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:49:50 +09:00
Shivani Bhardwaj
d8060fc080 Staging: wilc1000: wilc_wfi_cfgoperations: Remove irrelevant wrapper function
Remove the wrapper function WILC_WFI_add_wilcvendorspec() and replace
its call with memcpy().

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:48:47 +09:00
Shivani Bhardwaj
ce08189862 Staging: wilc1000: coreconfigurator: Remove trailing whitespace
In block comments, trailing whitespaces should be removed.
Fix checkpatch ERROR: trailing whitespace

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:48:47 +09:00
Leo Kim
5beef2ca4f staging: wilc1000: rename u8RemainOnChan_pendingreq of struct host_if_drv
This patch renames u8RemainOnChan_pendingreq of struct host_if_drv to
remain_on_ch_pending to avoid CamelCase naming convention.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:18:29 +09:00
Leo Kim
d61f8e1eee staging: wilc1000: rename strHostIfRemainOnChan of struct host_if_drv
This patch renames strHostIfRemainOnChan of struct host_if_drv to remain_on_ch
to avoid CamelCase naming convention.
And, remove the relation comment.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:18:29 +09:00
Leo Kim
f8b1713246 staging: wilc1000: rename strWILC_UsrConnReq of struct host_if_drv
This patch renames strWILC_UsrConnReq of struct host_if_drv to usr_conn_req
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:18:29 +09:00
Leo Kim
70793b2ab4 staging: wilc1000: rename strWILC_UsrScanReq of struct host_if_drv
This patch renames strWILC_UsrScanReq of struct host_if_drv to usr_scan_req
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:18:29 +09:00
Leo Kim
6ceba0afed staging: wilc1000: rename u8MacAddress of struct get_mac_addr
This patch renames u8MacAddress of struct get_mac_addr to mac_addr
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:18:29 +09:00
Leo Kim
ae5e4522d3 staging: wilc1000: rename u8MacAddress of struct set_mac_addr
This patch renames u8MacAddress of struct set_mac_addr to mac_addr
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:18:29 +09:00
Leo Kim
c96debf114 staging: wilc1000: rename u32Mode of struct op_mode
This patch renames u32Mode of struct op_mode to mode
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:18:29 +09:00
Leo Kim
a7f3b12f1d staging: wilc1000: rename u32Address of struct drv_handler
This patch renames u32Address of struct drv_handler to handler
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:18:29 +09:00
Leo Kim
45102f83e2 staging: wilc1000: rename variable strWID
This patch renames variable strWID to wid
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:18:29 +09:00
Leo Kim
4be55e2287 staging: wilc1000: rename au8StartTime of struct join_bss_param
This patch renames au8StartTime of struct join_bss_param to start_time
to avoid CamelCase naming convention.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:18:29 +09:00
Leo Kim
df165a68de staging: wilc1000: host_interface: removes unused functions
This patch removes unused functions at host_interface files.
 - host_int_send_join_leave_info_to_host
 - host_int_send_network_info_to_host

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:18:29 +09:00
Leo Kim
96a6800089 staging: wilc1000: fixes please don't use multiple blank lines
This patch fixes the checks reported by checkpatch.pl
for Please don't use multiple blank lines.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:18:29 +09:00
Leo Kim
c09389acd4 staging: wilc1000: fixes missing a blank line after declarations
This patch fixes the warnings reported by checkpatch.pl
for Missing a blank line after declarations.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:18:29 +09:00
Leo Kim
0711645c81 staging: wilc1000: fixes blank lines aren't necessary brace
This patch fixes the checks reported by checkpatch.pl
for Blank lines aren't necessary after an open brace '{' and
Blank lines aren't necessary before a close brace '}'.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:18:29 +09:00
Leo Kim
d1666e2a26 staging: wilc1000: fixes braces {} are not necessary for single statement blocks
This patch fixes the warnings reported by checkpatch.pl
for braces {} are not necessary for single statement blocks

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:18:29 +09:00
Leo Kim
bafaa69656 staging: wilc1000: remove unnecessary parentheses around
This patch removes the checks reported by checkpatch.pl
for unnecessary parentheses around.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29 08:18:29 +09:00