openwrt/staging/blogic.git
6 years agostaging: gasket: formatting fixes
Robert Deal [Sat, 10 Nov 2018 05:04:34 +0000 (00:04 -0500)]
staging: gasket: formatting fixes

Reformat arguments in a few functions in gasket_page_table.c to better
follow linux kernel formatting standards.

Signed-off-by: Robert Deal <robert.edward.deal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: Remove unused mutex cfg_values_lock
Adham Abozaeid [Fri, 9 Nov 2018 18:20:17 +0000 (18:20 +0000)]
staging: wilc1000: Remove unused mutex cfg_values_lock

After removing cfg_values member, cfg_values_lock that was used to protect
it can also be removed.

Signed-off-by: Adham Abozaeid <adham.abozaeid@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: Don't keep a copy of wiphy parameters in the driver
Adham Abozaeid [Fri, 9 Nov 2018 18:20:16 +0000 (18:20 +0000)]
staging: wilc1000: Don't keep a copy of wiphy parameters in the driver

host_if_drv.cfg_values is a write only member, and can be removed

Signed-off-by: Adham Abozaeid <adham.abozaeid@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: validate cfg parameters before scheduling the work
Adham Abozaeid [Fri, 9 Nov 2018 18:20:15 +0000 (18:20 +0000)]
staging: wilc1000: validate cfg parameters before scheduling the work

Validate cfg parameters after being called by cfg80211 in set_wiphy_params
before scheduling the work executed in handle_cfg_param

Signed-off-by: Adham Abozaeid <adham.abozaeid@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: remove unnecessary parentheses in recv_linux.c
Michael Straube [Sat, 10 Nov 2018 17:54:46 +0000 (18:54 +0100)]
staging: rtl8188eu: remove unnecessary parentheses in recv_linux.c

Remove unnecessary parentheses 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 recv_linux.c
Michael Straube [Sat, 10 Nov 2018 17:54:45 +0000 (18:54 +0100)]
staging: rtl8188eu: add spaces around '*' in recv_linux.c

Add spaces around '*' to conform with 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__ in recv_linux.c
Michael Straube [Sat, 10 Nov 2018 17:54:44 +0000 (18:54 +0100)]
staging: rtl8188eu: use __func__ in recv_linux.c

Use __func__ instead of hardcoded function name.
Reported by checkpatch.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: dt-bindings: add dt bindings for mt7621 pcie controller
Sergio Paracuellos [Fri, 26 Oct 2018 16:48:06 +0000 (18:48 +0200)]
staging: mt7621-pci: dt-bindings: add dt bindings for mt7621 pcie controller

This commit adds pci device tree bindings for the Mt7621 pci controller.
This is a temporal file included in staging driver directory and will be
moved to its correct location when this driver gets out of staging.

Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: replace 'mdelay()' with 'msleep()'
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:59 +0000 (11:49 +0100)]
staging: mt7621-pci: replace 'mdelay()' with 'msleep()'

Function 'mt7621_pcie_init_ports' is never called in atomic context.
It calls mdelay() to busily wait, which is not necessary. mdelay()
can be replaced with msleep().

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: move some code into 'mt7621_pcie_init_ports'
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:58 +0000 (11:49 +0100)]
staging: mt7621-pci: move some code into 'mt7621_pcie_init_ports'

Some clocks bits related code is in driver probe function and can
perfectly be moved into 'mt7621_pcie_init_ports' function which is
a more accurate place for it.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: factor out 'mt7621_pcie_enable_port' function
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:57 +0000 (11:49 +0100)]
staging: mt7621-pci: factor out 'mt7621_pcie_enable_port' function

Function 'mt7621_pcie_enable_ports' tries to enable all PCI ports.
To make it more readable the single port initialization part has
been factor out into a new 'mt7621_pcie_enable_port' function.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: enable interrupt when port is being enabled
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:56 +0000 (11:49 +0100)]
staging: mt7621-pci: enable interrupt when port is being enabled

Interrupt is being enabled in port initialization when the port phy
has not been initialized yet. Just enable the interrupt when the port
is being enabled which is a more accurate place for this.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: use PCIE_PORT_LINKUP instead of hardcode value
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:55 +0000 (11:49 +0100)]
staging: mt7621-pci: use PCIE_PORT_LINKUP instead of hardcode value

PCIE_PORT_LINKUP is defined and can be used to check if link is up
for each controller. Use it instead of use a hardcode value.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: use PERST_N instead of gpio control
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:54 +0000 (11:49 +0100)]
staging: mt7621-pci: use PERST_N instead of gpio control

