GitHub/moto-9609/android_kernel_motorola_exynos9610.git
7 years agostaging: greybus: mark PM functions as __maybe_unused
Arnd Bergmann [Thu, 18 May 2017 13:28:00 +0000 (15:28 +0200)]
staging: greybus: mark PM functions as __maybe_unused

Enabling the arche platform for compile testing showed a harmless
warning with CONFIG_PM=n:

drivers/staging/greybus/arche-platform.c:632:12: error: 'arche_platform_resume' defined but not used [-Werror=unused-function]
drivers/staging/greybus/arche-platform.c:618:12: error: 'arche_platform_suspend' defined but not used [-Werror=unused-function]

This marks the functions as __maybe_unused to shut up the warnings.

Fixes: 2eccd4aa19fc ("staging: greybus: enable compile testing of arche driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: android: ion: Avoid calling free_duped_table() twice
Archit Taneja [Wed, 17 May 2017 08:15:48 +0000 (13:45 +0530)]
staging: android: ion: Avoid calling free_duped_table() twice

Currently, the duplicated sg table is freed in the detach() and
the error path of map_dma_buf() ion's dma_buf_ops.

If a call to dma_buf_map_attachment() fails, the importer is
expected to call dma_buf_detach() to remove the attachment. This
will result in us trying to free the duped sg table twice.

Don't call free_duped_table() in ion_map_dma_buf() to avoid this.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Acked-by: Laura Abbott <labbott@redhat.com>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: android: ion: Remove ION_FLAG_CACHED_NEEDS_SYNC
Archit Taneja [Wed, 17 May 2017 08:15:47 +0000 (13:45 +0530)]
staging: android: ion: Remove ION_FLAG_CACHED_NEEDS_SYNC

The flag ION_FLAG_CACHED_NEEDS_SYNC isn't used anymore. Remove it.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: android: ion: Remove unused members from ion_buffer
Archit Taneja [Wed, 17 May 2017 08:15:46 +0000 (13:45 +0530)]
staging: android: ion: Remove unused members from ion_buffer

A few members in ion_buffer struct are unused after features
like page faulting, ion_handle and ion_client were removed.
Remove these members and the leftover references to them.

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ks7010: avoid CamelCase: receiveDTIMs
Janusz Lisiecki [Tue, 16 May 2017 15:34:57 +0000 (17:34 +0200)]
staging: ks7010: avoid CamelCase: receiveDTIMs

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

Signed-off-by: Janusz Lisiecki <janusz.lisiecki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: vt6656: remove unnecesary blank lines
Juan Manuel Torres Palma [Tue, 16 May 2017 12:39:55 +0000 (21:39 +0900)]
staging: vt6656: remove unnecesary blank lines

Fix style in rxtx.c, removing extra empty blank lines.

Signed-off-by: Juan Manuel Torres Palma <j.m.torrespalma@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: vt6656: remove multiple assignments
Juan Manuel Torres Palma [Tue, 16 May 2017 12:39:54 +0000 (21:39 +0900)]
staging: vt6656: remove multiple assignments

Fix style in rxtx.c, breaking all multiple assignments in different
lines.

Signed-off-by: Juan Manuel Torres Palma <j.m.torrespalma@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: sm750fb: fix length of lines, function calls and declaration
Matej Dujava [Tue, 16 May 2017 09:20:17 +0000 (11:20 +0200)]
staging: sm750fb: fix length of lines, function calls and declaration

This patch breaks lines that are longer than 80 characters and joins
together those, that are too short and can be placed at one.

Function calls and declarations are updated to fit kernel code style.

Signed-off-by: Matej Dujava <mdujava@kocurkovo.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: speakup: flush tty buffers and ensure hardware flow control
Okash Khawaja [Mon, 15 May 2017 17:45:37 +0000 (18:45 +0100)]
staging: speakup: flush tty buffers and ensure hardware flow control

This patch fixes the issue where TTY-migrated synths would take a while
to shut up after hitting numpad enter key. When calling synth_flush,
even though XOFF character is sent as high priority, data buffered in
TTY layer is still sent to the synth. This patch flushes that buffered
data when synth_flush is called.

It also tries to ensure that hardware flow control is enabled, by
setting CRTSCTS using tty's termios.

Reported-by: John Covici <covici@ccs.covici.com>
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: speakup: migrate apollo, ltlk, audptr, decext, dectlk and spkout
Okash Khawaja [Mon, 15 May 2017 17:45:36 +0000 (18:45 +0100)]
staging: speakup: migrate apollo, ltlk, audptr, decext, dectlk and spkout

This patch simply uses the changes introduced in previous patches and migrates
apollo, ltlk, audptr, decext, spkout and dectlk. Migrations are straightforward
function pointer updates.

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: speakup: add send_xchar, tiocmset and input functionality for tty
Okash Khawaja [Mon, 15 May 2017 17:45:35 +0000 (18:45 +0100)]
staging: speakup: add send_xchar, tiocmset and input functionality for tty

This patch adds further TTY-based functionality, specifically implementation
of send_xchar and tiocmset methods, and input. send_xchar and tiocmset
methods simply delegate to corresponding TTY operations.

For input, it implements the receive_buf2 callback in tty_ldisc_ops of
speakup's ldisc. If a synth defines read_buff_add method then receive_buf2
simply delegates to that and returns.

For spk_ttyio_in, the data is passed from receive_buf2 thread to
spk_ttyio_in thread through spk_ldisc_data structure. It has following
members:

- char buf: represents data received
- struct semaphore sem: used to signal to spk_ttyio_in thread that data
is available to be read without having to busy wait
- bool buf_free: this is used in comination with mb() calls to syncronise
the two threads over buf

receive_buf2 only writes to buf if buf_free is true. The check for buf_free
and writing to buf are separated by mb() to ensure that spk_ttyio_in has read
buf before receive_buf2 writes to it. After writing, it ups the semaphore to
signal to spk_ttyio_in that there is now data to read.

spk_ttyio_in waits for data to read by downing the semaphore. Thus when
signalled by receive_buf2 thread above, it reads from buf and sets buf_free
to true. These two operations are separated by mb() to ensure that
receive_buf2 thread finds buf_free to be true only after buf has been read.
After that spk_ttyio_in calls tty_schedule_flip for subsequent data to come
in through receive_buf2.

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: speakup: migrate acntsa, bns, dummy and txprt to ttyio
Okash Khawaja [Mon, 15 May 2017 17:45:34 +0000 (18:45 +0100)]
staging: speakup: migrate acntsa, bns, dummy and txprt to ttyio

This changes the above five synths to TTY-based comms. They were chosen as a
first pass because their serial comms are straightforward, i.e. they don't use
serial input and don't do internal port knocking.

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: speakup: add tty-based comms functions
Okash Khawaja [Mon, 15 May 2017 17:45:33 +0000 (18:45 +0100)]
staging: speakup: add tty-based comms functions

This adds spk_ttyio.c file. It contains a set of functions which implement
those methods in spk_synth struct which relate to sending bytes out using
serial comms. Implementations in this file perform the same function but
using TTY subsystem instead. Currently synths access serial ports, directly
poking standard ISA ports by trying to steal them from serial driver. Some ISA
cards actually need this way of doing it, but most other synthesizers don't,
and can actually work by using the proper TTY subsystem through a new N_SPEAKUP
line discipline. So this adds the methods for drivers to switch to accessing
serial ports through the TTY subsystem, whenever appropriate.

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 agotty: export tty_open_by_driver
Okash Khawaja [Mon, 15 May 2017 17:45:32 +0000 (18:45 +0100)]
tty: export tty_open_by_driver

This exports tty_open_by_driver so that it can be called from other
places inside the kernel. The checks for null file pointer are based on
Alan Cox's patch here:
http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1215095.html.
Description below is quoted from it:

"[RFC] tty_port: allow a port to be opened with a tty that has no file handle

    Let us create tty objects entirely in kernel space. Untested proposal to
    show why all the ideas around rewriting half the uart stack are not needed.

    With this a kernel created non file backed tty object could be used to handle
    data, and set terminal modes. Not all ldiscs can cope with this as N_TTY in
    particular has to work back to the fs/tty layer.

    The tty_port code is however otherwise clean of file handles as far as I can
    tell as is the low level tty port write path used by the ldisc, the
    configuration low level interfaces and most of the ldiscs.

    Currently you don't have any exposure to see tty hangups because those are
    built around the file layer. However a) it's a fixed port so you probably
    don't care about that b) if you do we can add a callback and c) you almost
    certainly don't want the userspace tear down/rebuild behaviour anyway.

    This should however be sufficient if we wanted for example to enumerate all
    the bluetooth bound fixed ports via ACPI and make them directly available.

    It doesn't deal with the case of a user opening a port that's also kernel
    opened and that would need some locking out (so it returned EBUSY if bound
    to a kernel device of some kind). That needs resolving along with how you
    "up" or "down" your new bluetooth device, or enumerate it while providing
    the existing tty API to avoid regressions (and to debug)."

The exported funtion is used later in this patch set to gain access to tty_struct.

[changed export symbol level - gkh]

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: fbtft: fix sparse warning
Jandy Gou [Tue, 16 May 2017 08:28:09 +0000 (16:28 +0800)]
staging: fbtft: fix sparse warning

fix the following sparse warning:
 drivers/staging/fbtft/fbtft-io.c:74:29: warning: incorrect type in assignment
 (different base types) drivers/staging/fbtft/fbtft-io.c:74:29:    expected
 unsigned long long [unsigned] [long] [long long] [usertype] <noident>
 drivers/staging/fbtft/fbtft-io.c:74:29:    got restricted __be64 [usertype]
 <noident>

Signed-off-by: Jandy Gou <gouqingsong@goodix.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agodrivers/staging: refactor dgnc tty registration.
Haim Daniel [Mon, 15 May 2017 14:10:18 +0000 (17:10 +0300)]
drivers/staging: refactor dgnc tty registration.

-remove duplicate tty allocation code for serial and printer drivers.
-add missing tty c_ispeed and c_ospeed initialization to 9600.
-fix sparse warning: too long initializer-string for array of char.

This patch was only unit tested due to lack of the actual hardware.

Signed-off-by: Haim Daniel <haimdaniel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8188eu: fix indentation error
Remco Verhoef [Mon, 15 May 2017 20:37:35 +0000 (22:37 +0200)]
staging: rtl8188eu: fix indentation error

