Commit graph

549890 commits

Author SHA1 Message Date
Luis de Bethencourt 8c182ae207 staging: rtl8723au: core: rtw_wlan_util: fix misleading indentation
For loop is outside of the else branch of the above conditional statement.
Fixing misleading indentation.

Fix a smatch warning:
drivers/staging/rtl8723au/core/rtw_wlan_util.c:528
WMMOnAssocRsp23a() warn: curly braces intended?

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:38:48 -07:00
Cristina Moraru ada40ba4e5 staging: rtl8712: Replace kmalloc with kmalloc_array
Replace kmalloc with specialized function kmalloc_array
when the size is a multiplication of:
	number_of_elements * size_of_element

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:38:48 -07:00
Burcin Akalin 614a291090 staging: netlogic: Do not use multiple blank lines.
Remove multiple blank lines. Problem found using checkpatch.pl
"CHECK: Please don't use multiple blank lines"

Signed-off-by: Burcin Akalin <brcnakalin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:38:48 -07:00
Ioana Ciornei a9108b71b1 staging: dgap: add spaces around binary operator '|'
This patch adds spaces around binary operator '|'.
Done with coccinelle semantic patch:

@@
identifier x, y, z;
@@
(
- x|y|z
+ x | y | z
|
- x|y
+ x | y
)

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:33:42 -07:00
Ioana Ciornei 44209c9329 staging: dgap: remove unnecessary brackets
This patch removes unnecessary brackets when dealing with
unary operators like '&'.
Done with coccinelle semantic patch:

@@
expression e;
@@

(
- &(e)
+ &e
)

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:33:42 -07:00
Ioana Ciornei 181225530e staging: dgap: remove unnecessary space after cast
This patch removes unnecessary spaces after the cast.
Patch done with coccinelle semantic patch:

@rule0@
type t;
identifier e;
constant c;
expression expr;
@@

(
- (t) e
+ (t)e
|
- (t) c
+ (t)c
|
- (t) expr
+ (t)expr
)

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:33:42 -07:00
Ioana Ciornei 629c7349a2 staging: dgap: properly indent to match open paranthesis
Indent parameters and arguments passed to function calls to match
open paranthesis

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:33:42 -07:00
Ioana Ciornei fb795c6847 staging: dgap: remove unnecessary blank lines
This patch removes the unnecessary blank lines before a closed
bracket and after an open bracket.

Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:33:42 -07:00
Cristina Moraru cd857a158a staging: iio: magnetometer: Remove explicit comparisons
Remove comparisons to 0 or NULL

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:32:09 -07:00
Cristina Moraru 05824120e4 staging: iio: gyro: Remove explicit comparisons
Remove comparisons to 0 or NULL

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:32:09 -07:00
Cristina Moraru ac1640fbd8 staging: iio: trigger: Remove explicit comparisons
Remove comparisons to 0 or NULL

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:32:09 -07:00
Cristina Moraru 97deb1bc11 staging: iio: frequency: Remove explicit comparisons
Remove comparisons to 0 or NULL

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:32:09 -07:00
Cristina Moraru e6e65f97db staging: iio: cdc: Remove explicit comparisons
Remove comparisons to 0 or NULL

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:32:09 -07:00
Cristina Moraru eee587ea87 staging: iio: accel: Remove explicit comparisons
Remove comparisons to 0 or NULL

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:32:09 -07:00
Cristina Moraru 062f782b37 staging: iio: meter: Remove explicit comparisons
Remove comparisons to 0 or NULL

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:32:09 -07:00
Cristina Moraru d59b7b6834 staging: iio: light: Remove explicit comparisons
Remove comparisons to 0 or NULL

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:32:09 -07:00
Anton Tatuev 9efbbfada9 skein: fix coding style
Added spaces around binary operators.

Signed-off-by: Tatuev Anton <tatuev.a.a@yandex.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:30:12 -07:00
Burcin Akalin 78b9878797 staging: skein: Add space around '%'
Add space around operator '%'. Problem found using
checkpatch.pl
CHECK: spaces preferred around that '%' (ctx:VxV)

Signed-off-by: Burcin Akalin <brcnakalin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:30:12 -07:00
Burcin Akalin 9a28617fbc staging: octeon: Do not use multiple blank lines.
Remove multiple blank lines. Problem found using checkpatch.pl
"CHECK: Please don't use multiple blank lines".

Signed-off-by: Burcin Akalin <brcnakalin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:28:52 -07:00
Cristina Moraru 73eee567cb staging: octeon-usb: Replace kmalloc with kmalloc_array
Replace kmalloc with specialized function kmalloc_array
when the size is a multiplication of:
	number_of_elements * size_of_element

Signed-off-by: Cristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:28:52 -07:00
Muhammad Falak R Wani ffca44fb93 staging: octeon: Remove explicit NULL comparison
Remove the explicit NULL comparison and rewrite in a compact form.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:28:52 -07:00
Muhammad Falak R Wani 192b6a8475 staging: octeon: Remove explicit NULL comparison
Remove the explicit NULL comparison and rewrite in a compact form.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:28:52 -07:00
Luis de Bethencourt 4ef2de5ae0 staging: rtl8712: spaces preferred around operands
Clean up all instances of checkpatch.pl checks:
CHECK: spaces preferred around that '+'
(and other operands)

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:26:59 -07:00
Luis de Bethencourt 168a2c1028 staging: rtl8712: braces should be used on all arms
Fix all instances of the following checkpatch.pl check:
CHECK: braces {} should be used on all arms of this statement

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:26:59 -07:00
Luis de Bethencourt 1ca96884b1 staging: rtl8712: Remove boolean comparisons
Boolean tests do not need explicit comparison to true or false.

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:26:59 -07:00
Muhammad Falak R Wani cf31378ba7 staging: ion: Remove explicit NULL comparison
Rewrite explicit NULL comparison in its simpler form.
<smpl>
@NULL_REPLACE@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:26:59 -07:00
Luis de Bethencourt 7346489110 staging: rtl8188eu: fix misleading indentation
Code is correct, i needs to be moved back by 2 to correct for the last
iteration of the while loop, since READ_NEXT_PAIR advances two. Fixing
the misleading indentation.

Fix a smatch warning:
drivers/staging/rtl8188eu/hal/rf_cfg.c:217
rtl88e_phy_config_rf_with_headerfile() warn: curly braces intended?

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:25:13 -07:00
Anish Bhatt 9c68ed09fe rtl8188eu : BIT() macro cleanup
Use the BIT(x) macro directly instead using multiple
BITX defines.