Driver is using gpio control instead of each port PERST_N
bit. Use PERST_N bit of each port cleaning all the ugly
gpio code in driver probe function.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: add some definitions for enabling and disabling GEN and GEN1...
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:53 +0000 (11:49 +0100)]
staging: mt7621-pci: add some definitions for enabling and disabling GEN and GEN1 clocks

Instead of use hardcoded values when calling 'rt_sysc_m32' for enabling
and disabling RALINK_PCIE_CLK_GEN and RALINK_PCIE_CLK_GEN1 create
some preprocessor definitions.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: rewrite hardcoded code for enabling ports
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:52 +0000 (11:49 +0100)]
staging: mt7621-pci: rewrite hardcoded code for enabling ports

There are some hardcoded values in the process for enabling and
disabling some stuff inside 'mt7621_pcie_enable_ports' function.
Create some preprocessor definitions to make code more readable.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: rewrite RC FTS configuration
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:51 +0000 (11:49 +0100)]
staging: mt7621-pci: rewrite RC FTS configuration

The RC FTS configuration is done using hardcoded registers
and bitshift operations. Make it a bit clean defining some
prepocessor definitions and simple macros.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: align function definition style along the code
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:50 +0000 (11:49 +0100)]
staging: mt7621-pci: align function definition style along the code

Make some function definition changes in order to get all the
functions in the code with the same style.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: remove non sense comment
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:49 +0000 (11:49 +0100)]
staging: mt7621-pci: remove non sense comment

There is a comment at the beggining which has no sense at all.
Remove it.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: reorder preprocessor definitions
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:48 +0000 (11:49 +0100)]
staging: mt7621-pci: reorder preprocessor definitions

Reorder a bit register definitions and some values into
logical groups adding some comments for each group. Also
unify all of register to use 16 bit in definitions instead
of having some with 16 bits and some with 8 bits.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: remove unused preprocessor definitions
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:47 +0000 (11:49 +0100)]
staging: mt7621-pci: remove unused preprocessor definitions

There are some preprocessor definition which are not being used at
all. Remove them cleaning the code a bit.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: factor out 'mt7621_pcie_init_ports' function
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:46 +0000 (11:49 +0100)]
staging: mt7621-pci: factor out 'mt7621_pcie_init_ports' function

Instead of just inline this code in the probe driver function factor
out a new 'mt7621_pcie_init_ports' function to achieve this.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: avoid use of global variable 'pcie_link_status'
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:45 +0000 (11:49 +0100)]
staging: mt7621-pci: avoid use of global variable 'pcie_link_status'

'pcie_link_status' is a global variable which is being used as a
mask to know which virtual bridges are or not enabled. Instead of
this extract a new 'mt7621_pcie_init_virtual_bridges' function where
a similar local variable is used for the same task. This allow us to
properly configure the virtual PCI-PCI bridges in configuration
registers of the mt7621 pci controller. For a correct initiation of
which is connected use 'enabled' field of 'mt7621_pcie_port' struct.
With this change driver probe function gets a bit cleaner and readable.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: factor out 'mt7621_pcie_enable_ports' function
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:44 +0000 (11:49 +0100)]
staging: mt7621-pci: factor out 'mt7621_pcie_enable_ports' function

Driver probe function check for a bit in 'pcie_link_status' for
enabling the pcie port or not. Instead of this add 'enabled' field
in 'mt7621_pcie_port' structure and check its value to achieve this
inside a new 'mt7621_pcie_enable_ports' function. The offsets for
the correct port are derived from the slot of the port. This field
'enabled' is properly initilized in 'mt7621_pcie_init_port'. Also
depending of the number of ports enabled we have to properly init
its registers taking into account that we will use virtual bridges
from zero to num_slots_enabled as follows:
    - Only one enabled -> only enable virtual bridge 0.
    - Two enabled -> enable virtual bridges 0 and 1.
    - Three enabled -> enable virtual bridges 0, 1 and 2.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: use dev_* functions instead of printk
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:43 +0000 (11:49 +0100)]
staging: mt7621-pci: use dev_* functions instead of printk

checkpatch script is complaining about the use of printk instead
of use more proper dev_* kernel functions. Replace all of them
removing warnings.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: use a trailing */ on a separate line
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:42 +0000 (11:49 +0100)]
staging: mt7621-pci: use a trailing */ on a separate line

Chackpatch script is compalining about one comment which
is not following the kernel style. Fix it.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: remap and use sysctl from device tree
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:41 +0000 (11:49 +0100)]
staging: mt7621-pci: remap and use sysctl from device tree

There are some pointer read and writes which can be replaced
properly using sysctl registers readed from device tree. Remap
sysctl registers and replace in proper places.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-dts: add sysctl registers base address to pcie
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:40 +0000 (11:49 +0100)]
staging: mt7621-dts: add sysctl registers base address to pcie

