platform/kernel/linux-starfive.git
6 years agostaging: rtl8723bs: os_dep: Remove true and false comparison
Mamta Shukla [Thu, 11 Oct 2018 17:44:42 +0000 (23:14 +0530)]
staging: rtl8723bs: os_dep: Remove true and false comparison

Remove comparison to true and false in if statement.
Issue found with checkpatch.pl
CHECK: Using comparison to true is error prone
CHECK: Using comparison to false is error prone

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
ACKed-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: greybus: loopback.c: remove unused gb_loopback::lbid
Rasmus Villemoes [Fri, 5 Oct 2018 14:28:24 +0000 (16:28 +0200)]
staging: greybus: loopback.c: remove unused gb_loopback::lbid

It's not obvious how the code prevents adding more than 31 elements to
the list and thus invoking undefined behaviour in the 1 << new_lbid
expression, and in practice causing ->lbid values to repeat every 32
elements.

But the definition of struct gb_loopback is local to loopback.c, and the
lbid field is entirely unused outside of this function, so it seems we
can just drop it entirely.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: prefer 'help' in KConfig
Ioannis Valasakis [Wed, 10 Oct 2018 14:47:56 +0000 (15:47 +0100)]
staging: wilc1000: prefer 'help' in KConfig

Fix for a style warning using the help without the
deprecated help included between dashes.
Reported by checkpatch.

Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vboxvideo: make a couple of funcs static
Craig Kewley [Wed, 10 Oct 2018 20:17:05 +0000 (20:17 +0000)]
staging: vboxvideo: make a couple of funcs static

Fix Sparse warnings:
drivers/staging/vboxvideo/vbox_mode.c:309:6: warning:
symbol 'vbox_primary_atomic_disable' was not declared. Should it be static?

drivers/staging/vboxvideo/vbox_mode.c:452:6: warning:
symbol 'vbox_cursor_atomic_disable' was not declared. Should it be static?

Signed-off-by: Craig Kewley <craigkewley@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vboxvideo: unlock on error in vbox_cursor_atomic_update()
Dan Carpenter [Thu, 11 Oct 2018 07:59:41 +0000 (10:59 +0300)]
staging: vboxvideo: unlock on error in vbox_cursor_atomic_update()

We need to unlock before returning on this error path.

Fixes: 35f3288c453e ("staging: vboxvideo: Atomic phase 1: convert cursor to universal plane")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-dma: Delete unused define
Bhanusree Pola [Wed, 10 Oct 2018 01:10:35 +0000 (06:40 +0530)]
staging: mt7621-dma: Delete unused define

delete unused '#define GDMA_REG_CTRL1_CONTINOUS BIT(14)'

Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: erofs: harden inode lookup for 32-bit platforms
Gao Xiang [Tue, 9 Oct 2018 14:07:13 +0000 (22:07 +0800)]
staging: erofs: harden inode lookup for 32-bit platforms

This patch introduces inode hash function, test and set callbacks,
and iget5_locked to find the right inode for 32-bit platforms.

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: remove whitespace - style
Michael Straube [Tue, 9 Oct 2018 15:48:54 +0000 (17:48 +0200)]
staging: rtl8188eu: remove whitespace - style

Replace tabs with spaces and/or remove extra spaces where
appropriate.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: cleanup lines over 80 characters - style
Michael Straube [Tue, 9 Oct 2018 15:48:53 +0000 (17:48 +0200)]
staging: rtl8188eu: cleanup lines over 80 characters - style

Clear 'line over 80 characters' checkpatch warnings by adding
appropriate line breaks and moving a comment.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: add spaces around operators - style
Michael Straube [Tue, 9 Oct 2018 15:48:52 +0000 (17:48 +0200)]
staging: rtl8188eu: add spaces around operators - style

Add spaces around '*' and '/' to follow kernel coding style.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: use __func__ instead of hardcoded name - style
Michael Straube [Tue, 9 Oct 2018 15:48:51 +0000 (17:48 +0200)]
staging: rtl8188eu: use __func__ instead of hardcoded name - style

Use __func__ instead of hardcoded function name in rtw_xmit_entry().
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: erofs: add the missing __init tags
Gao Xiang [Tue, 9 Oct 2018 13:43:53 +0000 (21:43 +0800)]
staging: erofs: add the missing __init tags

Append __init to `erofs_init_inode_cache',
`z_erofs_init_zip_subsystem' and move these
declarations to internal.h.

Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: comedi: ni_660x: add device-global routing
Spencer E. Olson [Wed, 3 Oct 2018 20:56:12 +0000 (14:56 -0600)]
staging: comedi: ni_660x: add device-global routing

Provides the device-global routing interface for ni_660x devices.  Using
the device-global names in comedi_cmd structures for commands was already
supported through the ni_tio module.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: comedi: ni_660x: clean up pfi routing
Spencer E. Olson [Wed, 3 Oct 2018 20:56:11 +0000 (14:56 -0600)]
staging: comedi: ni_660x: clean up pfi routing

Cleans up the pfi routing code to make it easier to follow, read, and also
to prepare to use this cleaned up code for enabling the device-global
routing interface for ni_660x devices.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: comedi: ni_660x: Add NI PCI-6608 to list of supported devices
Spencer E. Olson [Wed, 3 Oct 2018 20:56:10 +0000 (14:56 -0600)]
staging: comedi: ni_660x: Add NI PCI-6608 to list of supported devices

Previously, only the PXI version of the NI-6608 board was supported.  This
change adds support for the PCI version as well.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: comedi: ni_mio_common: create device-global access to tio
Spencer E. Olson [Wed, 3 Oct 2018 20:56:09 +0000 (14:56 -0600)]
staging: comedi: ni_mio_common: create device-global access to tio

Adds tio sub-devices of ni_mio_common supported hardware to the
implementation of test_route, connect_route, disconnect_route.  This change
delegates the actual functionality to the ni_tio module.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: comedi: tio: implement global tio/ctr routing
Spencer E. Olson [Wed, 3 Oct 2018 20:56:08 +0000 (14:56 -0600)]
staging: comedi: tio: implement global tio/ctr routing

Adds ability to use device-global names in command args, in particular
cmd->start_arg (for NI_CtrArmStartTrigger), and cmd->scan_begin_arg or
cmd->convert_arg (either is used to specify NI_CtrGate, with preference
given to cmd->scan_begin_arg, if it is set).

The actual arguments of cmd->start_arg are not fully checked against known
register values for the particular devices because these are not documented
or currently known.  This follows the precedence of prior versions of the
tio driver.  Should these become known, they should be annotated in the
route_values tables and the set of lines in ni_tio_cmdtest should be
uncommented to allow the tests to be made.

This patch also adds interface functions that allow routes for particular
counter route destinations to be made/queried/unmade.  This allows overseer
modules to implement test_route, connect_route, and disconnect_route.  As a
part of these changes, various functions were cleaned up and clarified.

These new interface functions allow direct writing/reading of register
values.  This is an example of exactly what the new device-global access
was intended to solve:  the old interface was not consistent with other
portions of the ni_* drivers--it did not allow full register values to be
given for various MUXes.  Instead, the old interface _did_ abstract away
some of the actual hardware from the underlying devices, but it was not
consistent with any other NI hardware.  Allowing the device-global
identifiers to be used, the new patch provides for consistency across all
ni_* drivers.  One final note:  these changes provide for backwards
compatibility by allowing the older values to still be used in through the
pre-existing kernel interfaces--though not in the new device-global
test/dis/connect/route interfaces.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: comedi: ni_mio_common: implement output selection of GPFO_{0, 1}
Spencer E. Olson [Wed, 3 Oct 2018 20:56:07 +0000 (14:56 -0600)]
staging: comedi: ni_mio_common: implement output selection of GPFO_{0, 1}

Implement the ability to route various signals to NI_CtrOut(x) pin.  This
pin is also known as GPFO_{0,1} in the DAQ STC.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: comedi: ni_mio_common: implement global pfi, rtsi routing
Spencer E. Olson [Wed, 3 Oct 2018 20:56:06 +0000 (14:56 -0600)]
staging: comedi: ni_mio_common: implement global pfi, rtsi routing

Implement device-global config interface for ni_mio devices.  In
particular, this patch implements:
INSN_DEVICE_CONFIG_TEST_ROUTE,
INSN_DEVICE_CONFIG_CONNECT_ROUTE,
INSN_DEVICE_CONFIG_DISCONNECT_ROUTE,
INSN_DEVICE_CONFIG_GET_ROUTES
for the ni mio devices.  This means that the new abstracted signal/terminal
names can be used to define signal routing with regards to the PFI
terminals and RTSI trigger bus lines.

This also adds ability to identify PFI and RTSI channels on the PFI and
RTSI subdevices using the new device-global names.  This does not change
the values that are set for channel output selections using the subdevice
interfaces--these still require direct register values.

Annotates and updates tables of register values to reflect this new
implementation status.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: comedi: ni_mio_common: implement new routing for TRIG_EXT
Spencer E. Olson [Wed, 3 Oct 2018 20:56:05 +0000 (14:56 -0600)]
staging: comedi: ni_mio_common: implement new routing for TRIG_EXT

Use new signal routing capability for all comedi command *_src == TRIG_EXT
options.  This new interface allows the user specify signals and terminals
as TRIG_EXT sources using a very consistent naming convention. Furthermore,
the interface allows backwards compatibility to prior behavior of
specifying register-level (or near register-level) values as *_arg options
when *_src == TRIG_EXT.

Annotates and updates tables of register values to reflect this new
implementation status.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: comedi: add interface to ni routing table information
Spencer E. Olson [Wed, 3 Oct 2018 20:56:04 +0000 (14:56 -0600)]
staging: comedi: add interface to ni routing table information

Adds interface and associated unittests for accessing/looking-up/validating
the new ni routing table information.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: comedi: ni_routing: Add NI signal routing info
Spencer E. Olson [Wed, 3 Oct 2018 20:56:03 +0000 (14:56 -0600)]
staging: comedi: ni_routing: Add NI signal routing info

See README for a thorough discussion of this content.

Adds tables of all register values for routing various signals to various
terminals on National Instruments hardware.  This information is directly
compared to and taken from register-level programming documentation and/or
register-level programming examples as provided by National Instruments.

Furthermore, this information was mostly compared (favorably) to the
register values already used in the comedi drivers for NI hardware.

Adds tables of valid routes for many devices.  This information is not
consistent from device to device, nor entirely consistent within device
families.  One additional major challenge is that this information does not
seem to be obtainable in any programmatic fashion, neither through the
proprietary NIDAQmx(-base) c-libraries, nor with register level
programming, _nor_ through any documentation.  In fact, the only consistent
source of this information is through the proprietary NI-MAX software,
which currently only runs on Windows platforms.  A further challenge is
that this information cannot be exported from NI-MAX, except by screenshot.

The collection and maintenance of this information is somewhat tedious and
requires frequent re-examination and comparison of NI-MAX and/or the
NI-MHDDK documentation (register programming information) and NI-MHDDK
examples.  Tools are added with this patch to facilitate generating CSV
files from the data tables.  These CSV files can be used with a spreadsheet
program to provide better visual comparision with screenshots gathered from
NI-MAX.  Tools are also added to regenerate the data tables from CSV
content--this greatly enhances updating data tables with large changes
(such as when adding devices).

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: comedi: add new device-global config interface
Spencer E. Olson [Wed, 3 Oct 2018 20:56:02 +0000 (14:56 -0600)]
staging: comedi: add new device-global config interface

Adds interface for configuring options that are global to all sub-devices.
For now, only options to configure device-globally identified signal routes
have been defined.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: comedi: add abstracted NI signal/terminal named constants
Spencer E. Olson [Wed, 3 Oct 2018 20:56:01 +0000 (14:56 -0600)]
staging: comedi: add abstracted NI signal/terminal named constants

This change adds abstracted constants for National Instruments
terminal/signal names.

Some background:
  There have been significant confusions over the past many years for users
  when trying to understand how to connect to/from signals and terminals on
  NI hardware using comedi.  The major reason for this is that the actual
  register values were exposed and required to be used by users.  Several
  major reasons exist why this caused major confusion for users:

  1) The register values are _NOT_ in user documentation, but rather in
    arcane locations, such as a few register programming manuals that are
    increasingly hard to find and the NI-MHDDK (comments in in example
    code).  There is no one place to find the various valid values of the
    registers.

  2) The register values are _NOT_ completely consistent.  There is no way
    to gain any sense of intuition of which values, or even enums one
    should use for various registers.  There was some attempt in prior use
    of comedi to name enums such that a user might know which enums should
    be used for varying purposes, but the end-user had to gain a knowledge
    of register values to correctly wield this approach.

  3) The names for signals and registers found in the various register
    level programming manuals and vendor-provided documentation are _not_
    even close to the same names that are in the end-user documentation.

Similar confusion, albeit less, plagued NI's previous version of their own
proprietary drivers.  Earlier than 2003, NI greatly simplified the
situation for users by releasing a new API that abstracted the names of
signals/terminals to a common and intuitive set of names.  In addition,
this new API provided a much more common interface to use for most of NI
hardware.

The names added here mirror the names chosen and well documented by NI.
These names are exposed to the user via the comedilib user library.  By
keeping the names in this format, in spite of the use of CamelScript,
maintenance will be greatly eased and confusion for users _and_ comedi
developers will be greatly reduced.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: comedi: tests: add unittest framework for comedi
Spencer E. Olson [Wed, 3 Oct 2018 20:56:00 +0000 (14:56 -0600)]
staging: comedi: tests: add unittest framework for comedi

Adds a framework for unittests for comedi drivers.  It was certainly
possible to write some unit tests before and test various aspects of a
particular driver, but this framework makes this a bit easier and hopefully
inspires more unittest modules to be written.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: comedi: comedi_test: implement INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS
Spencer E. Olson [Wed, 19 Sep 2018 16:51:06 +0000 (10:51 -0600)]
staging: comedi: comedi_test: implement INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS

Adds implementation of the new INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS
instruction.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: comedi: ni_pcidio: implement INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS
Spencer E. Olson [Wed, 19 Sep 2018 16:51:05 +0000 (10:51 -0600)]
staging: comedi: ni_pcidio: implement INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS

Adds implementation of the new INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS
instruction.  This patch also adds data for this implementation, based on
spec sheets from NI.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: comedi: ni_mio_common: implement INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS
Spencer E. Olson [Wed, 19 Sep 2018 16:51:04 +0000 (10:51 -0600)]
staging: comedi: ni_mio_common: implement INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS

Adds implementation of the new INSN_CONFIG_GET_CMD_TIMING_CONSTRAINTS
instruction.  This patch also adds data for digital subdevices that are
streaming capable (within the ni_mio_* family).  Mostly, only the m-series
devices are capable of digital streaming.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: comedi: add facility to directly query subdevice timing constraints
Spencer E. Olson [Wed, 19 Sep 2018 16:51:03 +0000 (10:51 -0600)]
staging: comedi: add facility to directly query subdevice timing constraints

Adds facility to directly query the hardware speed limits of subdevices,
in particular for scan_begin and convert signals.  This information can be
critical for integrating comedi with other hardware modules, and also
comedi modules together with software where software requires specific
timing capabilities in order to properly coordinate multiple devices.

