platform/kernel/linux-rpi.git
7 years agostaging: rtl8192e: Remove RX: IEEE802.1X EAPOL frame! warning.
Malcolm Priestley [Sat, 13 May 2017 16:41:17 +0000 (17:41 +0100)]
staging: rtl8192e: Remove RX: IEEE802.1X EAPOL frame! warning.

RX will receive countless EAPOL frames over the life of the connection.

A number of conditional calls to rtllib_is_eapol_frame are made in this function.

So this call serves no purpose other than to spam logs with false warning that
it is indeed a EAPOL frame, remove it.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: fsl-mc: Fix code alignment style issues
Brett Hitchcock [Sun, 14 May 2017 20:20:03 +0000 (13:20 -0700)]
staging: fsl-mc: Fix code alignment style issues

Fixing recommendation from checkpatch.pl:
"CHECK: Alignment should match open parenthesis"

Signed-off-by: Brett Hitchcock <bretth256@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8712: use octal permissions
Aleksey Kurbatov [Fri, 12 May 2017 18:23:16 +0000 (21:23 +0300)]
staging: rtl8712: use octal permissions

Using octal permissions instead of symbolic ones is preferred.

Signed-off-by: Aleksey Kurbatov <alkbt@yandex.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8192u: Fix type mismatch warnings reported by sparse
Suniel Mahesh [Fri, 12 May 2017 15:46:35 +0000 (21:16 +0530)]
staging: rtl8192u: Fix type mismatch warnings reported by sparse

Mk16_le() is an inline function returning le16_to_cpu()
which is causing type mismatch warnings. Removed Mk16_le() and
replaced it with le16_to_cpu() with appropriate argument type as
suggested by Greg K-H.

Signed-off-by: Suniel Mahesh <suniel.spartan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: rtl8192u: ieee80211: ieee80211_module.c: fix style issue
Riccardo Marotti [Fri, 12 May 2017 09:37:42 +0000 (11:37 +0200)]
Staging: rtl8192u: ieee80211: ieee80211_module.c: fix style issue

Fixed a brace coding style issue, found via checkpatch.

Signed-off-by: Riccardo Marotti <riccardo.marotti@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: vt6655: Add identifier names to function definition
Sucha Supittayapornpong [Fri, 12 May 2017 17:55:58 +0000 (10:55 -0700)]
staging: vt6655: Add identifier names to function definition

This patch fixes the checkpatch.pl warnings:

WARNING: function definition argument 'struct vnt_private *' should also have an identifier name
+void CARDvSetRSPINF(struct vnt_private *, u8);

Identifiers priv and bb_type, added to CARDvSetRSPINF definition,
are the names used in the function declaration.

Signed-off-by: Sucha Supittayapornpong <sucha.cpe@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wlan-ng: convert endianness in situ for prism2sta
Thibaut SAUTEREAU [Fri, 12 May 2017 09:39:25 +0000 (11:39 +0200)]
staging: wlan-ng: convert endianness in situ for prism2sta

Fix several sparse warnings about casts to restricted
little-endian by using in situ conversions.

Signed-off-by: Thibaut SAUTEREAU <thibaut.sautereau@telecom-sudparis.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wlan-ng: convert endianness in situ for prism2fw
Thibaut SAUTEREAU [Fri, 12 May 2017 09:37:54 +0000 (11:37 +0200)]
staging: wlan-ng: convert endianness in situ for prism2fw

Fix several sparse warnings about casts to restricted
little-endian.

Signed-off-by: Thibaut SAUTEREAU <thibaut.sautereau@telecom-sudparis.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: speakup: fix unnecessary long line
Michael Mera [Tue, 9 May 2017 23:48:11 +0000 (08:48 +0900)]
staging: speakup: fix unnecessary long line

Fix checkpatch message:
WARNING: line over 80 characters

Change "bit mask" for "bitmask" to have a line shorter than 80 characters.

Signed-off-by: Michael Mera <dev@michaelmera.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agodrivers/staging/speakup: Align block comments at *
Tiago Koji Castro Shibata [Tue, 2 May 2017 00:32:38 +0000 (21:32 -0300)]
drivers/staging/speakup: Align block comments at *

Fix checkpatch.pl "WARNING: Block comments should align the * on each line"

Signed-off-by: Tiago Koji Castro Shibata <tiago.shibata@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: speakup: make input functionality swappable
Okash Khawaja [Sat, 29 Apr 2017 19:52:58 +0000 (20:52 +0100)]
staging: speakup: make input functionality swappable

This moves functions which take input from external synth, into struct
spk_io_ops. The calling code then uses serial implementation of those methods
through spk_io_ops. That way we can add a parallel TTY-based implementation and
simply replace serial with TTY. That is what the next patch in this series does.

speakup_decext.c has get_last_char function which reads the most recent
available character from the synth. This patch changes that by defining
read_buff_add callback method of spk_syth and letting that update the last_char
global character read from the synth. read_buff_add is called from ISR, so
there is a possibility for last_char to be stale. Therefore it is marked as
volatile. It also pulls a repeated get_index implementation into synth.c, to
be used as a utility function.

Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8188eu, rtl8723bs: fix spelling mistake "Cancle" -> "Cancel"
Colin Ian King [Sat, 13 May 2017 22:23:40 +0000 (23:23 +0100)]
staging: rtl8188eu, rtl8723bs: fix spelling mistake "Cancle" -> "Cancel"

