OSDN Git Service

android-x86/kernel.git
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 years agostaging: bcm2835-audio: reorder variable declarations & remove trivial comments
Nicolas Saenz Julienne [Wed, 17 Oct 2018 19:01:52 +0000 (21:01 +0200)]
staging: bcm2835-audio: reorder variable declarations & remove trivial comments

When it comes to declaring variables it's preferred, when possible, to
use an inverted tree organization scheme.

Also, removes some comments that were useless.

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>
5 years agostaging: bcm2835-audio: don't initialize memory twice
Nicolas Saenz Julienne [Wed, 17 Oct 2018 19:01:51 +0000 (21:01 +0200)]
staging: bcm2835-audio: don't initialize memory twice

The memory is being allocated with devres_alloc(), wich ultimately uses
__GFP_ZERO to call kmalloc. We don't need to zero the memory area again
in bcm2835-audio.

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>
5 years agostaging: bcm2835-audio: unify FOURCC command definitions
Nicolas Saenz Julienne [Wed, 17 Oct 2018 19:01:50 +0000 (21:01 +0200)]
staging: bcm2835-audio: unify FOURCC command definitions

The device communicates with the audio core using FOURCC codes. The
driver was generating them using different macros/expressions. We now
use the same macro to create them and centralize all the definitions.

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>
5 years agostaging: rtlwifi: Modified the line ending with a parenthesis
Cristian Sicilia [Fri, 19 Oct 2018 18:29:33 +0000 (20:29 +0200)]
staging: rtlwifi: Modified the line ending with a parenthesis

This patch fixes two line ending with parenthesis, which did
not conform to the linux kernel coding style.

Signed-off-by: Cristian Sicilia <sicilia.cristian@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: wlan-ng: Fix a typo.
Rohit Sarkar [Tue, 6 Nov 2018 18:23:00 +0000 (23:53 +0530)]
staging: wlan-ng: Fix a typo.

"Exiting" instead of "Exitting"

Signed-off-by: Rohit Sarkar <rohitsarkar5398@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: sm750fb: Add spaces around '+'
Laís Pessine do Carmo [Wed, 7 Nov 2018 00:28:04 +0000 (22:28 -0200)]
staging: sm750fb: Add spaces around '+'

Add spaces around '+' to correct the following checkpath.pl warnings:

WARNING: line over 80 characters
+                       write_dpPort(accel, *(unsigned int *)(pSrcbuf + (j * 4)));

WARNING: line over 80 characters
+                       memcpy(ajRemain, pSrcbuf+ul4BytesPerScan, ulBytesRemain);

Signed-off-by: Laís Pessine do Carmo <laispc19@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8192u: rename struct name _rt_firmare_seg_container
Colin Ian King [Wed, 7 Nov 2018 10:39:32 +0000 (10:39 +0000)]
staging: rtl8192u: rename struct name _rt_firmare_seg_container

Rename struct _rt_firmare_seg_container to _fw_seg_container to match
the typedef name of this structure. Also removes the spelling mistake
of 'firmare'.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: speakup: clean up few indentation issues
Colin Ian King [Tue, 30 Oct 2018 11:09:59 +0000 (11:09 +0000)]
staging: speakup: clean up few indentation issues

Trivial fix to clean up indentation issues across the driver

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: xgifb: clean an indentation issue
Colin Ian King [Tue, 30 Oct 2018 11:17:20 +0000 (11:17 +0000)]
staging: xgifb: clean an indentation issue

Trivial fix to clean up an indentation issue

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: rtl8712: fix CamelCase in fw_priv struct
Robert Eshleman [Sun, 28 Oct 2018 03:47:00 +0000 (20:47 -0700)]
staging: rtl8712: fix CamelCase in fw_priv struct

Rename fields in fw_priv struct from CamelCase to snake_case.
Reported by checkpatch.

Signed-off-by: Robert Eshleman <bobbyeshleman@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agodrivers: staging: rtl*: fix spelling mistake "Orginial" -> "Original"
Colin Ian King [Mon, 15 Oct 2018 22:34:33 +0000 (23:34 +0100)]
drivers: staging: rtl*: fix spelling mistake "Orginial" -> "Original"

Trivial fix to common spelling mistakes in some rtl* drivers

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: ks7010: remove unnecessary blank line
Jeeeun Evans [Thu, 18 Oct 2018 11:41:01 +0000 (12:41 +0100)]
staging: ks7010: remove unnecessary blank line

Cleanup extra line found by checkpatch.pl

Signed-off-by: Jeeeun Evans <jeeeunevans@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: mt7621-mmc: Add blank line after declaration
Nícolas F. R. A. Prado [Wed, 7 Nov 2018 00:42:42 +0000 (22:42 -0200)]
staging: mt7621-mmc: Add blank line after declaration

Correct the following warning from checkpatch.pl:

WARNING: Missing a blank line after declarations
+ struct msdc_host *host = mmc_priv(mmc);
+ msdc_pm(state, (void *)host);

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@protonmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: goldfish: Add SPDX license identifier.
Rohit Sarkar [Wed, 7 Nov 2018 09:43:14 +0000 (15:13 +0530)]
staging: goldfish: Add SPDX license identifier.

Fix checkpatch warning by adding the SPDX license identifier.

Signed-off-by: Rohit Sarkar <rohitsarkar5398@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vboxvideo: Stop disabling/enabling accel support on master set / drop
Hans de Goede [Thu, 18 Oct 2018 15:03:33 +0000 (17:03 +0200)]
staging: vboxvideo: Stop disabling/enabling accel support on master set / drop

Userspace mode-setting (and thus also VESA) is not supported together with
modesetting. KMS userspace apps not properly marking the framebuffer as
dirty are also not supported.

So stop trying to accommodate this and simply enable accel
once at driver init.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vboxvideo: Change licence headers over to SPDX
Hans de Goede [Thu, 18 Oct 2018 15:03:32 +0000 (17:03 +0200)]
staging: vboxvideo: Change licence headers over to SPDX

All the files contain a MIT license header, replace this with:
SPDX-License-Identifier: MIT

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vboxvideo: Cleanup the comments
Hans de Goede [Thu, 18 Oct 2018 15:03:31 +0000 (17:03 +0200)]
staging: vboxvideo: Cleanup the comments

Some comments where still using docbook style comments, move these
either over to kerneldoc, or just make them regular comments.

Also remove a bunch of obsolete comments.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vboxvideo: Drop duplicate vbox_err.h file
Hans de Goede [Thu, 18 Oct 2018 15:03:30 +0000 (17:03 +0200)]
staging: vboxvideo: Drop duplicate vbox_err.h file

Switch to the more complete vbox_err.h file from include/linux which got
added with the merging of the vboxguest driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vboxvideo: Keep old mode when disable crtc
Hans de Goede [Thu, 18 Oct 2018 15:03:29 +0000 (17:03 +0200)]
staging: vboxvideo: Keep old mode when disable crtc

On DPMS off we get a call to vbx_crtc_atomic_disable, followed by
a call to vbox_primary_atomic_update, at which point crtc_state->enable
is 0 and crtc_state->mode has been zero-ed. On a 0 width/height
vbox_do_modeset() falls back to 640x480, so this causes the guest Window
(its "monitor") to resize to 640x480 (and become black).

This commit makes us not look at crtc_state->mode when crtc_state->enable
is not set, so that we keep the old mode and just make the window go black.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 years agostaging: vboxvideo: Stop accessing crtc_state->active
Hans de Goede [Thu, 18 Oct 2018 15:03:28 +0000 (17:03 +0200)]
staging: vboxvideo: Stop accessing crtc_state->active

Atomic modesetting drivers should never check crtc_state->active directly,
instead check crtc_state->enable.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>