Currently, comedi_command_test almost satisfies this need, but really only
for when *_src == TRIG_TIMER.  For *_src == TRIG_EXT, comedi_command_test
does not help at all.  For many subdevices, one might simply use
*_src==TRIG_TIMER in command_test in order to determine these limits.  For
other subdevices, this tactic does not work since *_src == TRIG_TIMER might
not be valid.  There is also the possibility that the timing limits are
different between the TRIG_TIMER and TRIG_EXT modes.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Correct comparison with NULL - Style
John Whitmore [Sun, 7 Oct 2018 21:40:25 +0000 (22:40 +0100)]
staging:rtl8192u: Correct comparison with NULL - Style

Correct code to remote comparison with NULL, this clears the resulting
checkpatch issue.

This is a coding style change which should not impact runtime code
execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Correct code alignment - Style
John Whitmore [Sun, 7 Oct 2018 21:40:24 +0000 (22:40 +0100)]
staging:rtl8192u: Correct code alignment - Style

Correct the alignment of a function, this clears checkpatch issue.

This is a simple coding style change which should not impact runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Remove unnecessary line continuation - Style
John Whitmore [Sun, 7 Oct 2018 21:40:23 +0000 (22:40 +0100)]
staging:rtl8192u: Remove unnecessary line continuation - Style

Remove the unnecessary line continuation character to clear checkpatch
issue.

This is a simple coding style change which should not impact runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Add missing blank lines - Style
John Whitmore [Sun, 7 Oct 2018 21:40:22 +0000 (22:40 +0100)]
staging:rtl8192u: Add missing blank lines - Style

Add missing blank lines after declarations. This clears the resulting
checkpatch issue.

This is a simple coding style change which should not impact runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Correct code indentation - Style
John Whitmore [Sun, 7 Oct 2018 21:40:21 +0000 (22:40 +0100)]
staging:rtl8192u: Correct code indentation - Style

Rewrite code block to correct the indentation of code. This clears the
resulting checkpatch issue.

This is a coding style change which should not impact runtime code
execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Add spaces around + operator - Style
John Whitmore [Sun, 7 Oct 2018 21:40:19 +0000 (22:40 +0100)]
staging:rtl8192u: Add spaces around + operator - Style

Add spaces around '+' operator to clear the checkpatch issue.

This is a coding style change which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Remove extra blank lines - Style
John Whitmore [Sun, 7 Oct 2018 21:40:18 +0000 (22:40 +0100)]
staging:rtl8192u: Remove extra blank lines - Style

Remove the extra blank lines to clear checkpatch issue.