Signed-off-by: Anish Bhatt <anish@gatech.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:25:13 -07:00
Mateusz Kulikowski b0dcce5fbf staging: rtl8192e: _rtl92e_fw_boot_cpu: Remove unneeded goto
Drop ugly label as no resource cleanup is needed.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski 91d7b8cf7c staging: rtl8192e: fw: Use netdev_dbg instead of RT_TRACE
Drop legacy logging system.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski 15d140664c staging: rtl8192e: Remove _rtl92e_fw_download_code()
Reuse  rtl92e_send_cmd_pkt() instead.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski f4c807d6d5 staging: rtl8192e: Swap firmware endian in _rtl92e_fw_prepare()
Remove endian swap from  _rtl92e_fw_download_code(),
this way it can be replaced with _rtl92e_send_cmd_pkt().

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski 09b1893831 staging: rtl8192e: Add _rtl92e_fw_prepare
Add function to request and prepare firmware image.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski 51dac5f095 staging: rtl8192e: Add _rtl92e_wait_for_fw()
Add function waiting for firmware load/boot;
Remove _rtl92e_is_fw_ready() that is obsolete (can be replaced
with  _rtl92e_wait_for_fw().

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski 58533b2217 staging: rtl8192e: init_fw: Drop unneded check
rst_opt is always equal to OPT_SYSTEM_RESET in this scope.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski 6167a6c88c staging: rtl8192e: Rename rt_firmware::firmware_status to status
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski 292f4b47ba staging: rtl8192e: Add rt_fw_blob
rt_fw_blob contains single firmware blob and its size.
Update firmware loading code accordingly.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski c0f6479165 staging: rtl8192e: cmd_pkt: Handle INIT packets
Add support for DESC_PACKET_TYPE_INIT to rtl92e_send_cmd_pkt().
With this generalization, _rtl92e_fw_download_code() may be removed
after slight modification.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski 1e7da09afd staging: rtl8192e: Use macro to represent fragmentation threshold
Add CMDPACKET_FRAG_SIZE macro and use it as fragmentation threshold
in send_cmd_pkt functions.
This makes rt_firmware::cmdpacket_frag_thresold and
 rtl92e_init_fw_param() obsolete.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski c008fa83c4 staging: rtl8192e: cmdpkt: Pass data as const void*
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski d15fe3e019 staging: rtl8192e: cmdpkt: Reorder arguments
Use send_cmd_pkt(dev, type, data , size) order to avoid confusion

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski 2e74c73c98 staging: rtl8192e: cmdpkt: Simplify argument names
Rename:
codevirtualaddress -> data
buffer_len -> len
packettype -> type

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski 1afacec663 staging: rtl8192e: cmdpkt: Use packettype properly
rtl92e_send_cmd_pkt used hardcoded NORMAL packet type.

As it may be used to send other packet types as well - use
provided packet type instead of defaults.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Mateusz Kulikowski 62d46eaac6 staging: rtl8192e: rtl_dm: Use proper packet type
rtl92e_send_cmd_packet sends only NORMAL packets, passing
invalid type (even it it's ignored) is confusing.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:23:13 -07:00
Navya Sri Nizamkari ba57f5fadb Staging: emxx_udc: Add space around operator.
Add a space around '>>' operator.
Problem found using checkpatch.

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Reviewed-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:21:05 -07:00
Luis de Bethencourt 5a602ac4d6 staging: emxx_udc: Remove boolean comparisons
Boolean tests do not need explicit comparison to true or false.

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:21:05 -07:00
Deepa Dinamani 6512edec48 staging: ft1000: remove obsolete driver
Remove support for Qleadtek Flash-OFDM modems. Telecom carrier is
discontinuing service for the radio technology.
See http://www.gtigroup.org/news/ind/2015-08-18/6996.html.

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:19:43 -07:00
H Hartley Sweeten eb96c7fc24 staging: comedi: adl_pci9118: tidy up pci9118_ai_setup_dma()
For aesthetics, init the dmalen[01] local variables when they are declared.

Use a local variable, 'scan_bytes', for the (devpriv->ai_n_realscanlen << 1)
calculation. For aesthetics and clarification, use comedi_bytes_per_sample()
instead of the '<< 1' shift to calculate the value.

The local variable 'i' is badly named. Remove it and use a local variable
'tmp' where it is used.

When checking the DMA buffer lengths for non-neverending commands the
scan length calculation, (devpriv->ai_n_realscanlen << 1) * cmd->stop_arg,
could overflow. Use and unsigned long long local variable to hold the
calculation and avoid the overflow.

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>
2015-10-24 19:17:13 -07:00
H Hartley Sweeten 45037a9569 staging: comedi: adl_pci9118: rename interrupt_*() functions
For aesthetics, rename these functions so it they namespace associated
with the driver.

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>
2015-10-24 19:17:13 -07:00
H Hartley Sweeten 5c912f1f28 staging: comedi: adl_pci9118: rename move_block_from_dma()
Rename this function so it has namespace associated with the driver.

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>
2015-10-24 19:17:13 -07:00