Trivial fix to spelling mistakes in a comments and RT_TRACE text.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: remove unused function argument
Arnd Bergmann [Sun, 14 May 2017 06:36:08 +0000 (09:36 +0300)]
staging: ccree: remove unused function argument

"gcc -Wunused" warns about one argument being assigned but not used:

drivers/staging/ccree/ssi_cipher.c: In function 'ssi_blkcipher_complete':
drivers/staging/ccree/ssi_cipher.c:747:41: error: parameter 'info' set but not used [-Werror=unused-but-set-parameter]

We can simply drop that argument here and in its callers.

Fixes: 302ef8ebb4b2 ("staging: ccree: add skcipher support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
[ gby: rebased patch on latest revision and chopped >80 chars long lines ]
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: Fix blank lines codestyle issue
Alexander Mazyrin [Sat, 13 May 2017 16:48:35 +0000 (19:48 +0300)]
staging: ccree: Fix blank lines codestyle issue

Checkpatch emits CHECK: Please don't use multiple blank lines.

Remove multiple blank lines.

Signed-off-by: Alexander Mazyrin <algoritmist1618@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: switch spaces to tabs
Connor Kelleher [Fri, 12 May 2017 19:10:25 +0000 (12:10 -0700)]
staging: ccree: switch spaces to tabs

ssi_fips.c:

fixing checkpatch.pl errors:

ERROR: code indent should use tabs where possible
+        int rc = 0;$

ERROR: code indent should use tabs where possible
+        int rc = 0;$

Signed-off-by: Connor Kelleher <connor.r.kelleher@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: most: dim2: replace function parameter with the expression
Andrey Shvetsov [Fri, 12 May 2017 11:00:01 +0000 (13:00 +0200)]
staging: most: dim2: replace function parameter with the expression

This replaces the function parameter sync_mfe with the expression
(ch_type == CAT_CT_VAL_SYNC) what is the same.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: most: dim2: enable flow control for isoc channels
Andrey Shvetsov [Fri, 12 May 2017 11:00:00 +0000 (13:00 +0200)]
staging: most: dim2: enable flow control for isoc channels

This patch enables the flow control feature for the isochronous channels
of the DIM2 macro.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: most: allocate private net_dev_context with the alloc_netdev
Andrey Shvetsov [Fri, 12 May 2017 10:59:58 +0000 (12:59 +0200)]
staging: most: allocate private net_dev_context with the alloc_netdev

This moves the allocation of the net_dev to the aim_probe_channel() and
uses the parameter sizeof_priv of the function alloc_netdev to reserve
the space for the struct net_dev_context.

As a side effect, the nd->dev always points to the existing net_dev.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: most: net: remove redundant cleanup code
Andrey Shvetsov [Fri, 12 May 2017 10:59:56 +0000 (12:59 +0200)]
staging: most: net: remove redundant cleanup code

This removes redundant cleanup code that is executed anyway when the
most_deregister_aim() is called.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: most: use unsafe version of list traversing
Andrey Shvetsov [Fri, 12 May 2017 10:59:55 +0000 (12:59 +0200)]
staging: most: use unsafe version of list traversing

The function get_net_dev_context does not remove elements of the list.
Hence, list traversing does not need to be secured.

This patch replaces list_for_each_entry_safe with the
list_for_each_entry.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: most: remove dependency on networking-aim
Andrey Shvetsov [Fri, 12 May 2017 10:59:54 +0000 (12:59 +0200)]
staging: most: remove dependency on networking-aim

The modules hdm-usb and hdm-dim2 depend on the module aim-network, because
they use the function most_deliver_netinfo that it exports.

To remove this dependency, this patch replaces the call of the function
most_deliver_netinfo with the call of the function that is the parameter
'on_netinfo' of the function request_netinfo.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: most: i2c: remove empty callback request_netinfo
Andrey Shvetsov [Fri, 12 May 2017 10:59:53 +0000 (12:59 +0200)]
staging: most: i2c: remove empty callback request_netinfo

Since the networking-aim checks the availability of the callback
request_netinfo, this patch removes the empty callback request_netinfo
from the i2c-hdm.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: most: check availability of the callback request_netinfo
Andrey Shvetsov [Fri, 12 May 2017 10:59:52 +0000 (12:59 +0200)]
staging: most: check availability of the callback request_netinfo

Since not all HDMs implement the callback request_netinfo, this patch
adds checking of its availability.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: most: net: add carrier information
Andrey Shvetsov [Fri, 12 May 2017 10:59:51 +0000 (12:59 +0200)]
staging: most: net: add carrier information

This adds the carrier information for the network devices based on the
INIC controllers.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: most: net: use dormant state
Andrey Shvetsov [Fri, 12 May 2017 10:59:50 +0000 (12:59 +0200)]
staging: most: net: use dormant state

This replaces the call of wait_for_completion in case of an invalid MAC
address in the function most_nd_open() with the dormant state of the
network device.

As a side effect, opening the network device cannot fail anymore.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: most: net: remove useless variable channels_opened
Andrey Shvetsov [Fri, 12 May 2017 10:59:49 +0000 (12:59 +0200)]
staging: most: net: remove useless variable channels_opened

The function most_nd_stop is only called by successful return from the
function most_nd_open, so the channels_opened is always true in the
function most_nd_stop.

The functions aim_resume_tx_channel and aim_rx_data are only called
after successful most_start_channel in the function most_nd_open, so the
channels_opened is always true in the functions aim_resume_tx_channel
and aim_rx_data.

Signed-off-by: Andrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8188eu: Put constant on right side of comparison
Aviv Palivoda [Mon, 15 May 2017 05:55:01 +0000 (08:55 +0300)]
staging: rtl8188eu: Put constant on right side of comparison

Constants should be on the right side of comparisons.

Issue found by checkpatch.pl script.

Signed-off-by: Aviv Palivoda <palaviv@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8723bs: checkpatch - fix typos in comments
Matthew Giassa [Fri, 12 May 2017 01:45:23 +0000 (18:45 -0700)]
staging: rtl8723bs: checkpatch - fix typos in comments

Resolving checkpatch issue:
CHECK: 'Regsiter' may be misspelled - perhaps 'Register'?
CHECK: 'Interrup' may be misspelled - perhaps 'Interrupt'?

All instances resolved.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8723bs: checkpatch - remove mixed spaces/hard-tabs
Matthew Giassa [Fri, 12 May 2017 01:45:22 +0000 (18:45 -0700)]
staging: rtl8723bs: checkpatch - remove mixed spaces/hard-tabs

Resolving checkpatch issue:
WARNING: please, no space before tabs

All instances resolved.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8723bs: checkpatch - remove multiple blank lines
Matthew Giassa [Fri, 12 May 2017 01:45:21 +0000 (18:45 -0700)]
staging: rtl8723bs: checkpatch - remove multiple blank lines

Resolving checkpatch issue:
CHECK: Please don't use multiple blank lines

All instances resolved.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wlan-ng: prism2mgmt.c: fixed a double endian conversion before calling hfa38...
Andrea della Porta [Sat, 29 Apr 2017 06:30:23 +0000 (07:30 +0100)]
staging: wlan-ng: prism2mgmt.c: fixed a double endian conversion before calling hfa384x_drvr_setconfig16, also fixes relative sparse warning

staging: wlan-ng: prism2mgmt.c: This patches fixes a double endian conversion.
cpu_to_le16() was called twice first in prism2mgmt_scan and again inside
hfa384x_drvr_setconfig16() for the same variable, hence it was swapped
twice. Incidentally, it also fixed the following sparse warning:

drivers/staging/wlan-ng/prism2mgmt.c:173:30: warning: incorrect type in assignment (different base types)
drivers/staging/wlan-ng/prism2mgmt.c:173:30:    expected unsigned short [unsigned] [usertype] word
drivers/staging/wlan-ng/prism2mgmt.c:173:30:    got restricted __le16 [usertype] <noident>

Unfortunately, only compile tested.

Signed-off-by: Andrea della Porta <sfaragnaus@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: octeon-usb: use correct function for hcd cleanup
Anton Bondarenko [Mon, 8 May 2017 23:33:15 +0000 (01:33 +0200)]
staging: octeon-usb: use correct function for hcd cleanup

Use usb_put_hdc to release hdc allocated by usb_create_hcd.
This is needed to handle sub-allocations and HCD sharing correctly.

Signed-off-by: Anton Bondarenko <anton.bondarenko.sama@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: rtl8712: ieee80211: fixed camelcase coding style issue
Jaya Durga [Sun, 7 May 2017 17:40:14 +0000 (23:10 +0530)]
Staging: rtl8712: ieee80211: fixed camelcase coding style issue

Fixed coding style issue

Signed-off-by: Jaya Durga <rjdurga@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ks7010: hostif, u32 data types to __le32
Tobin C. Harding [Mon, 8 May 2017 04:29:44 +0000 (14:29 +1000)]
staging: ks7010: hostif, u32 data types to __le32

Target device is little endian. Host interface data structures used
for building frames to pass to target device should use little endian
data types. All u32 structure members in ks_hostif.h need to be
changed to __le32.

Change all u16 data types in host interface structures to be
__le32.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ks7010: hostif, u16 data types to __le16
Tobin C. Harding [Mon, 8 May 2017 04:29:43 +0000 (14:29 +1000)]
staging: ks7010: hostif, u16 data types to __le16

Target device is little endian. Host interface data structures used
for building frames to pass to target device should use little endian
data types. All u16 structure members in ks_hostif.h need to be
changed to __le16, Sparse can then be used to make sure we update all
code that touches these data.

Change all u16 data types in host interface structures to be
__le16. Update all code that touches modified data types. Check using
Sparse.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ks7010: eap, change unsigned short to __be16
Tobin C. Harding [Mon, 8 May 2017 04:29:42 +0000 (14:29 +1000)]
staging: ks7010: eap, change unsigned short to __be16

Sparse emits warning: cast to restricted __be16. EAP header uses
network byte order. The structures used to describe it should use
__beXX data types.

Change data type unsigned short -> __be16.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: vt6656: rtxt.c Fix PARENTHESIS_ALIGNMENT type errors
Salvatore Benedetto [Sun, 7 May 2017 13:18:17 +0000 (14:18 +0100)]
staging: vt6656: rtxt.c Fix PARENTHESIS_ALIGNMENT type errors

Fix all PARENTHESIS_ALIGNMENT type errors reported by checkpatch
in rtxt.c

Signed-off-by: Salvatore Benedetto <salvatore.benedetto@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8188eu: core: removed comparison to NULL
Juliana Rodrigues [Wed, 10 May 2017 02:20:10 +0000 (23:20 -0300)]
staging: rtl8188eu: core: removed comparison to NULL

Removed comparison to NULL fixing checkpatch issues.

Signed-off-by: Juliana Rodrigues <juliana.orod@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: rtl8192u - changed include of asm/io.h
Derek Robson [Wed, 10 May 2017 02:29:17 +0000 (14:29 +1200)]
Staging: rtl8192u - changed include of asm/io.h

Changed include of <asm/io.h> to be <linux/io.h>
Complies, but I don't have hardware.
Found using checkpatch.

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: emxx_udc: Update "reserved" registers name
Alexis Lothoré [Wed, 10 May 2017 17:39:47 +0000 (19:39 +0200)]
staging: emxx_udc: Update "reserved" registers name

Ensure that "Reserved" members of registers mapping structure do not mix
upper/lower case

Signed-off-by: Alexis Lothoré <alexis.lothore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: emxx_udc: Break long lines
Alexis Lothoré [Wed, 10 May 2017 17:39:46 +0000 (19:39 +0200)]
staging: emxx_udc: Break long lines

Make sure to break long lines to 80

Signed-off-by: Alexis Lothoré <alexis.lothore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: emxx_udc: Update function parameters name
Alexis Lothoré [Wed, 10 May 2017 17:39:45 +0000 (19:39 +0200)]
staging: emxx_udc: Update function parameters name

Ensure that function parameters use snake_case (some mixed upper/lower case)

Signed-off-by: Alexis Lothoré <alexis.lothore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: emxx_udc: Update local variable names
Alexis Lothoré [Wed, 10 May 2017 17:39:44 +0000 (19:39 +0200)]
staging: emxx_udc: Update local variable names

Ensure that any any local variable use snake_case (many mixed upper/lower case)

Signed-off-by: Alexis Lothoré <alexis.lothore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: emxx_udc: Update function names
Alexis Lothoré [Wed, 10 May 2017 17:39:43 +0000 (19:39 +0200)]
staging: emxx_udc: Update function names

Ensure that function names does not mix upper/lower case

Signed-off-by: Alexis Lothoré <alexis.lothore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: emxx_udc: Balance "else" parenthesis
Alexis Lothoré [Wed, 10 May 2017 17:39:42 +0000 (19:39 +0200)]
staging: emxx_udc: Balance "else" parenthesis

Add missing parenthesis for else statement

Signed-off-by: Alexis Lothoré <alexis.lothore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: emxx_udc: Update EPn variables name
Alexis Lothoré [Wed, 10 May 2017 17:39:41 +0000 (19:39 +0200)]
staging: emxx_udc: Update EPn variables name

Update EPn* variables names to EPN* to prevent CamelCase usage

Signed-off-by: Alexis Lothoré <alexis.lothore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: Fix indentation of driver_hash[] initializers
Geert Uytterhoeven [Thu, 11 May 2017 07:38:19 +0000 (09:38 +0200)]
staging: ccree: Fix indentation of driver_hash[] initializers

Closing braces should match the first characters of the openings.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: fix checkpatch errors in macro def
Gilad Ben-Yossef [Sun, 7 May 2017 13:36:03 +0000 (16:36 +0300)]
staging: ccree: fix checkpatch errors in macro def

Fix various checkpatch warnings and errors in LLI macro definitions

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: drop __KERNEL__ include guard
Gilad Ben-Yossef [Sun, 7 May 2017 13:36:02 +0000 (16:36 +0300)]
staging: ccree: drop __KERNEL__ include guard

Drop uneeded include guard for __KERNEL__.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostating: ccree: remove double definition of MSB64
Gilad Ben-Yossef [Sun, 7 May 2017 13:36:01 +0000 (16:36 +0300)]
stating: ccree: remove double definition of MSB64

The MSB64 is defined in two include file. One copy
is sufficient.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: fix cc_lli_defs.h white space
Gilad Ben-Yossef [Sun, 7 May 2017 13:36:00 +0000 (16:36 +0300)]
staging: ccree: fix cc_lli_defs.h white space

Fix checkpatch reported white space style violations
in cc_lli_defs.h

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: fix white space style errors
Gilad Ben-Yossef [Sun, 7 May 2017 13:35:59 +0000 (16:35 +0300)]
staging: ccree: fix white space style errors

Fix checkpatch reported white space style violations
in cc_hw_queue_defs.h

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: fix enum/struct definitions style
Gilad Ben-Yossef [Sun, 7 May 2017 13:35:58 +0000 (16:35 +0300)]
staging: ccree: fix enum/struct definitions style

Fix enum and struct definition coding style by removing uneeded typedef and
s/CamelCase/snake_case/g.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: drop open coded init for memset
Gilad Ben-Yossef [Sun, 7 May 2017 13:35:57 +0000 (16:35 +0300)]
staging: ccree: drop open coded init for memset

Replace open coded struct zeroing with a memset call.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: remove min/max macros
Gilad Ben-Yossef [Sun, 7 May 2017 13:35:56 +0000 (16:35 +0300)]
staging: ccree: remove min/max macros

Remove useless and wrong min/max macros.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: stdint to kernel types conversion
Gilad Ben-Yossef [Sun, 7 May 2017 13:35:55 +0000 (16:35 +0300)]
staging: ccree: stdint to kernel types conversion

Move from stdint style int_t/uint_t to kernel style u/s types.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ccree: remove unused code
Gilad Ben-Yossef [Sun, 7 May 2017 13:35:54 +0000 (16:35 +0300)]
staging: ccree: remove unused code

Remove a bunch of cruft being used in HW debugging but not useful
or compiled for driver use or development.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: remove unnecessary braces
Thibaut Robert [Tue, 9 May 2017 19:46:50 +0000 (21:46 +0200)]
staging: lustre: remove unnecessary braces

This patch fixes checkpatch warnings: "WARNING: braces {} are not
necessary for single statement blocks" and "WARNING: braces {} are not
necessary for any arm of this statement".

Signed-off-by: Thibaut Robert <thibaut.robert@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: lustre: ptlrpc: remove unnecessary code
Gustavo A. R. Silva [Thu, 11 May 2017 04:27:40 +0000 (23:27 -0500)]
staging: lustre: ptlrpc: remove unnecessary code

offset is an unsigned variable and, greater-than-or-equal-to-zero
comparison of an unsigned variable is always true.

Addresses-Coverity-ID: 1373919
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: android: ion: Resolve minor indentation issue.
Matthew Giassa [Wed, 10 May 2017 02:17:27 +0000 (19:17 -0700)]
staging: android: ion: Resolve minor indentation issue.

Resolving a minor checkpatch/indentation issue in ion_carveout_heap.c,
ie:
drivers/staging/android/ion/ion_carveout_heap.c
-----------------------------------------------
CHECK: Alignment should match open parenthesis
+static phys_addr_t ion_carveout_allocate(struct ion_heap *heap,
+      unsigned long size)

Signed-off-by: Matthew Giassa <matthew@giassa.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: greybus: power_supply: replace kzalloc by kcalloc
JB Van Puyvelde [Thu, 11 May 2017 20:58:56 +0000 (22:58 +0200)]
staging: greybus: power_supply: replace kzalloc by kcalloc

According to checkpatch.pl, kcalloc should be preferred to kzalloc with
multiply.

Signed-off-by: JB Van Puyvelde <jbvanpuyvelde@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: greybus: light: Prefer kcalloc over kzalloc
Karthik Tummala [Mon, 8 May 2017 12:35:55 +0000 (18:05 +0530)]
Staging: greybus: light: Prefer kcalloc over kzalloc

Fixed following checkpatch.pl warning:
 * WARNING: Prefer kcalloc over kzalloc with multiply

Instead of specifying no.of bytes * size as argument
in kzalloc, prefer kcalloc.

Signed-off-by: Karthik Tummala <karthik@techveda.org>
Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Changes for v2:
- Changed subject line & fixed typo as suggested by
  Rui Miguel Silva
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: fbtft: Fix unbalanced braces around else statement
Laurence Rochfort [Mon, 8 May 2017 11:03:10 +0000 (12:03 +0100)]
Staging: fbtft: Fix unbalanced braces around else statement

Balance if/else braces as recommended by checkpatch.pl

Signed-off-by: Laurence Rochfort <laurence.rochfort@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging:r8188eu: remove unused definitions from include/ieee80211.h
Ivan Safonov [Tue, 2 May 2017 06:01:45 +0000 (09:01 +0300)]
staging:r8188eu: remove unused definitions from include/ieee80211.h

Remove unused RTW_IEEE80211_FCTL_*, RTW_IEEE80211_FTYPE_*,
RTW_IEEE80211_STYPE_*, IEEE80211_STATMASK_*, IEEE80211_DEFAULT_*,
BEACON_PROBE_SSID_ID_POSITION, MFIE_TYPE_*, IEEE80211_DTIM_*
and IEEE80211_PS_*.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging:r8188eu: remove ieee80211_is_empty_essid()
Ivan Safonov [Tue, 2 May 2017 06:01:44 +0000 (09:01 +0300)]
staging:r8188eu: remove ieee80211_is_empty_essid()

ieee80211_is_empty_essid() is unused, remove it.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging:r8188eu: remove ieee80211_get_hdrlen()
Ivan Safonov [Tue, 2 May 2017 06:01:43 +0000 (09:01 +0300)]
staging:r8188eu: remove ieee80211_get_hdrlen()

ieee80211_get_hdrlen is unused, remove it and all corresponding code.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging:r8188eu: trim IV/ICV fields in validate_recv_data_frame()
Ivan Safonov [Tue, 2 May 2017 06:01:42 +0000 (09:01 +0300)]
staging:r8188eu: trim IV/ICV fields in validate_recv_data_frame()

Length of IV/ICV fields calculated here, so trim these field here too.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging:r8188eu: inline unprotect_frame() in mon_recv_decrypted_recv()
Ivan Safonov [Tue, 2 May 2017 06:01:41 +0000 (09:01 +0300)]
staging:r8188eu: inline unprotect_frame() in mon_recv_decrypted_recv()

It is useful to remove IV/ICV from rtl88eu_mon_recv_hook().
Also unprotect_frame() will be very short without skb_(pull|trim).

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging:r8188eu: use different mon_recv_decrypted() inside rtl88eu_mon_recv_hook...
Ivan Safonov [Tue, 2 May 2017 06:01:40 +0000 (09:01 +0300)]
staging:r8188eu: use different mon_recv_decrypted() inside rtl88eu_mon_recv_hook() and rtl88eu_mon_xmit_hook().

Create mon_recv_decrypted_recv() to change rtl88eu_mon_recv_hook()
without affect to rtl88eu_mon_xmit_hook().

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging:r8188eu: move IV/ICV trimming into decrypt() and also place it after rtl88eu_...
Ivan Safonov [Tue, 2 May 2017 06:01:39 +0000 (09:01 +0300)]
staging:r8188eu: move IV/ICV trimming into decrypt() and also place it after rtl88eu_mon_recv_hook()

IV/ICV should be trimmed immediately after decoding
(this is a decryptor job).

Trim IV/ICV inside decrypt() for SW decrypted frames,
for HW decrypted - before rtl88eu_mon_recv_hook().

Adopt frames receive process to work without IV/ICV fields.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ks7010: avoid CamelCase: reqIEs_size and respIEs_size
Janusz Lisiecki [Sat, 29 Apr 2017 20:58:47 +0000 (22:58 +0200)]
staging: ks7010: avoid CamelCase: reqIEs_size and respIEs_size

Replace CamelCase association_request_t and association_response_t
struct field names with underscores to comply with the standard kernel
coding style.

Signed-off-by: Janusz Lisiecki <janusz.lisiecki@gmail.com>
Reviewed-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ks7010: avoid CamelCase: atimWindow
Janusz Lisiecki [Sat, 29 Apr 2017 20:58:46 +0000 (22:58 +0200)]
staging: ks7010: avoid CamelCase: atimWindow

Replace CamelCase variable name with underscores to comply
with the standard kernel coding style.

Signed-off-by: Janusz Lisiecki <janusz.lisiecki@gmail.com>
Reviewed-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ks7010: avoid CamelCase: CfParms_t fields
Janusz Lisiecki [Sat, 29 Apr 2017 20:58:45 +0000 (22:58 +0200)]
staging: ks7010: avoid CamelCase: CfParms_t fields

Replace CamelCase struct field names with underscores to comply
with the standard kernel coding style.
Changed:
- maxDuration
- durRemaining

Signed-off-by: Janusz Lisiecki <janusz.lisiecki@gmail.com>
Reviewed-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ks7010: avoid CamelCase: link_ap_info_t fields
Janusz Lisiecki [Sat, 29 Apr 2017 20:58:44 +0000 (22:58 +0200)]
staging: ks7010: avoid CamelCase: link_ap_info_t fields

Replace CamelCase struct field names with underscores to comply
with the standard kernel coding style.
Changed:
- FhParms_t
- DsParms_t
- CfParms_t
- IbssParms_t
- ErpParams_t

Signed-off-by: Janusz Lisiecki <janusz.lisiecki@gmail.com>
Reviewed-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ks7010: avoid CamelCase: FhParms_t fields
Janusz Lisiecki [Sat, 29 Apr 2017 20:58:43 +0000 (22:58 +0200)]
staging: ks7010: avoid CamelCase: FhParms_t fields

Replace CamelCase struct field names with underscores to comply
with the standard kernel coding style.
Changed:
- dwellTime
- hopSet
- hopPattern
- hopIndex

Signed-off-by: Janusz Lisiecki <janusz.lisiecki@gmail.com>
Reviewed-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ks7010: avoid CamelCase in fields of struct local_gain_t
Janusz Lisiecki [Sat, 29 Apr 2017 20:58:41 +0000 (22:58 +0200)]
staging: ks7010: avoid CamelCase in fields of struct local_gain_t

Replace CamelCase fields of struct with underscores to comply
with the standard kernel coding style

Signed-off-by: Janusz Lisiecki <janusz.lisiecki@gmail.com>
Reviewed-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging/ks7010: Fix type assignment for struct hostif_hdr
Cezary Gapinski [Sat, 29 Apr 2017 17:54:30 +0000 (19:54 +0200)]
staging/ks7010: Fix type assignment for struct hostif_hdr

Sparse spits out a warnings about __le16 and unsigned short assignment.
Change the type of size and event members of struct hostif_hdr
to __le16 and correct conversion to the proper cpu type.

Signed-off-by: Cezary Gapinski <gapalinux@gmail.com>
Reviewed-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: vt6656: Only call vnt_set_bss_mode on basic rates change.
Malcolm Priestley [Sat, 29 Apr 2017 12:03:45 +0000 (13:03 +0100)]
staging: vt6656: Only call vnt_set_bss_mode on basic rates change.

To ensure the bss is always synchronized only call on basic rate
change.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: vt6556: vnt_start Fix missing call to vnt_key_init_table.
Malcolm Priestley [Sat, 29 Apr 2017 12:03:44 +0000 (13:03 +0100)]
staging: vt6556: vnt_start Fix missing call to vnt_key_init_table.

The key table is not intialized correctly without this call.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Cc: <stable@vger.kernel.org> # v3.17+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: vt6656: always call vnt_update_ifs on short time change.
Malcolm Priestley [Sat, 29 Apr 2017 12:03:43 +0000 (13:03 +0100)]
staging: vt6656: always call vnt_update_ifs on short time change.

short time change needs to synchronize parameters in vnt_update_ifs so
a call to the function is always necessary.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: vt6656: vnt_update_ifs set max_min based on short slot time.
Malcolm Priestley [Sat, 29 Apr 2017 12:03:42 +0000 (13:03 +0100)]
staging: vt6656: vnt_update_ifs set max_min based on short slot time.

Short slot time is controlled by mac80211 so there is no need to find
odfm rates.

Merge PK_TYPE_11B and PK_TYPE_11GA & PK_TYPE_11GB into one else and
switch on short slot time.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wilc1000: Fixing struct definition layout
Vincent Siles [Tue, 2 May 2017 14:18:43 +0000 (16:18 +0200)]
staging: wilc1000: Fixing struct definition layout

Split struct definition across multiple line to fit in the 80 characters
limit

Signed-off-by: Vincent Siles <vincent.siles@provenrun.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wilc1000: Function calls too long
Vincent Siles [Tue, 2 May 2017 14:18:42 +0000 (16:18 +0200)]
staging: wilc1000: Function calls too long

Splitting function calls across multiple lines to fit in the 80
characters limit

Signed-off-by: Vincent Siles <vincent.siles@provenrun.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wilc1000: Function signature too long
Vincent Siles [Tue, 2 May 2017 14:18:41 +0000 (16:18 +0200)]
staging: wilc1000: Function signature too long

Splitting functions signature across several lines to fin in the
80 characters limit

Signed-off-by: Vincent Siles <vincent.siles@provenrun.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wilc1000: Stripping '-' comments
Vincent Siles [Tue, 2 May 2017 14:18:40 +0000 (16:18 +0200)]
staging: wilc1000: Stripping '-' comments

Removing some '-' comments to fit in the 80 characters limit

Signed-off-by: Vincent Siles <vincent.siles@provenrun.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wilc1000: Last line is empty
Vincent Siles [Tue, 2 May 2017 14:18:39 +0000 (16:18 +0200)]
staging: wilc1000: Last line is empty

Removing empty line at the end of the file

Signed-off-by: Vincent Siles <vincent.siles@provenrun.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: wilc1000: Refactor handling of HT caps fields
Jason Litzinger [Sat, 29 Apr 2017 13:46:47 +0000 (07:46 -0600)]
staging: wilc1000: Refactor handling of HT caps fields

This addresses the following sparse warnings:

drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2006:51: warning: incorrect type in assignment (different base types)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2006:51:    expected unsigned short [unsigned] [assigned] [usertype] ht_capa_info
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2006:51:    got restricted __le16 const [usertype] cap_info
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2011:52: warning: incorrect type in assignment (different base types)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2011:52:    expected unsigned short [unsigned] [assigned] [usertype] ht_ext_params
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2011:52:    got restricted __le16 const [usertype] extended_ht_cap_info
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2012:51: warning: incorrect type in assignment (different base types)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2012:51:    expected unsigned int [unsigned] [assigned] [usertype] ht_tx_bf_cap
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2012:51:    got restricted __le32 const [usertype] tx_BF_cap_info
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2078:51: warning: incorrect type in assignment (different base types)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2078:51:    expected unsigned short [unsigned] [assigned] [usertype] ht_capa_info
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2078:51:    got restricted __le16 const [usertype] cap_info
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2083:52: warning: incorrect type in assignment (different base types)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2083:52:    expected unsigned short [unsigned] [assigned] [usertype] ht_ext_params
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2083:52:    got restricted __le16 const [usertype] extended_ht_cap_info
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2084:51: warning: incorrect type in assignment (different base types)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2084:51:    expected unsigned int [unsigned] [assigned] [usertype] ht_tx_bf_cap
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2084:51:    got restricted __le32 const [usertype] tx_BF_cap_info

This is not the first attempt to address this problem:
    https://lkml.org/lkml/2017/3/7/808

First, the current code works because the final use of the
ht_capa values (in host_interface.c: WILC_HostIf_PackStaParam) packs them
into a buffer in little-endian format. Since this matches the byte-order of
struct ieee80211_ht_cap, all is seemingly well.

What the current code does not do, and what these warnings expose, is
clearly communicate what the fields in struct add_sta_param
represent -- values with a specific (little endian) byte order.
This will lead to problems if the values are ever actually used by the
host, and that host is not little endian.

The proposed change addresses this by embedding a
struct ieee80211_ht_cap into struct add_sta_param.  When the values
are later packed out, the newly embedded struct is copied directly
into the outbound buffer.  All 16 and 32 bit types are treated as
little endian and marked as such.  Future use of the values by the
host would still require conversion, or sparse would flag them again.

The following items are required for this to be correct:
    1.  The data is not currently used by the host.
    2.  struct ieee80211_ht_cap is packed.
    3.  The packing of the fields matches the order in
        struct ieee80211_ht_cap.

This is similar, I believe, to how the same data is handled in
marvell/mwifiex/11n.c.

Test-compiled/loaded against staging-next on x86_64
Test-compiled against staging-next for ARM.
Applied/built against staging-testing.

Testing consists of compilation for the above trees/targets, and a
sparse check, no functional testing.

Signed-off-by: Jason Litzinger <jlitzingerdev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: octeon: use __func__ instead of func name
Craig Kewley [Mon, 1 May 2017 20:22:35 +0000 (21:22 +0100)]
staging: octeon: use __func__ instead of func name

Fix checkpatch warning:
WARNING: Prefer using '"%s...", __func__' to using 'INTERFACE'

Signed-off-by: Craig Kewley <craigkewley@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: unisys: Solve sparse warning
Marcos Paulo de Souza [Wed, 3 May 2017 03:28:10 +0000 (00:28 -0300)]
staging: unisys: Solve sparse warning

The following commit fixes the following sparse report:

drivers/staging//unisys/visorhba/visorhba_main.c:660:29: warning: cast to restricted __le64

by casting readq (which is unsigned long on x86) to u64, as expected by the seq_printf call.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Acked-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8723bs: Do not use assignment in if condition
Justin Vreeland [Tue, 2 May 2017 00:52:54 +0000 (18:52 -0600)]
staging: rtl8723bs: Do not use assignment in if condition

Ensure checkpatch compliance

Signed-off-by: Justin Vreeland <justin@jvreeland.com>
Reviewed-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8723bs: Fix spacing around '<'
Justin Vreeland [Tue, 2 May 2017 00:52:53 +0000 (18:52 -0600)]
staging: rtl8723bs: Fix spacing around '<'

Ensure checkpatch compliance

Signed-off-by: Justin Vreeland <justin@jvreeland.com>
Reviewed-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8723bs: Fix pointer style
Justin Vreeland [Tue, 2 May 2017 00:52:52 +0000 (18:52 -0600)]
staging: rtl8723bs: Fix pointer style

Fix "(foo*)" should be "(foo *)"
Fix "foo * bar" should be "foo *bar"

Signed-off-by: Justin Vreeland <justin@jvreeland.com>
Reviewed-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8723bs: Move braces to same line as conditional
Justin Vreeland [Tue, 2 May 2017 00:52:51 +0000 (18:52 -0600)]
staging: rtl8723bs: Move braces to same line as conditional

Ensure checkpatch compliance

Signed-off-by: Justin Vreeland <justin@jvreeland.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8723bs: Macros with complex values should be enclosed in parentheses
Justin Vreeland [Tue, 2 May 2017 00:52:50 +0000 (18:52 -0600)]
staging: rtl8723bs: Macros with complex values should be enclosed in parentheses

Enclosing macros with complex values ensures expression is evaluated as
expected.

Signed-off-by: Justin Vreeland <justin@jvreeland.com>
Reviewed-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8723bs: Wrap multi-line macros in do-while loop
Justin Vreeland [Tue, 2 May 2017 00:52:49 +0000 (18:52 -0600)]
staging: rtl8723bs: Wrap multi-line macros in do-while loop

Wrapping in do-while ensures macros are executed as expected.

Signed-off-by: Justin Vreeland <justin@jvreeland.com>
Reviewed-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8723bs: Fix initialization of static variables
Justin Vreeland [Tue, 2 May 2017 00:52:48 +0000 (18:52 -0600)]
staging: rtl8723bs: Fix initialization of static variables

Do not initialize static to 0
Do not initialize static to false

Signed-off-by: Justin Vreeland <justin@jvreeland.com>
Reviewed-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: rtl8712: ieee80211: fixed brace coding style issue
Jaya Durga [Fri, 5 May 2017 04:41:54 +0000 (10:11 +0530)]
Staging: rtl8712: ieee80211: fixed brace coding style issue

Fixed coding style issue

Signed-off-by: Jaya Durga <rjdurga@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8723bs: Fix coding style issues
Adheer Chandravanshi [Wed, 3 May 2017 02:07:52 +0000 (07:37 +0530)]
staging: rtl8723bs: Fix coding style issues

checkpatch.pl reported errors for use of extra whitespaces
in the function prototypes.

Removed extra spaces to meet the coding standards.

Signed-off-by: Adheer Chandravanshi <adheerchandravanshi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8723bs: Fix checkpatch space errors in os_dep/sdio_ops_linux.c
Bingyu Zhou [Sat, 29 Apr 2017 08:19:33 +0000 (16:19 +0800)]
staging: rtl8723bs: Fix checkpatch space errors in os_dep/sdio_ops_linux.c

Detected the follow errors by checkpatch.pl -f

ERROR: spaces required around that '<'
ERROR: space required after that ';'

Signed-off-by: Bingyu Zhou <rain.by.zhou@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: android: ion: Align with open parenthesis
Richard Porter [Wed, 3 May 2017 12:47:14 +0000 (13:47 +0100)]
staging: android: ion: Align with open parenthesis

Fix checkpatch.pl warning:

CHECK: Alignment should match open parenthesis
+ fd = ion_alloc(data.allocation.len,
+ data.allocation.heap_id_mask,

Signed-off-by: Richard Porter <dick@acm.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>