Add missing system control registers address in pcie node of
the device tree.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: rename 'mt7621_pcie_enable_port' into 'mt7621_pcie_init_port'
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:39 +0000 (11:49 +0100)]
staging: mt7621-pci: rename 'mt7621_pcie_enable_port' into 'mt7621_pcie_init_port'

Rename function 'mt7621_pcie_enable_port' with a name which is better
for what the function is really doing calling it 'mt7621_pcie_init_port'.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: debug port N_FTS inside 'mt7621_pcie_enable_port'
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:38 +0000 (11:49 +0100)]
staging: mt7621-pci: debug port N_FTS inside 'mt7621_pcie_enable_port'

Move debug for the port N_FTS from driver probe function to the more
appropiate one 'mt7621_pcie_enable_port'.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: factor out 'mt7621_enable_phy' function
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:37 +0000 (11:49 +0100)]
staging: mt7621-pci: factor out 'mt7621_enable_phy' function

Factor out a new function 'mt7621_enable_phy' for enabling the
pcie phy for each port and call it from 'mt7621_pcie_enable_port'.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: rewrite pcie phy related functions
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:36 +0000 (11:49 +0100)]
staging: mt7621-pci: rewrite pcie phy related functions

Function 'bypass_pipe_rst' and 'set_phy_for_ssc' can be
written in a cleaner way. Instead of use comments to see which
bits are the ones which are being enabled add new macros with
that information using BIT and GENMASK kernel macros. Avoid the
use of set_pcie_phy which is kind of dark and use new macros also
resetting and adding bits using bitwise operators directly in the
code. Now these function are offset-based on the port to use them
cleaner in driver probe functio and improving readability.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: reagroup reset related macros all together
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:35 +0000 (11:49 +0100)]
staging: mt7621-pci: reagroup reset related macros all together

Reset bits related macros are in different parts. Reagroup
all of them together to  improve readability.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: remove reset related unused macros
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:34 +0000 (11:49 +0100)]
staging: mt7621-pci: remove reset related unused macros

There are three macros which are not being used at all.
Remove them.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: remove two commented code lines
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:33 +0000 (11:49 +0100)]
staging: mt7621-pci: remove two commented code lines

This two lines whch are commented are not needed at all.
Remove them.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: remove GPL2+ text from license header
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:32 +0000 (11:49 +0100)]
staging: mt7621-pci: remove GPL2+ text from license header

This file has a valid SPDX license line added so reamining
GPL2+ boilerplate text is not needed at all. Remove it.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: remove [ASSERT|DEASSERT]_SYSRST_PCIE macros
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:31 +0000 (11:49 +0100)]
staging: mt7621-pci: remove [ASSERT|DEASSERT]_SYSRST_PCIE macros

Driver is using reset_control kernel API's to manage this so this
two macros are not needed anymore. Remove them.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: factor out 'mt7621_pcie_enable_port' function
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:30 +0000 (11:49 +0100)]
staging: mt7621-pci: factor out 'mt7621_pcie_enable_port' function

Driver probe function is a mess and shall be refactored a lot. At first
make use of assert and deassert control factoring out a new function
called 'mt7621_pcie_enable_port'.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: add two helpers for read and write pcie register ports
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:29 +0000 (11:49 +0100)]
staging: mt7621-pci: add two helpers for read and write pcie register ports

mt7621-pcie_port data structure has filed 'base' as the base address for
read and write related port registers. Create two inline functions
'pcie_port_read' and 'pcie_port_write' to make this task easier and
code more readable.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: replace return value if devm_pci_alloc_host_bridge call fails
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:28 +0000 (11:49 +0100)]
staging: mt7621-pci: replace return value if devm_pci_alloc_host_bridge call fails

Driver probe function calls 'devm_pci_alloc_host_bridge'. If this call fails
it is returning -ENODEV. Return -ENOMEM instead which is more accurate for
this.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: mt7621-pci: parse and init port data from device tree
Sergio Paracuellos [Sun, 4 Nov 2018 10:49:27 +0000 (11:49 +0100)]
staging: mt7621-pci: parse and init port data from device tree

Add initialization of each PCIe port reading and initializing
data using device tree.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: update wilc1000 driver maintainer ids
Ajay Singh [Wed, 7 Nov 2018 05:05:01 +0000 (05:05 +0000)]
staging: wilc1000: update wilc1000 driver maintainer ids

We would like to update the maintainer email id's for wilc1000 driver.

