[PATCH -next] staging: axis-fifo: fix return value check in axis_fifo_probe()

2018-07-27 Thread Wei Yongjun
In case of error, the function device_create() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 4a965c5f89de ("staging: add driver for Xilinx AXI-Stream FIFO v4.1 IP core") Signed-off-by: Wei Yongjun --- drivers/staging/a

[PATCH] staging: fbtft: Replace mdelay() with msleep() and usleep_range()

2018-07-27 Thread Jia-Ju Bai
reset() and init_display() are never called in atomic context. They call mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep(). This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai --- drivers/staging/fbtft/fb_agm1264k

Re: [PATCH] staging: fbtft: Replace mdelay() with msleep() and usleep_range()

2018-07-27 Thread Andy Shevchenko
On Fri, Jul 27, 2018 at 12:21 PM, Jia-Ju Bai wrote: > reset() and init_display() are never called in atomic context. > They call mdelay() to busily wait, which is not necessary. > mdelay() can be replaced with msleep(). > gpio_set_value(par->gpio.reset, 0); > udelay(20); >

Re: [PATCH] staging: fbtft: Replace mdelay() with msleep() and usleep_range()

2018-07-27 Thread Jia-Ju Bai
On 2018/7/27 18:34, Andy Shevchenko wrote: On Fri, Jul 27, 2018 at 12:21 PM, Jia-Ju Bai wrote: reset() and init_display() are never called in atomic context. They call mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep(). gpio_set_value(par->gpio.r

[PATCH 0/2] staging: fsl-dpaa2: document nested structs as per kernel-doc

2018-07-27 Thread Ioana Ciornei
Document nested structs per kernel-doc requirements by moving all comments before the actual struct. Ioana Ciornei (2): staging: fsl-dpaa2/eth: document nested structs as per kernel-doc staging: fsl-dpaa2/ethsw: document nested structs as per kernel-doc drivers/staging/fsl-dpaa2/ethernet/dpk

[PATCH 1/2] staging: fsl-dpaa2/eth: document nested structs as per kernel-doc

2018-07-27 Thread Ioana Ciornei
Document nested structs per kernel-doc requirements by moving all comments before the actual struct. Signed-off-by: Ioana Ciornei --- drivers/staging/fsl-dpaa2/ethernet/dpkg.h | 70 ++- drivers/staging/fsl-dpaa2/ethernet/dpni.h | 145 ++ 2 files changed,

[PATCH 2/2] staging: fsl-dpaa2/ethsw: document nested structs as per kernel-doc

2018-07-27 Thread Ioana Ciornei
Document nested structs per kernel-doc requirements by moving all comments before the actual struct. Signed-off-by: Ioana Ciornei --- drivers/staging/fsl-dpaa2/ethsw/dpsw.h | 27 --- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/drivers/staging/fsl-dpaa2

Re: [linux-sunxi] [PATCH v6 4/8] media: platform: Add Cedrus VPU decoder driver

2018-07-27 Thread Jernej Škrabec
Hi! Dne sreda, 25. julij 2018 ob 12:02:52 CEST je Paul Kocialkowski napisal(a): > This introduces the Cedrus VPU driver that supports the VPU found in > Allwinner SoCs, also known as Video Engine. It is implemented through > a v4l2 m2m decoder device and a media device (used for media requests). >

[PATCH 1/2] staging: fsl-dpaa2/eth: Update default hash key

2018-07-27 Thread Ioana Radulescu
In our documentation, we claim to use a 5-tuple key for Rx hash distribution of flows. The code however configures a key composed of all supported header fields. Update the Rx hash key to contain only the documented fields: {IP src, IP dst, IP nextproto, L4 src, L4 dst}, which was the original int

[PATCH 2/2] staging: fsl-dpaa2/eth: Remove unused driver version

2018-07-27 Thread Ioana Radulescu
We never really used the driver version, so no point in keeping it around. Signed-off-by: Ioana Radulescu --- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 2 -- drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 1 - drivers/staging/fsl-dpaa2/ethernet/dpaa2-ethtool.c | 2 -- 3 files ch

[PATCH v2 0/2] staging: fsl-dpaa2: document nested structs as per kernel-doc

2018-07-27 Thread Ioana Ciornei
Document nested structs per kernel-doc requirements by moving all comments before the actual struct. Changes in v2: - remove comments of non-existent fields Ioana Ciornei (2): staging: fsl-dpaa2/eth: document nested structs as per kernel-doc staging: fsl-dpaa2/ethsw: document nested structs

[PATCH v2 1/2] staging: fsl-dpaa2/eth: document nested structs as per kernel-doc

2018-07-27 Thread Ioana Ciornei
Document nested structs per kernel-doc requirements by moving all comments before the actual struct. Signed-off-by: Ioana Ciornei --- Changes in v2: - remove comments of non-existent fields drivers/staging/fsl-dpaa2/ethernet/dpkg.h | 70 +++- drivers/staging/fsl-dpaa2/ethernet/dpn

[PATCH v2 2/2] staging: fsl-dpaa2/ethsw: document nested structs as per kernel-doc

2018-07-27 Thread Ioana Ciornei
Document nested structs per kernel-doc requirements by moving all comments before the actual struct. Signed-off-by: Ioana Ciornei --- Changes in v2: - none drivers/staging/fsl-dpaa2/ethsw/dpsw.h | 27 --- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/d

Re: [linux-sunxi] [PATCH v6 4/8] media: platform: Add Cedrus VPU decoder driver

2018-07-27 Thread Jernej Škrabec
Dne petek, 27. julij 2018 ob 16:03:41 CEST je Jernej Škrabec napisal(a): > Hi! > > Dne sreda, 25. julij 2018 ob 12:02:52 CEST je Paul Kocialkowski napisal(a): > > This introduces the Cedrus VPU driver that supports the VPU found in > > Allwinner SoCs, also known as Video Engine. It is implemented

Re: [PATCH 06/10] staging: gasket: sysfs: convert to standard logging

2018-07-27 Thread Greg Kroah-Hartman
On Thu, Jul 26, 2018 at 08:07:33PM -0700, Todd Poynor wrote: > From: Todd Poynor > > Drop gasket logging calls in favor of standard logging. > > Signed-off-by: Todd Poynor > --- > drivers/staging/gasket/gasket_sysfs.c | 73 +-- > 1 file changed, 35 insertions(+), 38 del

Re: [PATCH 01/10] staging: gasket: save struct device for a gasket device

2018-07-27 Thread Greg Kroah-Hartman
On Thu, Jul 26, 2018 at 08:07:28PM -0700, Todd Poynor wrote: > From: Todd Poynor > > Save the struct device pointer to a gasket device in gasket's metadata, > to facilitate use of standard logging calls and in anticipation of > non-PCI gasket devices in the future. > > Signed-off-by: Todd Poynor

Re: [PATCH v2 2/3] Staging: octeon-usb: Change coding style of CVMX_WAIT_FOR_FIELD32 marco.

2018-07-27 Thread Greg Kroah-Hartman
On Thu, Jul 26, 2018 at 06:41:52PM +0300, Georgios Tsotsos wrote: > Fixing coding style for CVMX_WAIT_FOR_FIELD32 was confusing. Also > encapsulates into parentheses timeout_usec. > > Signed-off-by: Georgios Tsotsos > --- > drivers/staging/octeon-usb/octeon-hcd.c | 44 > +---

[PATCH] staging: mt7621-mmc: Use BIT macro instead of explicit shifting in board.h

2018-07-27 Thread Nishad Kamdar
Replace explicit shifting with BIT macro in board.h. Issue found by checkpatch. Signed-off-by: Nishad Kamdar --- drivers/staging/mt7621-mmc/board.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/mt7621-mmc/board.h b/drivers/staging/mt7621-mmc/board.h

Re: [PATCH 0/6] lib/crc32: treewide: Use existing define with polynomial

2018-07-27 Thread Herbert Xu
On Tue, Jul 17, 2018 at 06:05:35PM +0200, Krzysztof Kozlowski wrote: > Hi, > > Kernel defines same polynomial for CRC-32 in few places. > This is unnecessary duplication of the same value. Also this might > be error-prone for future code - every driver will define the > polynomial again. > > This

[PATCH 06/20] staging:rtl8192u: Rename bAddBaReqInProgress - Style

2018-07-27 Thread John Whitmore
Rename the member variable bAddBaReqInProgress to add_ba_req_in_progress This change clears the checkpatch issue with CamelCase naming. Changes are purely coding style and should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819

[PATCH 05/20] staging:rtl8192u: Rename TxAdmittedBARecord - Style

2018-07-27 Thread John Whitmore
Rename the member variable TxAdmittedBARecord to tx_admitted_ba_record This change clears the checkpatch issue with CamelCase naming. The resulting changes are purely coding style changes which should not impact runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/i

[PATCH 00/20] staging:rtl8192u Header file cleanup - Style

2018-07-27 Thread John Whitmore
Coding style cleanup of drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h The only checkpatch issues which remain are three 'questionable' comments which extend over the 80 character line limit. The changes are generally either removal of typedef directives, removal of unused constants or renaming

[PATCH 03/20] staging:rtl8192u: Rename TxCurSeq - Style

2018-07-27 Thread John Whitmore
Rename the member variable TxCurSeq to tx_cur_seq. This change clears the checkpatch issue with CamelCase naming. The changes are coding style changes which should not impact runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c | 4 ++-- d

[PATCH 01/20] staging:rtl8192u: Remove typedef and rename TX_TS_RECORD - Style

2018-07-27 Thread John Whitmore
Remove the typdef from structure TX_TS_RECORD and rename to tx_ts_record. The removal of the typedef clears the checkpatch issue with creating new types in code. The name change, whilst not specifically flagged by checkpatch, is an issue since types are meant to be named in lowercase. These change

[PATCH 07/20] staging:rtl8192u: Rename bAddBaReqDelayed - Style

2018-07-27 Thread John Whitmore
Rename the member variable bAddBaReqDelayed to add_ba_req_delayed This change clears the checkpatch issue with CamelCase naming. The resulting changes are purely coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u

[PATCH 04/20] staging:rtl8192u: Rename TxPendingBARecord - Style

2018-07-27 Thread John Whitmore
Rename the member variable TxPendingBARecord to tx_pending_ba_record. This change clears the checkpatch issue with CamelCase naming. The changes are purely coding style changes and should not impact runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl8

[PATCH 09/20] staging:rtl8192u: Rename TsAddBaTimer - Style

2018-07-27 Thread John Whitmore
Rename the member variable TsAddBaTimer to ts_add_ba_timer. This change clears the checkpatch issue with CamelCase naming. The resulting changes are coding style in nature and as such should not have any impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u

[PATCH 11/20] staging:rtl8192u: Remove commented out code - Style

2018-07-27 Thread John Whitmore
Remove commented out sections of code, specifically for a structure, QOS_DL_RECORD, which no longer exists in the module. This change is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h

[PATCH 02/20] staging:rtl8192u: Rename TsCommonInfo - Style

2018-07-27 Thread John Whitmore
Rename the member variable TsCommonInfo in two structures, both tx_ts_record and RX_TS_RECORD. This member variable is used in both structures and in both cases causes a checkpatch issue with CamelCase naming. The changes are purely coding style and should not impact runtime code execution. Signe

[PATCH 10/20] staging:rtl8192u: Remove typedef and rename RX_TS_RECORD - Style

2018-07-27 Thread John Whitmore
Remove the typedef from structure RX_TS_RECORD, this change clears the checkpatch issue with creation of new types. Additionally the structure is renamed from RX_TS_RECORD to rx_ts_record. Whilst this is not raised as a checkpatch error structures are meant to be named in lower case. These change

[PATCH 15/20] staging:rtl8192u: Rename RxPendingPktList - Style

2018-07-27 Thread John Whitmore
Rename the member variable RxPendingPktList to rx_pending_pkt_list. This change resolves the checkpatch issue with CamelCase naming. The resulting changes are purely coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8

[PATCH 18/20] staging:rtl8192u: Rename RxLastSeqNum - Style

2018-07-27 Thread John Whitmore
Rename the member variable RxLastSeqNum to rx_last_seq_num. This change clears the checkpatch issue with CamelCase naming. The resulting changes are purely coding style in nature so should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80

[PATCH 17/20] staging:rtl8192u: Rename RxAdmittedBARecord - Style

2018-07-27 Thread John Whitmore
Rename the member variable RxAdmittedBARecord to rx_admitted_ba_record. This change clears the checkpatch issue with CamelCase naming. The resulting changes are coding style in nature and as such should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/r

[PATCH 20/20] staging:rtl8192u: Remove blank line - Style

2018-07-27 Thread John Whitmore
Remove a blank line to clear the checkpatch issue with use of multiple blank lines. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h | 1 - 1 file changed, 1 deletion(-) diff --

[PATCH 14/20] staging:rtl8192u: Rename RxTimeoutIndicateSeq _Style

2018-07-27 Thread John Whitmore
Rename member variable RxTimeoutIndicateSeq to rx_timeout_indicate_seq. This change clears the checkpatch issue with CamelCase naming. The resulting changes are purely coding style in nature and should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rt

[PATCH 13/20] staging:rtl8192u: Rename RxIndicateSeq - Style

2018-07-27 Thread John Whitmore
Rename the member variable RxIndicateSeq to rx_indicate_seq. This change clears the checkpatch issue with CamelCase naming. The resulting changes are purely coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- .../staging/rtl8192u/ieee8021

[PATCH 16/20] staging:rtl8192u: Rename RxPktPendingTimer - Style

2018-07-27 Thread John Whitmore
Rename the member variable RxPktPendingTimer to rx_pkt_pending_timer. This change clears the checkpatch issue with CamelCase naming. The resulting changes are coding style changes in nature so should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8

[PATCH 19/20] staging:rtl8192u: Rename RxLastFragNum - Style

2018-07-27 Thread John Whitmore
Rename the member variable RxLastFragNum to rx_last_frag_num. This change clears the checkpatch issue with CamelCase naming. The resulting edits are all coding style changes which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee8021

[PATCH 12/20] staging:rtl8192u: Remove unused timer values - Style

2018-07-27 Thread John Whitmore
Remove the unused timer constants TS_SETUP_TIMEOUT and TS_INACT_TIMEOUT as neither are used in code. This is a style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h | 3 +-- 1 file changed, 1 insertio

[PATCH 08/20] staging:rtl8192u: Rename bUsingBa - Style

2018-07-27 Thread John Whitmore
Rename the member variable bUsingBa to using_ba. This change clears the checkpatch issue with CamelCase naming. The resulting changes are purely coding style and should not impact runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c | 4 ++

[PATCH v5 16/18] staging: mt7621-dts: add pcie controller port registers

2018-07-27 Thread Sergio Paracuellos
The pcie node of the device tree only contains registers for the host-bridge and pcie port 0. Add the pcie port 1 and pcie port 2 also. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-dts/mt7621.dtsi | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/s

[PATCH v5 02/18] staging: mt7621-pci: remove dead code derived to not use custom reads and writes

2018-07-27 Thread Sergio Paracuellos
Driver is using now pci subsystem generics reads and writes and requesting bus resources without using legacy code functions. Because of this there is a lot of dead code that can be removed. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 171 +

[PATCH v5 08/18] staging: mt7621-pci: avoid register duplication per controller using pcie_[read|write]

2018-07-27 Thread Sergio Paracuellos
Use pcie_[read|write] fucntions to read and write controller registers. Define those only by offset and pass controller offset + register offset relative to base address to functions. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 62 -

[PATCH v5 09/18] staging: mt7621-pci: review includes putting them in alphabethic order

2018-07-27 Thread Sergio Paracuellos
There are some includes that are being used that are not really needed to correct driver compilation. Remove them and reorder the rest alphabetically. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 22 -- 1 file changed, 8 insertions(+), 14 de

[PATCH v5 03/18] staging: mt7621-pci: add pcie_write and pcie_read helpers

2018-07-27 Thread Sergio Paracuellos
Introdice this functions to make easier to write/read to/from an offset relative to base address Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/stagin

[PATCH v5 12/18] staging: mt7621-pci: use BIT macro in preprocessor definitions

2018-07-27 Thread Sergio Paracuellos
Some preprocessor definitions are using a custom implementation of BIT macro. Just use linux kernel BIT macro instead. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/

[PATCH v5 07/18] staging: mt7621-pci: remove unused macros

2018-07-27 Thread Sergio Paracuellos
There some macros that are not being used. Remove them. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 29 + 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt762

[PATCH v5 14/18] staging: mt7621-pci: remove remaining pci_legacy dependant code

2018-07-27 Thread Sergio Paracuellos
pcibios_* remaining code is not neccessary at all. We are mapping irq using of_irq_parse_and_map_pci and swizzle_irq which are set in driver 'probe' function. Remove this code. No kernel config option CONFIG_PCI_DRIVERS_LEGACY should be included anymore. Signed-off-by: Sergio Paracuellos --- dri

[PATCH v5 00/18] staging: mt7621-pci: avoid custom pci config read and writes

2018-07-27 Thread Sergio Paracuellos
This patch series include an attempt to avoid the use of custom read and writes in driver code and use PCI subsystem common ones. In order to do this 'map_bus' callback is implemented and also data structures for driver are included. The regs base address is being readed from device tree and the d

[PATCH v5 06/18] staging: mt7621-pci: simplify write_config function

2018-07-27 Thread Sergio Paracuellos
write_config function is always called with bus and func being 0. Avoid those params and just use 0 inside the function. Review parameter types changing for more proper ones. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 20 +--- 1 file changed,

[PATCH v5 10/18] staging: mt7621-pci: use pcie_[read|write] in RALINK_PCI_PCICFG_ADDR and RALINK_PCI_PCIMSK_ADDR

2018-07-27 Thread Sergio Paracuellos
RALINK_PCI_PCICFG_ADDR and RALINK_PCI_PCIMSK_ADDR are defined to be directly referenced for read and write. Use pcie_read and pcie_write instead changing its definition to a simple relative offset to pcie base address. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c

[PATCH v5 05/18] staging: mt7621-pci: simplify read_config function

2018-07-27 Thread Sergio Paracuellos
read_config function is always called with bus and func being 0. Avoid those params and just use 0 inside the function. Return readed value instead pass a reference parameter. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 32 +++- 1 f

[PATCH v5 04/18] staging: mt7621-pci: use pcie_[read|write] in [write|read]_config

2018-07-27 Thread Sergio Paracuellos
Instead of custom macros use pcie_read and pcie_write functions. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 67 - 1 file changed, 32 insertions(+), 35 deletions(-) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/driver

[PATCH v5 15/18] staging: mt7621-pci: add Kconfig file for mt7621 pci controller

2018-07-27 Thread Sergio Paracuellos
The driver is not using PCI_LEGACY code anymore and shall use the PCI_DRIVERS_GENERIC option to correct compile it. Add new Kconfig file for this controller setting there its correct dependencies. Signed-off-by: Sergio Paracuellos --- drivers/staging/Kconfig| 2 ++ drivers/staging/mt

[PATCH v5 01/18] staging: mt7621-pci: use generic kernel pci subsystem read and write

2018-07-27 Thread Sergio Paracuellos
map_bus callback is called before every .read/.write operation. Implement it and change custom read write operations for the pci subsystem generics. Make the probe function to don't use legacy stuff and request bus resources directly. Get pci register base from device tree. Signed-off-by: Sergio P

[PATCH v5 13/18] staging: mt7621-pci: rename RALINK_PCI_CONFIG_DATA_VIRTUAL_REG definition

2018-07-27 Thread Sergio Paracuellos
RALINK_PCI_CONFIG_DATA_VIRTUAL_REG is a very long name. Make it a bit shorter renaming it to RALINK_PCI_CONFIG_DATA. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/mt7621-pc

[PATCH v5 11/18] staging: mt7621-pci: remove RALINK_PCI_BASE from remaining definitions

2018-07-27 Thread Sergio Paracuellos
RALINK_PCI_BASE has no sense and this driver has base address readed and mapped from device tree. Remove remaining uses of it and change code to use pcie_read and pcie_write functions in places where this was being used. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621

[PATCH v5 03/16] staging: mt7621-pci: add pcie_write and pcie_read helpers

2018-07-27 Thread Sergio Paracuellos
Introdice this functions to make easier to write/read to/from an offset relative to base address Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/stagin

[PATCH v5 02/16] staging: mt7621-pci: remove dead code derived to not use custom reads and writes

2018-07-27 Thread Sergio Paracuellos
Driver is using now pci subsystem generics reads and writes and requesting bus resources without using legacy code functions. Because of this there is a lot of dead code that can be removed. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 171 +

[PATCH v5 07/16] staging: mt7621-pci: remove unused macros

2018-07-27 Thread Sergio Paracuellos
There some macros that are not being used. Remove them. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 29 + 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt762

[PATCH v5 04/16] staging: mt7621-pci: use pcie_[read|write] in [write|read]_config

2018-07-27 Thread Sergio Paracuellos
Instead of custom macros use pcie_read and pcie_write functions. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 67 - 1 file changed, 32 insertions(+), 35 deletions(-) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/driver

[PATCH v5 05/16] staging: mt7621-pci: simplify read_config function

2018-07-27 Thread Sergio Paracuellos
read_config function is always called with bus and func being 0. Avoid those params and just use 0 inside the function. Return readed value instead pass a reference parameter. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 32 +++- 1 f

[PATCH v5 08/16] staging: mt7621-pci: avoid register duplication per controller using pcie_[read|write]

2018-07-27 Thread Sergio Paracuellos
Use pcie_[read|write] fucntions to read and write controller registers. Define those only by offset and pass controller offset + register offset relative to base address to functions. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 62 -

[PATCH v5 06/16] staging: mt7621-pci: simplify write_config function

2018-07-27 Thread Sergio Paracuellos
write_config function is always called with bus and func being 0. Avoid those params and just use 0 inside the function. Review parameter types changing for more proper ones. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 20 +--- 1 file changed,

[PATCH v5 12/16] staging: mt7621-pci: use BIT macro in preprocessor definitions

2018-07-27 Thread Sergio Paracuellos
Some preprocessor definitions are using a custom implementation of BIT macro. Just use linux kernel BIT macro instead. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/

[PATCH v5 09/16] staging: mt7621-pci: review includes putting them in alphabethic order

2018-07-27 Thread Sergio Paracuellos
There are some includes that are being used that are not really needed to correct driver compilation. Remove them and reorder the rest alphabetically. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 22 -- 1 file changed, 8 insertions(+), 14 de

[PATCH v5 00/16] staging: mt7621-pci: avoid custom pci config read and writes

2018-07-27 Thread Sergio Paracuellos
This patch series include an attempt to avoid the use of custom read and writes in driver code and use PCI subsystem common ones. In order to do this 'map_bus' callback is implemented and also data structures for driver are included. The regs base address is being readed from device tree and the d

[PATCH v5 14/16] staging: mt7621-pci: remove remaining pci_legacy dependant code

2018-07-27 Thread Sergio Paracuellos
pcibios_* remaining code is not neccessary at all. We are mapping irq using of_irq_parse_and_map_pci and swizzle_irq which are set in driver 'probe' function. Remove this code. No kernel config option CONFIG_PCI_DRIVERS_LEGACY should be included anymore. Signed-off-by: Sergio Paracuellos --- dri

[PATCH v5 01/16] staging: mt7621-pci: use generic kernel pci subsystem read and write

2018-07-27 Thread Sergio Paracuellos
map_bus callback is called before every .read/.write operation. Implement it and change custom read write operations for the pci subsystem generics. Make the probe function to don't use legacy stuff and request bus resources directly. Get pci register base from device tree. Signed-off-by: Sergio P

[PATCH v5 16/16] staging: mt7621-dts: add pcie controller port registers

2018-07-27 Thread Sergio Paracuellos
The pcie node of the device tree only contains registers for the host-bridge and pcie port 0. Add the pcie port 1 and pcie port 2 also. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-dts/mt7621.dtsi | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/s

[PATCH v5 13/16] staging: mt7621-pci: rename RALINK_PCI_CONFIG_DATA_VIRTUAL_REG definition

2018-07-27 Thread Sergio Paracuellos
RALINK_PCI_CONFIG_DATA_VIRTUAL_REG is a very long name. Make it a bit shorter renaming it to RALINK_PCI_CONFIG_DATA. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/mt7621-pc

[PATCH v5 11/16] staging: mt7621-pci: remove RALINK_PCI_BASE from remaining definitions

2018-07-27 Thread Sergio Paracuellos
RALINK_PCI_BASE has no sense and this driver has base address readed and mapped from device tree. Remove remaining uses of it and change code to use pcie_read and pcie_write functions in places where this was being used. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621

[PATCH v5 10/16] staging: mt7621-pci: use pcie_[read|write] in RALINK_PCI_PCICFG_ADDR and RALINK_PCI_PCIMSK_ADDR

2018-07-27 Thread Sergio Paracuellos
RALINK_PCI_PCICFG_ADDR and RALINK_PCI_PCIMSK_ADDR are defined to be directly referenced for read and write. Use pcie_read and pcie_write instead changing its definition to a simple relative offset to pcie base address. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c

[PATCH v5 15/16] staging: mt7621-pci: add Kconfig file for mt7621 pci controller

2018-07-27 Thread Sergio Paracuellos
The driver is not using PCI_LEGACY code anymore and shall use the PCI_DRIVERS_GENERIC option to correct compile it. Add new Kconfig file for this controller setting there its correct dependencies. Signed-off-by: Sergio Paracuellos --- drivers/staging/Kconfig| 2 ++ drivers/staging/mt

[PATCH 02/10] staging:rtl8192u: Refactor use of enum dm_dig_sta_e - Style

2018-07-27 Thread John Whitmore
Refactor the use of the enumerated type dm_dig_sta_e, which is not actually used for type checking by the compiler. The enumerated type defines values for the enumeration, which are used by both dig_state and dig_highpwr_state, (members of the struct dig). Both of those variables were defined as b

[PATCH 00/10] staging:rtl8192u: Refactor enums r8192U_dm.h -Style

2018-07-27 Thread John Whitmore
What was intended as a clean up of the file drivers/staging/rtl8192u/r8192U_dm.h turned into refactoring of most of the enumerated types defined in the file. Most of the enumerated types were simply used to define a collection of constants, rather then actually using the types as enumerated types.

[PATCH 01/10] staging:rtl8192u: Remove unused DM_check_fsync_time_interval - Style

2018-07-27 Thread John Whitmore
Remove the unused definition for DM_check_fsync_time_interval. This is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U_dm.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/rtl8192

[PATCH 03/10] staging:rtl8192u: Refactor enum dm_ratr_sta_e usage - Style

2018-07-27 Thread John Whitmore
The enumerated type dm_ratr_sta_e was defined in the file drivers/staging/rtl8192u/r8192U_dm.h but never actually used in that file. The only variable which uses this enumerated type is 'ratr_state', a member variable of the _rate_adaptive structure defined in the file drivers/staging/rtl8192u/r819

[PATCH 09/10] staging:rtl8192u: Refactor enum dm_dig_cs_ratio_e - Style

2018-07-27 Thread John Whitmore
The enumerated type dm_dig_cs_ratio_e is never actually used as a type, but only as a collection of related constants. This is because the variables, which use the defined constant values, are defined as being of type u8 rather then enum dm_dig_cs_ratio_e. This omission negates the possibility of t

[PATCH 07/10] staging:rtl8192u: Refactor dm_dig_connect_e - Style

2018-07-27 Thread John Whitmore
The enumerated type dm_dig_connect_e is only used to group constant values, as the actual type is never used as the type for the variables which use the defined constants (cur_connect_state and pre_connect_state). These two member variables have had there defined types changed to properly reflect

[PATCH 05/10] staging:rtl8192u: Refactor enum dm_dig_alg_e - Style

2018-07-27 Thread John Whitmore
The enumerated type dm_dig_alg_e is only used by one variable in the code, 'dig_algorithm', a member variable of the structure dig. That member variable was defined to be of type 'u8' thus negating any advantage of the use of an enumerated type, (compiler type-checking). The type of the variable '

[PATCH 10/10] staging:rtl8192u: Refactor enum DM_CCK_Rx_Path_Method - Style

2018-07-27 Thread John Whitmore
The enumerated type DM_CCK_Rx_Path_Method is used as a container for constant definitions, rather then an enumerated type enabling compiler type checking. To correct this, the variable which uses the constants, defined by the enumeration, has had its type changed from a u8 to the enumeration. Addi

[PATCH 06/10] staging:rtl8192u: Remove unused enum dm_dig_dbg_e - Style

2018-07-27 Thread John Whitmore
The enumerated type dm_dig_dbg_e is never used in code so has simply been removed from the source code. this is a coding style change which should have no impact on runtime code execution. Signed-off-by: John Whitmore --- drivers/staging/rtl8192u/r8192U_dm.h | 6 -- 1 file changed, 6 deleti

[PATCH 04/10] staging:rtl8192u: Remove enum dm_dig_op_e

2018-07-27 Thread John Whitmore
Remove the enumerated type dm_dig_op_e. The type is only used as a parameter to the function dm_change_dynamic_initgain_thresh(), but that function is never referenced in the code at all. I would consider this to be a coding style change as the function is never referenced and as a result the enum

[PATCH 08/10] staging:rtl8192u: Refactor enum dm_dig_pd_th_e - Style

2018-07-27 Thread John Whitmore
The enumerated type dm_dig_pd_th_e is never actually used as the type for the two variables which use the constants, which the enumeration defines. This omission removes the possibility of taking advantage of compiler type checking. To correct this the two member variables, (curpd_thstate & prepd_

[staging:staging-next 561/563] drivers/staging/erofs/unzip_vle.h:221:2: note: in expansion of macro 'min'

2018-07-27 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-next head: 27cce7bc2f8154f3a3bebcf7f9923cd22477aef8 commit: 3883a79abd0227a214a5f84395d41eecdc84 [561/563] staging: erofs: introduce VLE decompression support config: m68k-allmodconfig (attached as .config) c

[PATCH 2/5] staging: gasket: apex: fixup undefined PCI class

2018-07-27 Thread Todd Poynor
From: Todd Poynor Apex chips with class 0 (PCI_CLASS_NOT_DEFINED) fixed up to PCI_CLASS_SYSTEM_OTHER to enable PCI resource assignments. Signed-off-by: Todd Poynor --- drivers/staging/gasket/apex_driver.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/staging/gasket/apex_dr

[PATCH 0/5] staging: gasket: fixes and cleanups

2018-07-27 Thread Todd Poynor
From: Todd Poynor The fun continues with gasket+apex: remove dead code and unnecessary stuff, fixup apex PCI class for devices that advertise class 0 (undefined), and make sure the struct device doesn't go away on us. Most of these from review comments of previous patch series. Todd Poynor (5):

[PATCH 4/5] staging: gasket: page table: remove code for "no dma_ops"

2018-07-27 Thread Todd Poynor
From: Todd Poynor Remove code with TODOs on it for working around apparent problems previously seen in a qemu environment where dma_ops was not set correctly. There is no user of this in the current code. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 2 +- drive

[PATCH 3/5] staging: gasket: sysfs: remove unnecessary NULL check on device ptr

2018-07-27 Thread Todd Poynor
From: Todd Poynor The device pointer passed into get_mapping() will never be NULL; the check is unnecessary. Reported-by: Greg Kroah-Hartman Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_sysfs.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/gasket/gask

[PATCH 1/5] staging: gasket: sysfs: remove check for refcount already zero

2018-07-27 Thread Todd Poynor
From: Todd Poynor Remove the check for refcount already zero, which shouldn't be necessary. Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_sysfs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/gasket/gasket_sysfs.c b/drivers/staging/gasket/gasket_sysfs.c i

[PATCH 5/5] staging: gasket: core: hold reference on device kobj while in use

2018-07-27 Thread Todd Poynor
From: Todd Poynor Hold a reference on the struct device kobject while a pointer to that device is in use by gasket. Reported-by: Greg Kroah-Hartman Signed-off-by: Todd Poynor --- drivers/staging/gasket/gasket_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers