openwrt/staging/blogic.git
6 years agostaging: erofs: unzip_vle.c: Constant in comparison on right side
Cristian Sicilia [Mon, 12 Nov 2018 20:43:58 +0000 (21:43 +0100)]
staging: erofs: unzip_vle.c: Constant in comparison on right side

Comparisons should place the constant
on the right side of the test.

Signed-off-by: Cristian Sicilia <sicilia.cristian@gmail.com>
Reviewed-by: Gao Xiang <gaoxiang25@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: erofs: unzip_vle.c: Replace comparison to NULL.
Cristian Sicilia [Mon, 12 Nov 2018 20:43:57 +0000 (21:43 +0100)]
staging: erofs: unzip_vle.c: Replace comparison to NULL.

Replace equal to NULL with logic unary operator,
and removing not equal to NULL comparison.

Signed-off-by: Cristian Sicilia <sicilia.cristian@gmail.com>
Reviewed-by: Gao Xiang <gaoxiang25@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wlan-ng: remove unused variable in prism2fw.c
Tim Collier [Mon, 19 Nov 2018 08:41:31 +0000 (08:41 +0000)]
staging: wlan-ng: remove unused variable in prism2fw.c

Remove the unused crcend variable from the crcimage function.

Signed-off-by: Tim Collier <osdevtc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: emxx_udc: Fixing function naming
Cristian Sicilia [Fri, 16 Nov 2018 23:46:07 +0000 (00:46 +0100)]
staging: emxx_udc: Fixing function naming

Fix function naming and parenthesis.

Signed-off-by: Cristian Sicilia <sicilia.cristian@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: axis-fifo: Split line to stay in 80 characters.
Cristian Sicilia [Fri, 16 Nov 2018 23:24:49 +0000 (00:24 +0100)]
staging: axis-fifo: Split line to stay in 80 characters.

The line is split up to stay in 80 characters-

Signed-off-by: Cristian Sicilia <sicilia.cristian@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8723bs: Correct errors from checkpatch
Josenivaldo Benito Jr [Tue, 13 Nov 2018 01:57:16 +0000 (23:57 -0200)]
staging: rtl8723bs: Correct errors from checkpatch

Correct following errors reported by checkpath.pl:

ERROR: space required before the open parenthesis '(' #265: FILE:
drivers/staging/rtl8723bs/hal/rtl8723bs_recv.c:265:
+                       if(!precvframe) ')'

Also similar errors on line 274 and 283.

Signed-off-by: Josenivaldo Benito Jr <jrbenito@benito.qsl.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtlwifi: Add new line to stay in 80 characters
Cristian Sicilia [Tue, 13 Nov 2018 19:34:39 +0000 (20:34 +0100)]
staging: rtlwifi: Add new line to stay in 80 characters

The parameter is sent to next line to stay in 80
characters

Signed-off-by: Cristian Sicilia <sicilia.cristian@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtlwifi: Add spaces to match open parenthesis
Cristian Sicilia [Tue, 13 Nov 2018 19:34:38 +0000 (20:34 +0100)]
staging: rtlwifi: Add spaces to match open parenthesis

Added before parameters some spaces to match open parenthesis
on previous line.

Signed-off-by: Cristian Sicilia <sicilia.cristian@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: pi433: remove GPL boiler plate text
Michael Straube [Tue, 13 Nov 2018 17:13:40 +0000 (18:13 +0100)]
staging: pi433: remove GPL boiler plate text

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

All source and header files have SPDX identifiers.
Remove the GPL boiler plate text to reduce file size.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoRevert "staging: greybus: remove extra space before tab"
Greg Kroah-Hartman [Tue, 20 Nov 2018 09:37:04 +0000 (10:37 +0100)]
Revert "staging: greybus: remove extra space before tab"

This reverts commit 57d053682ff55aa16a390ddb054a26deb4dfbf9e.

Johan writes:
This commit doesn't even do what it claims. It leaves the two
spaces before tabs in place and instead removes a tab that was
used to indent a continuation line, and therefore also hurts
readability while introducing an inconsistency.

Reported-by: Johan Hovold <johan@kernel.org>
Cc: Ioannis Valasakis <code@wizofe.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoRevert "staging: greybus: remove multiple blank lines"
Greg Kroah-Hartman [Tue, 20 Nov 2018 09:35:12 +0000 (10:35 +0100)]
Revert "staging: greybus: remove multiple blank lines"

This reverts commit fcb733b546ea943dd2e312cc3b556159cb44345a.

Johan writes:
This patch removes the double newlines that were used as section
headers in the lengthy protocol header file, and therefore hurts
readability.

So I'm reverting it.

Reported-by: Johan Hovold <johan@kernel.org>
Cc: Ioannis Valasakis <code@wizofe.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename tsf_hi element of network_info struct
Ajay Singh [Mon, 12 Nov 2018 05:45:35 +0000 (05:45 +0000)]
staging: wilc1000: rename tsf_hi element of network_info struct

Rename 'tsf_hi' element in network_info struct as it's not used to store
only the higher 32-bit value but the complete 64-bit tsf value.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: use ENOBUFS error code instead of WILC_TX_ERR_NO_BUF macro
Ajay Singh [Mon, 12 Nov 2018 05:45:32 +0000 (05:45 +0000)]
staging: wilc1000: use ENOBUFS error code instead of WILC_TX_ERR_NO_BUF macro

Make use of 'ENOBUFS' instead of WILC_TX_ERR_NO_BUF macro. The value of
WILC_TX_ERR_NO_BUF is -2, which is confusing with ENOENT error code.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: added 'WILC_' prefix for constants to have clear namespace
Ajay Singh [Mon, 12 Nov 2018 05:45:29 +0000 (05:45 +0000)]
staging: wilc1000: added 'WILC_' prefix for constants to have clear namespace

For better namespace added 'WILC_' prefix for driver specific constants.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename firmware related constants to follow better namespace
Ajay Singh [Mon, 12 Nov 2018 05:45:26 +0000 (05:45 +0000)]
staging: wilc1000: rename firmware related constants to follow better namespace

Rename the firmware related macro by prefix with 'WILC_FW_' prefix for
a better namespace. Also, move them to wilc_wlan_if.h file along with other
FW related macros.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: move current_tx_rate enum to wilc_wlan_if.h file
Ajay Singh [Mon, 12 Nov 2018 05:45:23 +0000 (05:45 +0000)]
staging: wilc1000: move current_tx_rate enum to wilc_wlan_if.h file

Move 'current_tx_rate' enum to wilc_wlan_if.h, to have it along with the
other FW related to constants. Also added prefix to have a better
namespace.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: use proper namespace for macros in wilc_wlan_if.h header
Ajay Singh [Mon, 12 Nov 2018 05:45:20 +0000 (05:45 +0000)]
staging: wilc1000: use proper namespace for macros in wilc_wlan_if.h header

Rename the macros defined in wilc_wlan_if.h header to have clear
namespace. As convention used 'WILC_FW_' prefix for constants defined for
firmware and 'WILC_' prefix for driver constants.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: restructure macros used to handle security type
Ajay Singh [Mon, 12 Nov 2018 05:45:17 +0000 (05:45 +0000)]
staging: wilc1000: restructure macros used to handle security type

Restructure the code to have a proper namespace for macro defined to
handle the security types. Move them as part of wilc_wlan_if.h header as
along with other macro defined for firmware.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: use enum contants for mac status & added 'WILC_' prefix
Ajay Singh [Mon, 12 Nov 2018 05:45:14 +0000 (05:45 +0000)]
staging: wilc1000: use enum contants for mac status & added 'WILC_' prefix

Clubbed mac status constants inside the enum constant and also added
'WILC_' prefix to have better namespace.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: move sdio_cmd52 & sdio_cmd53 struct to source file
Ajay Singh [Mon, 12 Nov 2018 05:45:11 +0000 (05:45 +0000)]
staging: wilc1000: move sdio_cmd52 & sdio_cmd53 struct to source file

Moved sdio_cmd52 & sdio_cmd53 struct from wilc_wlan_if.h, as its used in
wilc_sdio.cfile.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: remove unused macros and struct members in host_interface.h
Ajay Singh [Mon, 12 Nov 2018 05:45:08 +0000 (05:45 +0000)]
staging: wilc1000: remove unused macros and struct members in host_interface.h

Cleanup patch to remove the unused macros and struct members in
host_interface.h header file.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: use WLAN_PMKID_LEN macro from ieee80211.h header
Ajay Singh [Mon, 12 Nov 2018 05:45:06 +0000 (05:45 +0000)]
staging: wilc1000: use WLAN_PMKID_LEN macro from ieee80211.h header

Make use of WLAN_PMKID_LEN macro provided by ieee80211.h header instead
of PMKID_LEN.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: use macro from ieee80211.h in register frame api's
Ajay Singh [Mon, 12 Nov 2018 05:45:03 +0000 (05:45 +0000)]
staging: wilc1000: use macro from ieee80211.h in register frame api's

Make use of ieee80211.h provided macros and removed the extra macro
defined for the same purpose.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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>