Signed-off-by: Aditya Shankar <aditya.shankar@microchip.com>
Signed-off-by: Ganesh Krishna <ganesh.krishna@microchip.com>
Signed-off-by: Adham Abozaeid <adham.abozaeid@microchip.com>
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: greybus: remove unmatched right bracket
Ioannis Valasakis [Fri, 9 Nov 2018 13:55:09 +0000 (13:55 +0000)]
staging: greybus: remove unmatched right bracket

Remove unmatched right bracket. Reported by uncrustify.

Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: greybus: remove comparison to BOOL
Ioannis Valasakis [Fri, 9 Nov 2018 13:54:57 +0000 (13:54 +0000)]
staging: greybus: remove comparison to BOOL

Remove two instances of a comparison to BOOL.
Reported by coccinelle.

Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: greybus: remove extra space before tab
Ioannis Valasakis [Fri, 9 Nov 2018 13:54:42 +0000 (13:54 +0000)]
staging: greybus: remove extra space before tab

Remove extra spaces before the tab character inside a comment section.
Reported by checkpatch.

Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: greybus: add extra space around OR operator
Ioannis Valasakis [Fri, 9 Nov 2018 13:54:36 +0000 (13:54 +0000)]
staging: greybus: add extra space around OR operator

Add extra spaces around the OR operator.
Reported by checkpatch.

Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: greybus: remove multiple blank lines
Ioannis Valasakis [Fri, 9 Nov 2018 13:54:30 +0000 (13:54 +0000)]
staging: greybus: remove multiple blank lines

Remove extra blank lines to conform with coding style.
Reported by checkpatch.

Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: greybus: remove space before tab
Ioannis Valasakis [Fri, 9 Nov 2018 13:54:23 +0000 (13:54 +0000)]
staging: greybus: remove space before tab

Remove extra space before a tab character.
Reported by checkpatch.

Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: greybus: remove multiple blank lines
Ioannis Valasakis [Fri, 9 Nov 2018 13:54:09 +0000 (13:54 +0000)]
staging: greybus: remove multiple blank lines

Remove continuous multiple blank lines.
Reported by checkpatch.

Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: greybus: correct SPDX License Identifier
Ioannis Valasakis [Fri, 9 Nov 2018 13:54:00 +0000 (13:54 +0000)]
staging: greybus: correct SPDX License Identifier

Replace SPDX License Identifier comments with C comments.
Reported by checkpatch.

Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: greybus: align arguments with parentheses
Ioannis Valasakis [Fri, 9 Nov 2018 13:53:54 +0000 (13:53 +0000)]
staging: greybus: align arguments with parentheses

Align arguments with the right side of the open left parentheses.
Reported by checkpatch.

Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: greybus: fix SPDX License Identifier
Ioannis Valasakis [Fri, 9 Nov 2018 13:53:46 +0000 (13:53 +0000)]
staging: greybus: fix SPDX License Identifier

Replace the SPDX identifier with standard C comment.
Reported by checkpatch.

Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: greybus: align parameters to parentheses
Ioannis Valasakis [Fri, 9 Nov 2018 13:53:31 +0000 (13:53 +0000)]
staging: greybus: align parameters to parentheses

Align parameters to the right side of the left parentheses
Reported by checkpatch.

Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: greybus: shorten comparison to NULL
Ioannis Valasakis [Fri, 9 Nov 2018 13:53:24 +0000 (13:53 +0000)]
staging: greybus: shorten comparison to NULL

Shorten pointer NULL check by simple truth test.
Reported by checkpatch.

Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: erofs: fix undefined LZ4_decompress_safe_partial()
Gao Xiang [Fri, 9 Nov 2018 16:07:50 +0000 (00:07 +0800)]
staging: erofs: fix undefined LZ4_decompress_safe_partial()

It needs an explicit LZ4 library dependency
if lz4 compression is enabled, found by kbuild randconfig.

Reported-by: kbuild test robot <lkp@intel.com>
Fixes: 05f9d4a0c8c4 ("staging: erofs: use the new LZ4_decompress_safe_partial()")
Signed-off-by: Gao Xiang <hsiangkao@aol.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: android: ion: Add per-heap counters
Alexey Skidanov [Tue, 9 Oct 2018 19:08:37 +0000 (22:08 +0300)]
staging: android: ion: Add per-heap counters

Heap statistics have been removed and currently even basics statistics
are missing.

This patch creates per heap debugfs directory /sys/kernel/debug/<heap_name>
and adds the following counters:
- the number of allocated buffers;
- the number of allocated bytes;
- the number of allocated bytes watermark.

Signed-off-by: Alexey Skidanov <alexey.skidanov@intel.com>
Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: davinci_vpfe: Remove multiple blank space
Irenge Jules Bashizi [Thu, 8 Nov 2018 22:00:29 +0000 (22:00 +0000)]
staging: davinci_vpfe: Remove multiple blank space