Fixes a 'code indent should use tabs where possible' checkpatch code
style error by changing whitespace into tabs.

Signed-off-by: Remco Verhoef <remco@dutchcoders.io>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: vme: Use BIT macro for bit definitions
Ricardo Silva [Mon, 15 May 2017 09:18:14 +0000 (10:18 +0100)]
staging: vme: Use BIT macro for bit definitions

Use the BIT(n) macro instead of '(1 << n)' in definitions where the bit
semantics clearly applies.

Fixes true positive "Prefer using the BIT macro" checks reported by
checkpatch.

Some of these checks are still triggering on definitions using
'(1 << n)', namely for PIO2_CNTR_SC_DEV1, PIO2_CNTR_RW_LSB and
PIO2_CNTR_MODE1. Leave them be, as the context there is more of a
"multi-bit field value" ((val << n), where for some cases 'val' happens
to be 1) rather than a "single bit" (1 << n), so keeping the value as is
in the code makes it more readable that using a combination of BIT
macros.

Signed-off-by: Ricardo Silva <rjpdasilva@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoStaging: rtl8723bs: core: rtw_mlme: Fix spelling issues
Ammly Fredrick [Mon, 15 May 2017 09:35:09 +0000 (12:35 +0300)]
Staging: rtl8723bs: core: rtw_mlme: Fix spelling issues

Fixed spelling warnings produced by scripts/checkpatch.pl

Signed-off-by: Ammly Fredrick <ammlyf@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: ks7010: avoid CamelCase: local variables in ks_hostif.c
Janusz Lisiecki [Mon, 15 May 2017 18:55:46 +0000 (20:55 +0200)]
staging: ks7010: avoid CamelCase: local variables in ks_hostif.c

Replace CamelCase local variables' name with underscores to comply
with the standard kernel coding style.
Changed:
- LinkSpeed
- TransmittedFrameCount
- ReceivedFragmentCount
- FailedCount
- FCSErrorCount

Signed-off-by: Janusz Lisiecki <janusz.lisiecki@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agodrivers/staging/ccree: Replacing spaces by tab
Pushkar Jambhlekar [Tue, 16 May 2017 08:31:51 +0000 (14:01 +0530)]
drivers/staging/ccree: Replacing spaces by tab

Fixing 'checkpatch.pl' ERROR: code indent should use tabs where possible

Signed-off-by: Pushkar Jambhlekar <pushkar.iit@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: greybus: enable compile testing of arche driver
Johan Hovold [Tue, 16 May 2017 08:01:39 +0000 (10:01 +0200)]
staging: greybus: enable compile testing of arche driver

Add Arche platform-driver config option and allow the driver to be
compile tested also without the out-of-tree usb3613 driver.

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: greybus: arche: remove timesync remains
Johan Hovold [Tue, 16 May 2017 08:01:38 +0000 (10:01 +0200)]
staging: greybus: arche: remove timesync remains

Remove the remaining timesync bits that were left in the arche platform
driver and which prevented the driver from being compiled.

Fixes: bdfb95c4baab ("staging: greybus: remove timesync protocol support")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8192e: _rtl92e_dm_check_edca_turbo remove peername message.
Malcolm Priestley [Sat, 13 May 2017 16:41:21 +0000 (17:41 +0100)]
staging: rtl8192e: _rtl92e_dm_check_edca_turbo remove peername message.

This kinda reports this as if it was an error message.

Now that bssid is reported at associate remove this piece of code
serves no purpose as there is no code for peers so remove it.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8192e: Let user know mac address associated with.
Malcolm Priestley [Sat, 13 May 2017 16:41:20 +0000 (17:41 +0100)]
staging: rtl8192e: Let user know mac address associated with.

User cannot tell which mac address(BSIDD) associated with so add
this to info message.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8192e: HTSetConnectBwMode message replace with debug.
Malcolm Priestley [Sat, 13 May 2017 16:41:19 +0000 (17:41 +0100)]
staging: rtl8192e: HTSetConnectBwMode message replace with debug.

The flag status of bCurBW40MHz is printed as info and is
only useful as debug message.

Replace with netdev_dbg in line with rest of driver.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agostaging: rtl8192e: print alg name as debug.
Malcolm Priestley [Sat, 13 May 2017 16:41:18 +0000 (17:41 +0100)]
staging: rtl8192e: print alg name as debug.

alg name will be printed a number times during a connection it
is only really useful as a debug message.

Change to netdev_dbg.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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>