This is a simple coding style change which should have no impact
on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Clear error with line ending ( - Style
John Whitmore [Sun, 7 Oct 2018 21:40:17 +0000 (22:40 +0100)]
staging:rtl8192u: Clear error with line ending ( - Style

Rewrite function call to clear the checkpatch issue with lines ending
with a '(' character.

This is a coding style change which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Removed commented out include - Style
John Whitmore [Sun, 7 Oct 2018 21:40:16 +0000 (22:40 +0100)]
staging:rtl8192u: Removed commented out include - Style

Remove commented out #include directive.

Additionally shorted a block comment to clear the checkpatch issue
with line length.

These are coding style changes which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:rtl8192u: Add missing SPDX-License-Identifier - Style
John Whitmore [Sun, 7 Oct 2018 21:40:15 +0000 (22:40 +0100)]
staging:rtl8192u: Add missing SPDX-License-Identifier - Style

Add the missing SPDX-License-Identifier tag to file to clear the
checkpatch issue.

This is a coding style change which should have no impact on runtime
code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vc04_services: Drop no longer needed headers
Tuomas Tynkkynen [Thu, 4 Oct 2018 09:37:47 +0000 (12:37 +0300)]
staging: vc04_services: Drop no longer needed headers

Previously, connection.h was only required for the definition of
VCHI_CONNECTION_T, but now all usages of it are gone. Remove this unused
header.

After connection.h is gone, message.h and vchi_cfg_internal.h are no
longer referenced by anything either. Drop them as well.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vc04_services: Drop unused parameters from vchi_connect()
Tuomas Tynkkynen [Thu, 4 Oct 2018 09:37:46 +0000 (12:37 +0300)]
staging: vc04_services: Drop unused parameters from vchi_connect()

Remove two parameters which are never used and all where all callers
just pass in dummy values anyway.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vc04_services: Drop VCHI_SERVICE_INIT and SERVICE_INFO_T
Tuomas Tynkkynen [Thu, 4 Oct 2018 09:37:45 +0000 (12:37 +0300)]
staging: vc04_services: Drop VCHI_SERVICE_INIT and SERVICE_INFO_T

These types are not used anywhere, remove them.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vc04_services: Drop declaration of vchi_crc_control()
Tuomas Tynkkynen [Thu, 4 Oct 2018 09:37:44 +0000 (12:37 +0300)]
staging: vc04_services: Drop declaration of vchi_crc_control()

There is no definition for this unused function, so drop its prototype.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vc04_services: Drop trivially unused fields from SERVICE_CREATION_T
Tuomas Tynkkynen [Thu, 4 Oct 2018 09:37:43 +0000 (12:37 +0300)]
staging: vc04_services: Drop trivially unused fields from SERVICE_CREATION_T

These fields are only initialized with constants and never read. Drop
them.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vc04_services: Drop 'connection' field from SERVICE_CREATION_T
Tuomas Tynkkynen [Thu, 4 Oct 2018 09:37:42 +0000 (12:37 +0300)]
staging: vc04_services: Drop 'connection' field from SERVICE_CREATION_T

The connection field of SERVICE_CREATION_T is assigned to but its value
is never read. Drop the field and the resulting no longer needed code
from bcm2835-audio and bcm2835-camera.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vc04_services: Drop pointless stub functions
Tuomas Tynkkynen [Thu, 4 Oct 2018 09:37:41 +0000 (12:37 +0300)]
staging: vc04_services: Drop pointless stub functions

These functions do nothing besides returning NULL and are unused.
Just drop them.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: comedi: ni_mio_common: protect register write overflow
Spencer E. Olson [Wed, 3 Oct 2018 20:54:16 +0000 (14:54 -0600)]
staging: comedi: ni_mio_common: protect register write overflow

Fixes two problems introduced as early as
commit 03aef4b6dc12  ("Staging: comedi: add ni_mio_common code"):
(1) Ensures that the last four bits of NISTC_RTSI_TRIGB_OUT_REG register is
    not unduly overwritten on e-series devices.  On e-series devices, the
    first three of the last four bits are reserved.  The last bit defines
    the output selection of the RGOUT0 pin, otherwise known as
    RTSI_Sub_Selection.  For m-series devices, these last four bits are
    indeed used as the output selection of the RTSI7 pin (and the
    RTSI_Sub_Selection bit for the RGOUT0 pin is moved to the
    RTSI_Trig_Direction register.
(2) Allows all 4 RTSI_BRD lines to be treated as valid sources for RTSI
    lines.

This patch also cleans up the ni_get_rtsi_routing command for readability.

Fixes: 03aef4b6dc12  ("Staging: comedi: add ni_mio_common code")
Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: add spaces around operators in odm_rtl8188e.c
Michael Straube [Sat, 6 Oct 2018 13:02:31 +0000 (15:02 +0200)]
staging: rtl8188eu: add spaces around operators in odm_rtl8188e.c

Add spaces around '|', '>>' and '/' to follow kernel coding style.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: remove dead code from dm_fast_training_init()
Michael Straube [Sat, 6 Oct 2018 13:02:30 +0000 (15:02 +0200)]
staging: rtl8188eu: remove dead code from dm_fast_training_init()

The variable AntCombination is initialized to 2 and never changed.
So the else if path is never used. Remove the dead code and the
variable AntCombination.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: remove whitespace in rtw_mlme_ext.h
Michael Straube [Thu, 4 Oct 2018 17:57:00 +0000 (19:57 +0200)]
staging: rtl8188eu: remove whitespace in rtw_mlme_ext.h

Remove spaces and/or replace tabs with spaces in some declarations
in rtw_mlme_ext.h.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: make struct field of action_handler const
Michael Straube [Thu, 4 Oct 2018 17:56:59 +0000 (19:56 +0200)]
staging: rtl8188eu: make struct field of action_handler const

The strings in the use of struct action_handler are constant.
Change the type of field str from 'char *' to 'const char *'.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: make struct field of mlme_handler const
Michael Straube [Thu, 4 Oct 2018 17:56:58 +0000 (19:56 +0200)]
staging: rtl8188eu: make struct field of mlme_handler const

The strings in the uses of struct mlme_handler are constant.
Change the type of field str from 'char *' to 'const char *'.

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: change array type to const u8
Michael Straube [Thu, 4 Oct 2018 17:56:57 +0000 (19:56 +0200)]
staging: rtl8188eu: change array type to const u8

Change the type of MCS_rate_1R from unsigned char to const u8.

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: rewrite if tests - style
Michael Straube [Wed, 3 Oct 2018 20:43:59 +0000 (22:43 +0200)]
staging: rtl8188eu: rewrite if tests - style

Rewrite if tests to clear a 'line over 80 characters' and
'Comparisons should place the constant on the right side of the test'
checkpatch warning.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: cleanup array declaration - style
Michael Straube [Wed, 3 Oct 2018 20:43:58 +0000 (22:43 +0200)]
staging: rtl8188eu: cleanup array declaration - style

Cleanup array declaration to clear two 'line over 80 characters'
checkpatch warnings and improve readability.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: fix line over 80 characters - style
Michael Straube [Wed, 3 Oct 2018 20:43:57 +0000 (22:43 +0200)]
staging: rtl8188eu: fix line over 80 characters - style

Line break array declaration to clear a 'line over 80 characters'
checkpatch warning. For consistency replace 0x0 with 0x00.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-mmc: Add blank line after declaration
Jaakko Tyynismaa [Tue, 9 Oct 2018 05:06:48 +0000 (05:06 +0000)]
staging: mt7621-mmc: Add blank line after declaration

Add blank line after declaration.
Reported by checkpatch.

Signed-off-by: Jaakko Tyynismaa <jaakko.tyynismaa@hotmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: emxx_udc: Remove unused device_desc declaration
Nathan Chancellor [Thu, 4 Oct 2018 05:56:00 +0000 (22:56 -0700)]
staging: emxx_udc: Remove unused device_desc declaration

Clang warns:

drivers/staging/emxx_udc/emxx_udc.c:1373:37: warning: variable
'device_desc' is not needed and will not be emitted
[-Wunneeded-internal-declaration]
static struct usb_device_descriptor device_desc = {
                                    ^
1 warning generated.

This definition hasn't been attached to anything since the driver was
introduced in commit 33aa8d45a4fe ("staging: emxx_udc: Add Emma Mobile
USB Gadget driver") and neither GCC nor Clang emit any reference to the
variable in the final assembly. The only reason GCC doesn't warn about
this variable being unused is the sizeof function.

Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8723bs: Remove unnecessary parentheses and dead commented code
Nathan Chancellor [Thu, 4 Oct 2018 01:32:51 +0000 (18:32 -0700)]
staging: rtl8723bs: Remove unnecessary parentheses and dead commented code

Clang warns when multiple pairs of parentheses are used for a single
conditional statement.

drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:3351:20: warning:
equality comparison with extraneous parentheses [-Wparentheses-equality]

The commented code is pointless since _HW_STATE_AP_ is handled right
below this block.

Link: https://github.com/ClangBuiltLinux/linux/issues/168
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-mmc: Remove #if 0 blocks in dbg.h
Nishad Kamdar [Thu, 4 Oct 2018 16:37:26 +0000 (22:07 +0530)]
staging: mt7621-mmc: Remove #if 0 blocks in dbg.h

This patch removes #if 0 code blocks and usages of
functions defined in the #if 0 blocks in dbg.h.

Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-mmc: Remove #if 0 blocks in dbg.c
Nishad Kamdar [Thu, 4 Oct 2018 16:36:36 +0000 (22:06 +0530)]
staging: mt7621-mmc: Remove #if 0 blocks in dbg.c

This patch removes #if 0 code blocks and usages of
functions defined in the #if 0 blocks in dbg.c

Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-mmc: Remove #if 0 blocks in sd.c
Nishad Kamdar [Thu, 4 Oct 2018 16:35:38 +0000 (22:05 +0530)]
staging: mt7621-mmc: Remove #if 0 blocks in sd.c

This patch removes #if 0 code blocks and usages of
functions defined in the #if 0 blocks in sd.c.

Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtlwifi: Remove unnecessary parentheses
Nathan Chancellor [Thu, 4 Oct 2018 01:21:25 +0000 (18:21 -0700)]
staging: rtlwifi: Remove unnecessary parentheses

Clang warns when multiple pairs of parentheses are used for a single
conditional statement.

drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c:558:33: warning:
equality comparison with extraneous parentheses [-Wparentheses-equality]
                } else if ((is_enable_la_mode == 1)) {
                            ~~~~~~~~~~~~~~~~~~^~~~
drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c:558:33: note: remove
extraneous parentheses around the comparison to silence this warning
                } else if ((is_enable_la_mode == 1)) {
                           ~                  ^   ~
drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c:558:33: note: use '='
to turn this equality comparison into an assignment
                } else if ((is_enable_la_mode == 1)) {
                                              ^~
                                              =
1 warning generated.

Link: https://github.com/ClangBuiltLinux/linux/issues/172
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: axis-fifo: remove duplicated include from axis-fifo.c
YueHaibing [Fri, 5 Oct 2018 11:23:54 +0000 (11:23 +0000)]
staging: axis-fifo: remove duplicated include from axis-fifo.c

Remove duplicated include.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: media: davinci_vpfe: Use __func__ instead of function name
Mamta Shukla [Sat, 6 Oct 2018 22:28:19 +0000 (03:58 +0530)]
staging: media: davinci_vpfe: Use __func__ instead of function name

Access current function name using __func__.
Use %s and __func__ instead of function name.
Use of predefined identifier __func__ prevents typo error in function
name in print calls.

Issue found with checkpatch.pl

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vt6655: Remove space after cast
Mamta Shukla [Sat, 6 Oct 2018 11:31:35 +0000 (17:01 +0530)]
staging: vt6655: Remove space after cast

Remove space after cast to fix checkpatch issue.
CHECK: No space is necessary after a cast

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Reviewed-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vt6655: Add spaces around operators
Mamta Shukla [Sat, 6 Oct 2018 11:30:00 +0000 (17:00 +0530)]
staging: vt6655: Add spaces around operators

Add spaces around '*' and '-' to fix checkpatch issue.

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Reviewed-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vt6655: Add blank line after function/struct/union/enum declarations
Mamta Shukla [Sat, 6 Oct 2018 11:26:36 +0000 (16:56 +0530)]
staging: vt6655: Add blank line after function/struct/union/enum declarations

Add blank line after function/struct/union/enum declarations to fix
checkpatch issue.
CHECK: Please use a blank line after function/struct/union/enum
declarations

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Reviewed-by: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: Prefer using the BIT macro
Mamta Shukla [Fri, 5 Oct 2018 07:32:06 +0000 (13:02 +0530)]
staging: mt7621-pci: Prefer using the BIT macro

Replace all occurrences of (1<<x) with BIT(x).

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: Add spaces around '<<'
Mamta Shukla [Fri, 5 Oct 2018 07:28:08 +0000 (12:58 +0530)]
staging: mt7621-pci: Add spaces around '<<'

Add spaces around '<<' to fix checkpatch issue.
CHECK: spaces preferred around that '<<' (ctx:VxV)

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: Add spaces around '|'
Mamta Shukla [Fri, 5 Oct 2018 07:23:34 +0000 (12:53 +0530)]
staging: mt7621-pci: Add spaces around '|'

Add spaces around '|' to fix checkpatch issue
CHECK: spaces preferred around that '|' (ctx:VxV)

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: Add spaces around '&'
Mamta Shukla [Fri, 5 Oct 2018 07:21:41 +0000 (12:51 +0530)]
staging: mt7621-pci: Add spaces around '&'

Add spaces around '&' to fix checkpatch issue.
CHECK: spaces preferred around that '&' (ctx:VxV)

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: Do not initialise statics to 0
Mamta Shukla [Fri, 5 Oct 2018 07:19:38 +0000 (12:49 +0530)]
staging: mt7621-pci: Do not initialise statics to 0

Remove initialisation for static global variable to fix checkpatch issue.
ERROR: do not initialise statics to 0

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8723bs: core: Remove true and false comparison
Mamta Shukla [Mon, 8 Oct 2018 19:00:10 +0000 (00:30 +0530)]
staging: rtl8723bs: core: Remove true and false comparison

Remove comparison to true and false in if statement.
Issue found with checkpatch.pl.
CHECK: Using comparison to true is error prone
CHECK: Using comparison to false is error prone

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
ACKed-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: sm750fb: Remove space after cast
Mamta Shukla [Fri, 5 Oct 2018 13:58:20 +0000 (19:28 +0530)]
staging: sm750fb: Remove space after cast

Remove space after cast to fix checkpatch issue.
CHECK: No space is necessary after a cast

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: clocking-wizard: match parenthesis indentation
Ioannis Valasakis [Thu, 4 Oct 2018 12:41:01 +0000 (13:41 +0100)]
staging: clocking-wizard: match parenthesis indentation

Match parenthesis indentation after line end, and fixed alignment
to conform to the coding style guidelines.
Reported by checkpatch.

Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: axis-fifo: Remove parentheses in axis-fifo.c
Ioannis Valasakis [Thu, 4 Oct 2018 10:13:21 +0000 (11:13 +0100)]
staging: axis-fifo: Remove parentheses in axis-fifo.c

staging: axis-fifo: remove parentheses in axis-fifo.c

Remove parentheses from the end of line and conform to
the coding style guidelines. Reported by checkpatch.

Add an extra space to the function arguments to fix
indentation.

Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8712: add SPDX identifiers
Michael Straube [Wed, 3 Oct 2018 14:17:16 +0000 (16:17 +0200)]
staging: rtl8712: add SPDX identifiers

This satisfies a checkpatch warning and is the preferred
method for notating the license.

The SPDX identifier is a legally binding shorthand, which
can be used instead of the full boiler plate text.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: fbtft: Prefer using the BIT macro
Mamta Shukla [Wed, 3 Oct 2018 14:40:15 +0000 (20:10 +0530)]
staging: fbtft: Prefer using the BIT macro

Replacing all occurrences of (1<<x) with BIT(x) to fix checkpatch issue.
CHECK:Prefer using the BIT macro

Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: fix spelling mistake in comment
Michael Straube [Sun, 30 Sep 2018 19:53:10 +0000 (21:53 +0200)]
staging: rtl8188eu: fix spelling mistake in comment

Fix a spelling mistake reported by checkpatch.
Caculate -> Calculate

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: remove braces from single if statement
Michael Straube [Sun, 30 Sep 2018 19:53:09 +0000 (21:53 +0200)]
staging: rtl8188eu: remove braces from single if statement

Remove braces from single line if statement.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: remove unnecessary parentheses in odm_rtl8188e.c
Michael Straube [Sun, 30 Sep 2018 19:53:08 +0000 (21:53 +0200)]
staging: rtl8188eu: remove unnecessary parentheses in odm_rtl8188e.c

Remove unnecessary parentheses in odm_rtl8188e.c.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: add spaces around '+' in fw.c
Michael Straube [Sun, 30 Sep 2018 19:53:07 +0000 (21:53 +0200)]
staging: rtl8188eu: add spaces around '+' in fw.c

Add spaces around '+' in fw.c to follow kernel coding style.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: simplify block comment in pwrseq.c
Michael Straube [Sun, 30 Sep 2018 19:53:06 +0000 (21:53 +0200)]
staging: rtl8188eu: simplify block comment in pwrseq.c

Simplify block comment to a single line to clear a checkpatch warning.
WARNING: Block comments use * on subsequent lines

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: correct block comment in bb_cfg.c
Michael Straube [Sun, 30 Sep 2018 19:53:05 +0000 (21:53 +0200)]
staging: rtl8188eu: correct block comment in bb_cfg.c

Correct block comment to clear a checkpatch warning.
WARNING: Block comments should align the * on each line

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: rename odm_SignalScaleMapping()
Michael Straube [Sun, 30 Sep 2018 19:53:04 +0000 (21:53 +0200)]
staging: rtl8188eu: rename odm_SignalScaleMapping()

Rename odm_SignalScaleMapping to avoid CamelCase.
odm_SignalScaleMapping -> odm_signal_scale_mapping

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: rename variable in odm_SignalScaleMapping()
Michael Straube [Sun, 30 Sep 2018 19:53:03 +0000 (21:53 +0200)]
staging: rtl8188eu: rename variable in odm_SignalScaleMapping()

Rename variable in odm_SignalScaleMapping() to avoid CamelCase.
RetSig -> retsig

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: rename parameter of odm_SignalScaleMapping()
Michael Straube [Sun, 30 Sep 2018 19:53:02 +0000 (21:53 +0200)]
staging: rtl8188eu: rename parameter of odm_SignalScaleMapping()

Rename parameter of odm_SignalScaleMapping() to avoid CamelCase.
CurrSig -> currsig

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: rename odm_EVMdbToPercentage()
Michael Straube [Sun, 30 Sep 2018 19:53:01 +0000 (21:53 +0200)]
staging: rtl8188eu: rename odm_EVMdbToPercentage()

Rename odm_EVMdbToPercentage() to avoid CamelCase.
odm_EVMdbToPercentage -> odm_evm_db_to_percentage

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: rename parameter of odm_EVMdbToPercentage()
Michael Straube [Sun, 30 Sep 2018 19:53:00 +0000 (21:53 +0200)]
staging: rtl8188eu: rename parameter of odm_EVMdbToPercentage()

Rename parameter of odm_EVMdbToPercentage() to avoid CamelCase.
Value -> value

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: rename odm_QueryRxPwrPercentage()
Michael Straube [Sun, 30 Sep 2018 19:52:59 +0000 (21:52 +0200)]
staging: rtl8188eu: rename odm_QueryRxPwrPercentage()

Rename odm_QueryRxPwrPercentage() to avoid CamelCase.
odm_QueryRxPwrPercentage -> odm_query_rxpwrpercentage

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: rename parameter of odm_QueryRxPwrPercentage()
Michael Straube [Sun, 30 Sep 2018 19:52:58 +0000 (21:52 +0200)]
staging: rtl8188eu: rename parameter of odm_QueryRxPwrPercentage()

Rename parameter of odm_QueryRxPwrPercentage() to avoid CamelCase.
AntPower -> antpower

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: replace tabs with spaces in odm_hwconfig.c
Michael Straube [Sun, 30 Sep 2018 19:52:57 +0000 (21:52 +0200)]
staging: rtl8188eu: replace tabs with spaces in odm_hwconfig.c

Replace tabs with spaces in odm_hwconfig.c where appropriate.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: add spaces around '*' in odm_hwconfig.c
Michael Straube [Sun, 30 Sep 2018 19:52:56 +0000 (21:52 +0200)]
staging: rtl8188eu: add spaces around '*' in odm_hwconfig.c

Add spaces around '*' in odm_hwconfig.c to follow kernel coding style.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: add spaces around '+' in odm_hwconfig.c
Michael Straube [Sun, 30 Sep 2018 19:52:55 +0000 (21:52 +0200)]
staging: rtl8188eu: add spaces around '+' in odm_hwconfig.c

Add spaces around '+' in odm_hwconfig.c to follow kernel coding style.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: remove wrapper odm_SignalScaleMapping()
Michael Straube [Sun, 30 Sep 2018 19:52:54 +0000 (21:52 +0200)]
staging: rtl8188eu: remove wrapper odm_SignalScaleMapping()

The function odm_SignalScaleMapping() is just a wrapper for
odm_SignalScaleMapping_92CSeries().

Rename odm_SignalScaleMapping_92CSeries() to odm_SignalScaleMapping()
and remove the wrapper.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: rename odm_HWConfig
Michael Straube [Sun, 30 Sep 2018 19:52:53 +0000 (21:52 +0200)]
staging: rtl8188eu: rename odm_HWConfig

Rename source and header file to avoid CamelCase.
odm_HWConfig.c -> odm_hwconfig.c
odm_HWConfig.h -> odm_hwconfig.h

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: cleanup inconsistent indenting
Michael Straube [Sun, 30 Sep 2018 19:52:52 +0000 (21:52 +0200)]
staging: rtl8188eu: cleanup inconsistent indenting

Cleanup all inconsistent indenting reported by smatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ks7010: Remove unnecessary null check
Aymen Qader [Sun, 30 Sep 2018 08:34:21 +0000 (09:34 +0100)]
staging: ks7010: Remove unnecessary null check

Remove the unnecessary socket buffer null check in hostif_data_request.
There is already an appropriate null check in the calling function:

(ks_wlan_net.c) ks_wlan_start_xmit

Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: sm750fb: Remove extra space character
Aymen Qader [Sat, 29 Sep 2018 17:38:07 +0000 (18:38 +0100)]
staging: sm750fb: Remove extra space character

Remove an extra space in ddk750_mode.c to fix indentation

Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>