Remove multiple blank space complained by checkpatch

Signed-off-by: Irenge Jules Bashizi <jbi.octave@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: davinci_vpfe: Change to !format
Irenge Jules Bashizi [Thu, 8 Nov 2018 21:12:05 +0000 (21:12 +0000)]
staging: davinci_vpfe: Change to !format

Change from if(format==NULL) to if(!format) to remove checkpatch warning

Signed-off-by: Irenge Jules Bashizi <jbi.octave@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtlwifi: Add spaces for comments
Maya Nakamura [Thu, 8 Nov 2018 07:23:50 +0000 (23:23 -0800)]
staging: rtlwifi: Add spaces for comments

Add spaces before and after text in comments.

Signed-off-by: Maya Nakamura <m.maya.nakamura@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtlwifi: Remove empty comment
Maya Nakamura [Thu, 8 Nov 2018 07:22:18 +0000 (23:22 -0800)]
staging: rtlwifi: Remove empty comment

Remove a comment that does not contain any text.

Signed-off-by: Maya Nakamura <m.maya.nakamura@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtlwifi: Improve line endings
Maya Nakamura [Thu, 8 Nov 2018 07:21:40 +0000 (23:21 -0800)]
staging: rtlwifi: Improve line endings

Edit statements so that the line does not end with an assignment operator
or a parenthesis.

Signed-off-by: Maya Nakamura <m.maya.nakamura@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wlan-ng: reformatting in prism2mib.c to fit 80 character limit
Tim Collier [Wed, 7 Nov 2018 20:09:20 +0000 (20:09 +0000)]
staging: wlan-ng: reformatting in prism2mib.c to fit 80 character limit

Reformat lines over 80 characters in prism2mib.c to resolve "line over
80 characters" warnings reported by checkpatch.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wlan-ng: formatting change in cfg80211.c
Tim Collier [Wed, 7 Nov 2018 20:09:18 +0000 (20:09 +0000)]
staging: wlan-ng: formatting change in cfg80211.c

Resolve "line over 80 characters" warning reported by checkpatch by
splitting function header over 2 lines.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: emxx_udc: Added missing le16_to_cpu conversions
Carmeli Tamir [Wed, 7 Nov 2018 20:44:24 +0000 (15:44 -0500)]
staging: emxx_udc: Added missing le16_to_cpu conversions

Fixed sparse tool warnings due to missing convesion from
le16 to cpu endienness.

Signed-off-by: Carmeli Tamir <carmeli.tamir@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: emxx_udc: Added missing __iomem modifier to handle p_regs
Carmeli Tamir [Wed, 7 Nov 2018 20:44:23 +0000 (15:44 -0500)]
staging: emxx_udc: Added missing __iomem modifier to handle p_regs

Since in nbu2ss_drv_probe() p_regs is assigned from mmio_base, which is
marked as __iomem, p_regs also should be market with __iomem.

Signed-off-by: Carmeli Tamir <carmeli.tamir@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: emxx_udc: Added static modifier to udc_controller
Carmeli Tamir [Wed, 7 Nov 2018 20:44:22 +0000 (15:44 -0500)]
staging: emxx_udc: Added static modifier to udc_controller

Added static modifier to the udc_controller, since it's only
required within emxx_udc.c.

Signed-off-by: Carmeli Tamir <carmeli.tamir@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: olpc_dcon: olpc_dcon_xo_1.c: Switch to the gpio descriptor interface
Nishad Kamdar [Wed, 7 Nov 2018 12:48:54 +0000 (18:18 +0530)]
staging: olpc_dcon: olpc_dcon_xo_1.c: Switch to the gpio descriptor interface

Use the gpiod interface instead of the deprecated old non-descriptor
interface in olpc_dcon_xo_1.c.

Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: bcm2835-audio: interpolate audio delay
Mike Brady [Mon, 22 Oct 2018 19:17:08 +0000 (20:17 +0100)]
staging: bcm2835-audio: interpolate audio delay

When the BCM2835 audio output is used, userspace sees a jitter up to 10ms
in the audio position, aka "delay" -- the number of frames that must
be output before a new frame would be played.
Make this a bit nicer for userspace by interpolating the position
using the CPU clock.
The overhead is small -- an extra ktime_get() every time a GPU message
is sent -- and another call and a few calculations whenever the delay
is sought from userland.
At 48,000 frames per second, i.e. approximately 20 microseconds per
frame, it would take a clock inaccuracy of
20 microseconds in 10 milliseconds -- 2,000 parts per million --
to result in an inaccurate estimate, whereas
crystal- or resonator-based clocks typically have an
inaccuracy of 10s to 100s of parts per million.

Signed-off-by: Mike Brady <mikebrady@eircom.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: remove unused flags in handle_cfg_param()
Adham Abozaeid [Tue, 6 Nov 2018 00:01:17 +0000 (00:01 +0000)]
staging: wilc1000: remove unused flags in handle_cfg_param()

handle_cfg_param() receives a bit map that describes what to be changed.
Some of these bits flags aren't referred to from elsewhere and can be
removed.

Signed-off-by: Adham Abozaeid <adham.abozaeid@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: erofs: use the new LZ4_decompress_safe_partial()
Gao Xiang [Thu, 8 Nov 2018 04:00:36 +0000 (12:00 +0800)]
staging: erofs: use the new LZ4_decompress_safe_partial()

LZ4_decompress_safe_partial() can now decode exactly the nb of bytes
requested after the upstreamed commit 2209fda323e2 ("lib/lz4: update LZ4
decompressor module"), remove the erofs hacked lz4 decompression code.

A more cleaned compressor wrapper will be introduced in the subsequent
patches in order to prepare for supporting multiple compression algorithms.

Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agomedia: staging: tegra-vde: print long unsigned using %lu format specifier
Colin Ian King [Thu, 8 Nov 2018 11:02:24 +0000 (11:02 +0000)]
media: staging: tegra-vde: print long unsigned using %lu format specifier

The frame.flags & FLAG_B_FRAME is promoted to a long unsigned because
of the use of the BIT() macro when defining FLAG_B_FRAME and causing a
build warning. Fix this by using the %lu format specifer.

Cleans up warning:
drivers/staging/media/tegra-vde/tegra-vde.c:267:5: warning: format
specifies type 'int' but the argument has type 'unsigned long' [-Wformat]

Fixes: 42e764d05712 ("staging: tegravde: replace bit assignment with macro")
Cc: Ioannis Valasakis <code@wizofe.uk>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtlwifi: SET_RATE_ID inline no arg reuse
Cristian Sicilia [Sun, 4 Nov 2018 14:50:40 +0000 (15:50 +0100)]
staging: rtlwifi: SET_RATE_ID inline no arg reuse

The macro SET_RATE_ID is a definition in function
and undefined at end of function.
Make it as inline avoid the arg reuse for macro,
the name is changed in _rtl_rate_id, following the
same function pattern in the file.

Signed-off-by: Cristian Sicilia <sicilia.cristian@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vt6655: fix small typo
Yangtao Li [Mon, 5 Nov 2018 15:23:58 +0000 (10:23 -0500)]
staging: vt6655: fix small typo

Correct spelling mistakes of "Calculate"

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: rtl8712: fix small typo
Yangtao Li [Mon, 5 Nov 2018 15:31:21 +0000 (10:31 -0500)]
Staging: rtl8712: fix small typo

ture->true

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8723bs: fix small typo
Yangtao Li [Mon, 5 Nov 2018 15:34:33 +0000 (10:34 -0500)]
staging: rtl8723bs: fix small typo

ture->true

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: comedi: ni_labpc_common: Use insn->n in AO insn_write handler
Ian Abbott [Tue, 30 Oct 2018 17:23:54 +0000 (17:23 +0000)]
staging: comedi: ni_labpc_common: Use insn->n in AO insn_write handler

The `insn_write` handler for the AO subdevice (`labpc_ao_insn_write()`)
currently ignores `insn->n` (the number of samples to write) and assumes
a single sample is to be written.  But `insn->n` could be 0, meaning no
samples should be written, in which case `data[0]` is invalid.

Follow the usual Comedi guidelines and change `labpc_ao_insn_write()` to
write the specified number of samples.  This fixes the assumption that
`data[0]` is valid.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: comedi: cb_pcidda: Use insn->n in AO insn_write handler
Ian Abbott [Tue, 30 Oct 2018 14:44:16 +0000 (14:44 +0000)]
staging: comedi: cb_pcidda: Use insn->n in AO insn_write handler

The `insn_write` handler for the AO subdevice
(`cb_pcidda_ao_insn_write()`) currently ignores `insn->n` (the number of
samples to write) and assumes a single sample is to be written.  But
`insn->n` could be 0, meaning no samples should be written, in which
case `data[0]` is invalid.

Follow the usual Comedi guidelines and change
`cb_pcidda_ao_insn_write()` to write the specified number of samples.
This fixes the assumption that `data[0]` is valid.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: comedi: addi_apci_3501: Use insn->n in EEPROM insn_read handler
Ian Abbott [Wed, 31 Oct 2018 12:29:56 +0000 (12:29 +0000)]
staging: comedi: addi_apci_3501: Use insn->n in EEPROM insn_read handler

The `insn_read` handler for the EEPROM subdevice
(`apci3501_eeprom_insn_read()`) currently ignores `insn->n` (the number
of samples to be read) and assumes a single sample is to be read.  But
`insn->n` could be 0, meaning no samples should be read, in which case
`data[0]` ought not to be written.  (The comedi core at least ensures
that `data[0]` exists, but we should not rely on that.)

Following the usual Comedi guidelines and interpret `insn->n` as the
number of samples to be read, but only read the EEPROM location once and
make `insn->n` copies, as we don't expect the contents of the EEPROM
location to change between readings.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: comedi: Check length of INSN_CONFIG_TIMER_1 instruction
Ian Abbott [Tue, 30 Oct 2018 14:17:13 +0000 (14:17 +0000)]
staging: comedi: Check length of INSN_CONFIG_TIMER_1 instruction

The contents of the Comedi configuration instruction
`INSN_CONFIG_TIMER_1` instruction are not very well defined, but the one
driver that uses it (the "cb_pcidas64" driver for the PCI-DAS4020/12
card) assumes its `insn->n` is 5. Add a check in
`check_insn_config_length()` to verify that `insn->n` is correct for
this configuration instruction.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: comedi: cb_pcidas64: Use insn->n in EEPROM insn_read handler
Ian Abbott [Tue, 30 Oct 2018 14:17:12 +0000 (14:17 +0000)]
staging: comedi: cb_pcidas64: Use insn->n in EEPROM insn_read handler

The `insn_read` handler for the EEPROM subdevice (`eeprom_insn_read()`)
currently ignores `insn->n` (the number of samples to be read) and
assumes a single sample is to be read.  But `insn->n` could be 0,
meaning no samples should be read, in which case `data[0]` ought not to
be written.  (The comedi core at least ensures that `data[0]` exists,
but we should not rely on that.)

Follow the usual Comedi guidelines and interpret `insn->n` as the number
of samples to be read, but only read the EEPROM location once and make
`insn->n` copies, as we don't expect the contents of the EEPROM location
to change between readings.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: comedi: cb_pcidas64: Use insn->n in AO insn_write handler
Ian Abbott [Tue, 30 Oct 2018 14:17:11 +0000 (14:17 +0000)]
staging: comedi: cb_pcidas64: Use insn->n in AO insn_write handler

The `insn_write` handler for the AO subdevice (`ao_winsn()` currently
ignores `insn->n` (the number of samples to write) and assumes a single
sample is to be written.  But `insn->n` could be 0, meaning no samples
should be written, in which case `data[0]` is invalid.

Follow the usual Comedi guidelines and change `ao_winsn()` to write the
specified number of samples.  This fixes the assumption that `data[0]`
is valid.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vboxvideo: Use DRM_FB_HELPER_DEFAULT_OPS
Hans de Goede [Mon, 22 Oct 2018 14:57:50 +0000 (16:57 +0200)]
staging: vboxvideo: Use DRM_FB_HELPER_DEFAULT_OPS

Use DRM_FB_HELPER_DEFAULT_OPS rather then open-coding it.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vboxvideo: Drop DRM_MODE_FB_CMD define
Hans de Goede [Mon, 22 Oct 2018 14:57:49 +0000 (16:57 +0200)]
staging: vboxvideo: Drop DRM_MODE_FB_CMD define

This is a leftover from when the driver was out of tree and also build
against older kernels.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vboxvideo: Add myself as MODULE_AUTHOR
Hans de Goede [Mon, 22 Oct 2018 14:57:48 +0000 (16:57 +0200)]
staging: vboxvideo: Add myself as MODULE_AUTHOR

Add myself as MODULE_AUTHOR.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vboxvideo: Fixup some #ifdef-s
Hans de Goede [Mon, 22 Oct 2018 14:57:47 +0000 (16:57 +0200)]
staging: vboxvideo: Fixup some #ifdef-s

Add #ifdef CONFIG_PM_SLEEP around the suspend/hibernate functions.

Remove unnecessary #ifdef CONFIG_COMPAT, the .compat_ioctl member is
always available and if CONFIG_COMPAT is not set then drm_compat_ioctl
is defined to NULL.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vboxvideo: Use PCI_DEVICE() for our pci_id table
Hans de Goede [Mon, 22 Oct 2018 14:57:46 +0000 (16:57 +0200)]
staging: vboxvideo: Use PCI_DEVICE() for our pci_id table

Use PCI_DEVICE() for our pci_id table and also simplify the terminating
entry tio just "{ }".

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vboxvideo: Cleanup header use
Hans de Goede [Mon, 22 Oct 2018 14:57:45 +0000 (16:57 +0200)]
staging: vboxvideo: Cleanup header use

Stop adding -Iinclude/drm to the CFLAGS and stop using the obsolete
"include-all" drm/drmP.h header.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: cleanup long line in rtw_hal_xmit()
Michael Straube [Sat, 27 Oct 2018 20:28:50 +0000 (22:28 +0200)]
staging: rtl8188eu: cleanup long line in rtw_hal_xmit()

Cleanup a line over 80 characters in rtw_hal_xmit() by using
if(x) instead of if(x == true). Also clears a missing spaces
around '|' checkpatch issue.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: change return type of rtw_hal_xmit()
Michael Straube [Sat, 27 Oct 2018 20:28:49 +0000 (22:28 +0200)]
staging: rtl8188eu: change return type of rtw_hal_xmit()

The function rtw_hal_xmit() returns true or false.
Change the return type from s32 to bool.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: change return type of rtl8188eu_xmitframe_complete()
Michael Straube [Sat, 27 Oct 2018 20:28:48 +0000 (22:28 +0200)]
staging: rtl8188eu: change return type of rtl8188eu_xmitframe_complete()

The function rtl8188eu_xmitframe_complete() returns true or false.
Change the return type from s32 to bool.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: change type of a struct field
Michael Straube [Sat, 27 Oct 2018 20:28:47 +0000 (22:28 +0200)]
staging: rtl8188eu: change type of a struct field

The field enable of struct recv_reorder_ctrl is only used for boolean
values, so change the type from u8 to bool.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: remove unnecessary ternary operator
Michael Straube [Sat, 27 Oct 2018 20:28:46 +0000 (22:28 +0200)]
staging: rtl8188eu: remove unnecessary ternary operator

The field accept_addba_req of struct mlme_ext_info has type bool.
Use the value of accept_addba_req directly instead of the ternary
operator in an asignment.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: change type of is_cck_rate - style
Michael Straube [Sun, 21 Oct 2018 19:45:28 +0000 (21:45 +0200)]
staging: rtl8188eu: change type of is_cck_rate - style

The variable is_cck_rate is used for boolean values, so change the
type from u8 to bool. The initializations to zero and use of ternary
operator in the assignments are unnecessary, remove them as well.

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: rename variable isCCKrate - style
Michael Straube [Sun, 21 Oct 2018 19:45:27 +0000 (21:45 +0200)]
staging: rtl8188eu: rename variable isCCKrate - style

Rename the variable isCCKrate to avoid CamelCase.
isCCKrate -> is_cck_rate

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: rename variable Max_spatial_stream - style
Michael Straube [Sun, 21 Oct 2018 19:45:26 +0000 (21:45 +0200)]
staging: rtl8188eu: rename variable Max_spatial_stream - style

Rename the variable Max_spatial_stream to avoid CamelCase.
Max_spatial_stream -> max_spatial_stream

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: simplify odm_evm_db_to_percentage()
Michael Straube [Sun, 21 Oct 2018 19:45:25 +0000 (21:45 +0200)]
staging: rtl8188eu: simplify odm_evm_db_to_percentage()

Use clamp() to simplify code in 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: bcm2835-audio: update TODO
Nicolas Saenz Julienne [Wed, 17 Oct 2018 19:01:56 +0000 (21:01 +0200)]
staging: bcm2835-audio: update TODO

The following tasks were completed or not the right solution:

1/2- Not the proper solution, we should register a platform device in
vchiq the same way it's done with bcm2835-camera as commented here:
https://lkml.org/lkml/2018/10/16/1131

2/3- Fixed by Takashi Iwai here: https://lkml.org/lkml/2018/9/4/587

Also, adds a new task as per mailing list conversation.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: bcm2835-audio: rename platform_driver structure
Nicolas Saenz Julienne [Wed, 17 Oct 2018 19:01:55 +0000 (21:01 +0200)]
staging: bcm2835-audio: rename platform_driver structure

It was called bcm2835_alsa0_driver, that "0" didn't mean much.

Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: bcm2835-audio: more generic probe function name
Nicolas Saenz Julienne [Wed, 17 Oct 2018 19:01:54 +0000 (21:01 +0200)]
staging: bcm2835-audio: more generic probe function name

There will only be one probe function, there is no use for appendig
"_dt" the end of the name.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: bcm2835-audio: use anonymous union in struct vc_audio_msg
Nicolas Saenz Julienne [Wed, 17 Oct 2018 19:01:53 +0000 (21:01 +0200)]
staging: bcm2835-audio: use anonymous union in struct vc_audio_msg

In this case explicitly naming the union doesn't help overall code
comprehension and clutters it.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>