Re: [PATCH v3 07/20] i2c: Remove depends on HAS_DMA in case of platform dependency

2018-04-18 Thread Wolfram Sang
On Tue, Apr 17, 2018 at 07:49:07PM +0200, Geert Uytterhoeven wrote: > Remove dependencies on HAS_DMA where a Kconfig symbol depends on another > symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". > In most cases this other symbol is an architecture or platform specific > symbol, or

[PATCH 05/22] staging: wilc1000: refactor add_key() to avoid duplicated code

2018-04-18 Thread Ajay Singh
Cleanup fixes by removing the duplicated code in actor add_key(). Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 64 --- 1 file changed, 23 insertions(+), 41 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/dri

[PATCH 01/22] staging: wilc1000: rename WILC_WFI_wep_key & WILC_WFI_wep_key_len

2018-04-18 Thread Ajay Singh
Cleanup patch to use lower case for variable name as per linux coding style. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 30 +++ drivers/staging/wilc1000/wilc_wfi_netdevice.h | 4 +-- 2 files changed, 17 insertions(+), 17 deletions(-

[PATCH 00/22] staging: wilc1000: cleanup patches to follow linux coding style

2018-04-18 Thread Ajay Singh
This patch series is based on top of "[PATCH 00/11] staging: wilc1000: fix for checkpatch and handled malloc memory properly" and its not applied yet.[1] In this series contains fixes to avoid the checkpatch reported issue. Also remove the multiple #define for same macros and changes to follow lin

[PATCH 02/22] staging: wilc1000: rename variable using datatype in their name in add_key()

2018-04-18 Thread Ajay Singh
Cleanup changes to use variable name as per linux coding style. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 32 +++ 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drive

[PATCH 03/22] staging: wilc1000: split add_key() to avoid line over 80 chars

2018-04-18 Thread Ajay Singh
Cleanup changes to fix 'line over 80 chars' issue found by checkpatch.pl script by spliting the function. Also make use of kzalloc() instead of kmalloc(). Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 108 +- 1 file changed, 64 insertions(+

[PATCH 07/22] staging: wilc1000: use sizeof(variable) for memory allocated to store key info

2018-04-18 Thread Ajay Singh
Changes to fix below checkpatch reported issues. CHECK: Prefer kmalloc(sizeof(*priv->wilc_gtk[idx])...) over kmalloc(sizeof(struct wilc_wfi_key)...) CHECK: Prefer kmalloc(sizeof(*priv->wilc_ptk[idx])...) over kmalloc(sizeof(struct wilc_wfi_key)...) Signed-off-by: Ajay Singh --- drivers/staging

[PATCH 14/22] staging: wilc1000: remove the use of goto label in spi_cmd_complete()

2018-04-18 Thread Ajay Singh
In spi_cmd_complete() remove the use of goto label '_error_'. Changes were done to avoid the use of '_' in label name. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_spi.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_spi.c

[PATCH 12/22] staging: wilc1000: remove multiple define used for MAX_SSID_LEN

2018-04-18 Thread Ajay Singh
Cleanup patch to have commonly used macro in common header file to avoid same defination in mulitple file. Removed MAX_SSID_LEN macro from coreconfigurator.h header as its already defined in wilc_wlan_if.h. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/coreconfigurator.h | 1 - 1 file c

[PATCH 04/22] staging: wilc1000: remove inner block {} and resetting of mode variable

2018-04-18 Thread Ajay Singh
Cleanup fixes to remove the uncessary inner block { /* */ } and setting of 'mode' variable. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 43 +++ 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_

[PATCH 11/22] staging: wilc1000: remove unused macros in wilc module

2018-04-18 Thread Ajay Singh
Cleanup patch to remove the macros which are defined by not used. Below mentioned macros are removed: SCAN_DONE SCAN_EVENT_DONE_ABORTED WILC_WFI_RX_INTR WILC_WFI_TX_INTR WILC_WFI_TIMEOUT WILC_WFI_DWELL_PASSIVE WILC_WFI_DWELL_ACTIVE MAX_SURVEY_RESULT_FRAG_SIZE SURVEY_RESULT_LENGTH NUM_BASIC_SWITCHES

[PATCH 15/22] staging: wilc1000: remove the use of goto label in wilc_spi_read_size()

2018-04-18 Thread Ajay Singh
In wilc_spi_read_size() remove the use of goto label '_fail_'. Changes are done to avoid the use of '_' in label name. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_spi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_spi.c b/dr

[PATCH 09/22] staging: wilc1000: rename WID_LOGTerminal_Switch to avoid camelCase

2018-04-18 Thread Ajay Singh
Fix 'Avoid camelCase' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan_if.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index e186509..f

[PATCH 06/22] staging: wilc1000: handle error condition in add_key() and remove auth_type variable

2018-04-18 Thread Ajay Singh
Added the code to return correct error code in add_key() and also removed 'auth_type' variable. Now passing diretly to function instead of using the 'auth_type' variable. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 52 --- 1 file changed,

[PATCH 13/22] staging: wilc1000: remove multiple define for mac connect and disconnect

2018-04-18 Thread Ajay Singh
Cleanup patch to have commonly used macro in common header file to avoid same defination in mulitple file. Removed MAC_CONNECTED & MAC_DISCONNECTED macro from coreconfigurator.h header. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/coreconfigurator.h | 3 --- 1 file changed, 3 deletions

[PATCH 18/22] staging: wilc1000: remove the use of goto label in wilc_init()

2018-04-18 Thread Ajay Singh
Added direct return in wilc_init() instead of goto label. Changes are done to avoid the use of '_' in label name. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/drivers/staging/wilc1

[PATCH 16/22] staging: wilc1000: remove the use of goto label in wilc_spi_read_int()

2018-04-18 Thread Ajay Singh
In wilc_spi_read_int() remove the use of goto label '_fail_'. Changes are done to avoid the use of '_' in label name. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_spi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_spi.c b/dri

[PATCH 10/22] staging: wilc1000: added identifiers name in function definations

2018-04-18 Thread Ajay Singh
Fix identifier names required for functions definition issues reported by checkpatch.pl script. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan.h | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.h

[PATCH 17/22] staging: wilc1000: remove goto label '_done_' in handle_listen_state_expired()

2018-04-18 Thread Ajay Singh
Remove the use of goto label '_done_' in handle_listen_state_expired(). Changes are done to avoid the use of '_' in label name. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/h

[PATCH 08/22] staging: wilc1000: fix line over 80 chars in change_station()

2018-04-18 Thread Ajay Singh
Fix 'line over 80 chars' issue found by checkpatch.pl script. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/

[PATCH 19/22] staging: wilc1000: rename goto label '_fail_' linux naming convension

2018-04-18 Thread Ajay Singh
Rename '_fail_' goto label to have name as per linux coding style. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 92 +-- drivers/staging/wilc1000/wilc_sdio.c | 84 drivers/staging/wilc1000/wilc_wlan.c | 16

[PATCH 21/22] staging: wilc1000: remove the use of goto label in wilc_spi_clear_int_ext()

2018-04-18 Thread Ajay Singh
Remove goto label '_fail_' used in wilc_spi_clear_int_ext(), to avoid the label name starting with '_'. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_spi.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/sta

[PATCH 20/22] staging: wilc1000: rename goto labels starting with '_' in wilc1000_wlan_init()

2018-04-18 Thread Ajay Singh
Rename goto labels starting with '_' in wilc1000_wlan_init() to follow linux coding style. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b

[PATCH 22/22] staging: wilc1000: rename pu32InactiveTime to avoid camelCase issue

2018-04-18 Thread Ajay Singh
Avoid camelCase issues found by checkpatch.pl script. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h index 035c537..

[PATCH] staging: media: davinci_vpfe: fix spin_lock/unlock imbalance

2018-04-18 Thread Gustavo A. R. Silva
It seems that this is a copy-paste error and that the proper variable to use in this particular case is video_out2 instead of video_out. Addresses-Coverity-ID: 1467961 ("Copy-paste error") Fixes: 45e46b3bbe18 ("[media] davinci: vpfe: dm365: resizer driver based on media framework") Signed-off-by:

Re: [cfs_trace_lock_tcd] BUG: unable to handle kernel NULL pointer dereference at 00000050

2018-04-18 Thread James Simmons
> Hello, > > FYI this happens in mainline kernel 4.17.0-rc1. > It looks like a new regression. > > [7.587002] lnet_selftest_init+0x2c4/0x5d9: > lnet_selftest_init at > drivers/staging/lustre/lnet/selftest/module.c:134 > [7.587002] ? lnet_s

Re: [cfs_trace_lock_tcd] BUG: unable to handle kernel NULL pointer dereference at 00000050

2018-04-18 Thread Fengguang Wu
Hi James, On Wed, Apr 18, 2018 at 02:59:15PM +0100, James Simmons wrote: Hello, FYI this happens in mainline kernel 4.17.0-rc1. It looks like a new regression. [7.587002] lnet_selftest_init+0x2c4/0x5d9: lnet_selftest_init at drivers/stagi

[PATCH 10/31] staging: mt7621-mmc: Remove unused field data_offset from msdc_hw

2018-04-18 Thread Christian Lütke-Stetzkamp
The data_offset field in msdc_hw is never used, so remove it. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/board.h | 1 - drivers/staging/mt7621-mmc/sd.c| 1 - 2 files changed, 2 deletions(-) diff --git a/drivers/staging/mt7621-mmc/board.h b/drivers/staging/mt762

[PATCH 00/31] staging: mt7621-mmc: Next cleanups

2018-04-18 Thread Christian Lütke-Stetzkamp
Here are the next cleanups for the mt7621-mmc driver. Most of them just remove some unused code, but there are also some other cleanups and fixes. This also changes the default to always using DMA for data transfer, if there are no performance issues with that, the non-DMA code will be removed in t

[PATCH 14/31] staging: mt7621-mmc: Start cleanup of msdc_dma_config

2018-04-18 Thread Christian Lütke-Stetzkamp
Currently the msdc_dma_config function has some variables, that are not needed, uses the macro msdc_init_bd that is only used here and does not use the for_each_sg iterator. That last fact could cause a bug if the scatterlist is chained. The function is changed to remove these things, but none of

[PATCH 09/31] staging: mt7621-mmc: Relax cpu while waiting for stable clock

2018-04-18 Thread Christian Lütke-Stetzkamp
Current code just busy waits with nop for clock becoming stable, relaxing the cpu here improves readability and portability and also removes a unnecessary difference with the mtk-sd driver. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/sd.c | 2 +- 1 file changed, 1 ins

[PATCH 28/31] staging: mt7621-mmc: Remove unused card_workqueue from msdc_host

2018-04-18 Thread Christian Lütke-Stetzkamp
The card_workqueue field of msdc_host is already if 0'd out and there are no references to it in the code (not even in unused code), so remove it. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/mt6575_sd.h | 4 1 file changed, 4 deletions(-) diff --git a/drivers/st

[PATCH 02/31] staging: mt7621-mmc: Remove unused field get_cd_status from msdc_hw

2018-04-18 Thread Christian Lütke-Stetzkamp
The get_cd_status() field of msdc_hw is never set and there is only one check for it being non zero, so it is deleted. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/board.h | 1 - drivers/staging/mt7621-mmc/sd.c| 15 +-- 2 files changed, 5 insertions(+)

[PATCH 18/31] staging: mt7621-mmc: Fix dma_map_sg may map to fever entries

2018-04-18 Thread Christian Lütke-Stetzkamp
The dma_map_sg function may merge several sglist entries into one, the return value has to be saved to consider that. The data->sg_count field is the position, where it should be saved, like it is done in other mmc host drivers. Also the count of mapped entries is needed for the dma setup. Signed-

[PATCH 01/31] staging: mt7621-mmc: Remove unused code from board.h

2018-04-18 Thread Christian Lütke-Stetzkamp
The board.h file contins lot of never used code, to clean up the driver, this code is removed. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/board.h | 50 -- 1 file changed, 50 deletions(-) diff --git a/drivers/staging/mt7621-mmc/boa

[PATCH 26/31] staging: mt7621:mmc: Remove unused field reserved from msdc_host

2018-04-18 Thread Christian Lütke-Stetzkamp
The reserved field of msdc_host is never used and msdc_host is also never exposed to hardware, so remove that field. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/mt6575_sd.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/mt7621-mmc/mt6575_sd.h b/dr

[PATCH 20/31] staging: mt7621-mmc: Correct datatypes for io and sanitize io access

2018-04-18 Thread Christian Lütke-Stetzkamp
Current code discard the address space information on the base address of the mmc controller, that causes sparse warnings. It uses the raw read write function, that is correct for the mips architecture (little endian), but for portability the non-raw function should be used. Also the clear/set bit

[PATCH 12/31] staging: mt7621-mmc: Remove unused field burstsz from msdc_dma

2018-04-18 Thread Christian Lütke-Stetzkamp
The burstsz field in msdc_dma is set to a constant value and later only used two times, using the constant directly in that places allows to remove the field and improves readability. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/mt6575_sd.h | 1 - drivers/staging/mt762

[PATCH 16/31] staging: mt7621-mmc: Remove flags from msdc_dma

2018-04-18 Thread Christian Lütke-Stetzkamp
The flags of msdc_dma are set to a constant value, so block and dword padding are disabled and checksum is enabled. By removing the field the code is easier to read and the difference to the mtk-sd driver is smaller. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/mt6575_

[PATCH 04/31] staging: mt7621-mmc: Remove unused field disable_cd_eirq

2018-04-18 Thread Christian Lütke-Stetzkamp
The disable_cd_eirq() field of msdc_hw is never set and only once checked for being non zero, so it is deleted. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/board.h | 3 --- drivers/staging/mt7621-mmc/sd.c| 22 +- 2 files changed, 9 insertions(

[PATCH 07/31] staging: mt7621-mmc: Refactor and rename msdc_reset to msdc_reset_hw

2018-04-18 Thread Christian Lütke-Stetzkamp
In the current code the hardware reset is realised via a macro and does only wait for a certain ammount of time for the controller to come out of reset state, but it should wait until it IS out of reset state. So it is refactored to improve this, it is also changed from a macro to a function and re

[PATCH 22/31] staging: mt7621-mmc: Refactor msdc_init_gpd_bd

2018-04-18 Thread Christian Lütke-Stetzkamp
The msdc_init_gpd_bd function is currently hard to read, because of old, commented out code and a while loop, where a for loop is much easier to read. Refactor it to make the code more readable. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/sd.c | 27 ---

[PATCH 06/31] staging: mt7621-mmc: Remove power callbacks from msdc_hw

2018-04-18 Thread Christian Lütke-Stetzkamp
The ext_power_on|off fields of msdc_hw are never set, and only once checked for not being zero, so they can just be removed. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/board.h | 4 drivers/staging/mt7621-mmc/sd.c| 10 ++ 2 files changed, 2 insertion

[PATCH 17/31] staging: mt7621-mmc: Remove unused field xfersz from msdc_dma

2018-04-18 Thread Christian Lütke-Stetzkamp
The xfersz field of msdc_dma is only set to host->xfer_size and this is also available at the (few) positions, where dma.xfersz is used, so it is removed. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/mt6575_sd.h | 1 - drivers/staging/mt7621-mmc/sd.c| 8 ---

[PATCH 08/31] staging: mt7621-mmc: Remove code for not existent config

2018-04-18 Thread Christian Lütke-Stetzkamp
The MT7621|7628_FPGA config flags are non existent in the tree, so code guarded by this flags can be removed. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/sd.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/staging/mt7621-mmc/s

[PATCH 13/31] staging: mt7621-mmc: Remove unused function msdc_dma_dump

2018-04-18 Thread Christian Lütke-Stetzkamp
The msdc_dma_dump function is disabled by a preprocessor macro, was only used in the msdc_dma_setup function. The code also contains no information about the device, it only dumps some memory for debug. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/sd.c | 61 ---

[PATCH 11/31] staging: mt7621-mmc: Remove multiple assignments

2018-04-18 Thread Christian Lütke-Stetzkamp
Fix checkpatch: multiple assignments should be avoided, to improve readability. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/sd.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/mt7621-mmc/sd.c b/drivers/staging/mt7621-mmc/sd.

[PATCH 19/31] staging: mt7621-mmc: Replace dma dir with mmc_get_dma_dir

2018-04-18 Thread Christian Lütke-Stetzkamp
Currently the dma direction is manually determined by the read status, there is a more portable function for it, mmc_get_dma_dir, use it. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/sd.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/driv

[PATCH 03/31] staging: mt7621-mmc: Remove unused field enable_cd_eirq from msdc_hw

2018-04-18 Thread Christian Lütke-Stetzkamp
The enable_cd_eirq() field of msdc_hw is never set and only once checked for not being zero, so it is removed. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/board.h | 1 - drivers/staging/mt7621-mmc/sd.c| 26 +++--- 2 files changed, 11 insertion

[PATCH 30/31] staging: mt7621-mmc: Remove unused field cmd_rsp_done of msdc_host

2018-04-18 Thread Christian Lütke-Stetzkamp
The cmd_rsp_done field of msdc_host is never used, so remove it. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/mt6575_sd.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/mt7621-mmc/mt6575_sd.h b/drivers/staging/mt7621-mmc/mt6575_sd.h index 3a56f1e3b

[PATCH 31/31] staging: mt7621-mmc: Remove unused field dma_addr of msdc_host

2018-04-18 Thread Christian Lütke-Stetzkamp
The dma_addr field of msdc_host is never used, so remove it. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/mt6575_sd.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/mt7621-mmc/mt6575_sd.h b/drivers/staging/mt7621-mmc/mt6575_sd.h index 43fb38975818.

[PATCH 27/31] staging: mt7621-mmc: Remove unused field dma_left_size of msdc_host

2018-04-18 Thread Christian Lütke-Stetzkamp
The dma_left_size field of msdc_host is never used, remove it. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/mt6575_sd.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/mt7621-mmc/mt6575_sd.h b/drivers/staging/mt7621-mmc/mt6575_sd.h index 0e2af724124

[PATCH 25/31] staging: mt7621-mmc: Remove unused field starttime from msdc_host

2018-04-18 Thread Christian Lütke-Stetzkamp
The starttime field of msdc_host is never used, remove it. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/mt6575_sd.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/mt7621-mmc/mt6575_sd.h b/drivers/staging/mt7621-mmc/mt6575_sd.h index 84bb2c4d7e85..8

[PATCH 29/31] staging: mt7621-mmc: Remove unused field cmd_r1b_done in msdc_host

2018-04-18 Thread Christian Lütke-Stetzkamp
The field cmd_r1b_done in msdc_host is unused, so remove it. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/mt6575_sd.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/mt7621-mmc/mt6575_sd.h b/drivers/staging/mt7621-mmc/mt6575_sd.h index 212d98746379.

[PATCH 05/31] staging: mt7621-mmc: Fix null pointer deref if ext sdio irq enabled

2018-04-18 Thread Christian Lütke-Stetzkamp
The enable|disable_sdio_irq() fields of msdc_hw are never set, so when they are called, they are null pointer. In case of the MSDC_EXT_SDIO_IRQ flag set in msdc0_hw, this happens. But because these fields are never set, they can simply be removed. Signed-off-by: Christian Lütke-Stetzkamp --- dri

[PATCH 23/31] staging: mt7621-mmc: Remove old references to tasklet

2018-04-18 Thread Christian Lütke-Stetzkamp
In the current code there are '#if 0' out references on using a tasklet instead of delayed_work. Removing these improves readability. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/mt6575_sd.h | 1 - drivers/staging/mt7621-mmc/sd.c| 23 --- 2

[PATCH 15/31] staging: mt7621-mmc: Remove unused fields from msdc_dma

2018-04-18 Thread Christian Lütke-Stetzkamp
The fields used_gpd|bd in struct msdc_dma are only set and reset, but never used, so remove them. The other removed fields are never used, so they were removed either. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/mt6575_sd.h | 17 - drivers/staging/mt76

[PATCH 24/31] staging: mt7621-mmc: Change default transfer mode to DMA

2018-04-18 Thread Christian Lütke-Stetzkamp
The current default transfer is to use DMA or not depending on the size of the data. The upstream driver mtk-sd uses DMA all times, change the standard mode here to DMA for testing, if there are any performance problems with DMA for small data sizes. If not, the option for transfer mode should be r

[PATCH 21/31] staging: mt7621-mmc: Add annotations about held locks

2018-04-18 Thread Christian Lütke-Stetzkamp
The functions msdc_command_resp and msdc_do_request are always called with the host->lock lock held. By adding annotations, sparse is informed about that. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/sd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/st

[PATCH] staging: mt7621-pci: Remove redundant owner assignment

2018-04-18 Thread Christian Lütke-Stetzkamp
Remove the owner assignment form the platform driver as platform_driver_register() already initializes the owner. Found using coccinelle. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-pci/pci-mt7621.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/mt7621

[PATCH] staging: mt7621-pinctrl: Remove redundant owner assignment

2018-04-18 Thread Christian Lütke-Stetzkamp
Remove the owner assignment form the platform driver as platform_driver_register() already initializes the owner. Found using coccinelle. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/stagin

[PATCH] staging: mt7621-spi: Remove redundant owner assignment

2018-04-18 Thread Christian Lütke-Stetzkamp
Remove the owner assignment form the platform driver as platform_driver_register() already initializes the owner. Found using coccinelle. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-spi/spi-mt7621.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/mt7621

Re: [cfs_trace_lock_tcd] BUG: KASAN: null-ptr-deref in cfs_trace_lock_tcd+0x25/0xeb

2018-04-18 Thread Linus Torvalds
Ugh, that lustre code is disgusting. I thought we were getting rid of it. Anyway, I started looking at why the stack trace is such an incredible mess, with lots of stale entries. The reason (well, _one_ reason) seems to be "ksocknal_startup". It has a 500-byte stack frame for some incomprehensib

Re: [cfs_trace_lock_tcd] BUG: KASAN: null-ptr-deref in cfs_trace_lock_tcd+0x25/0xeb

2018-04-18 Thread NeilBrown
On Wed, Apr 18 2018, Linus Torvalds wrote: > Ugh, that lustre code is disgusting. > > I thought we were getting rid of it. Lots of people seem to get value out of it. So we're trying to polish the code to make it less disgusting. This is just a little fall-out. The smoking gun is [6.528851

RE: [PATCH v2] storvsc: Set up correct queue depth values for IDE devices

2018-04-18 Thread Long Li
Hi Martin Can you take a look at the following patch? Long > > -Original Message- > > From: linux-kernel-ow...@vger.kernel.org > > On Behalf Of Long Li > > Sent: Thursday, March 22, 2018 2:47 PM > > To: KY Srinivasan ; Haiyang Zhang > > ; Stephen Hemminger > ; > > James E . J . Bottom

[PATCH v3 1/3] resource: Use list_head to link sibling resource

2018-04-18 Thread Baoquan He
The struct resource uses singly linked list to link siblings. It's not easy to do reverse iteration on sibling list. So replace it with list_head. And this makes codes in kernel/resource.c more readable after refactoring than pointer operation. Besides, type of member variables of struct resource

Re: [PATCH net-next] hv_netvsc: Add NetVSP v6 and v6.1 into version negotiation

2018-04-18 Thread David Miller
From: Haiyang Zhang Date: Tue, 17 Apr 2018 15:31:47 -0700 > From: Haiyang Zhang > > This patch adds the NetVSP v6 and 6.1 message structures, and includes > these versions into NetVSC/NetVSP version negotiation process. > > Signed-off-by: Haiyang Zhang Applied to net-next, thank you. ___

Re: [PATCH v2] storvsc: Set up correct queue depth values for IDE devices

2018-04-18 Thread Martin K. Petersen
Long, > Can you take a look at the following patch? >> > + max_sub_channels = >> > + (num_cpus - 1) / storvsc_vcpus_per_sub_channel; What happens if num_cpus = 1? -- Martin K. Petersen Oracle Linux Engineering ___ devel mailing list de

RE: [PATCH v2] storvsc: Set up correct queue depth values for IDE devices

2018-04-18 Thread Long Li
> Subject: Re: [PATCH v2] storvsc: Set up correct queue depth values for IDE > devices > > > Long, > > > Can you take a look at the following patch? > > >> > + max_sub_channels = > >> > +(num_cpus - 1) / storvsc_vcpus_per_sub_channel; > > What happens if num_cpus = 1? If num_c

[PATCH 02/21] staging: ks7010: remove not used enum in eap_packet header file

2018-04-18 Thread Sergio Paracuellos
This commit removes an anonymous enumerator inside eap_packet header file because it is not being used anymore. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/eap_packet.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/ks7010/eap_packet.h b/drivers/stagin

[PATCH 00/21] next cleanups

2018-04-18 Thread Sergio Paracuellos
Cleanups continue in this driver. This patch series includes - some function refactors - clean code which is not being used at all - some style fixes - includes review in driver files Sergio Paracuellos (21): staging: ks7010: remove struct ieee802_1x_eapol_key staging: ks7010: remove not

[PATCH 03/21] staging: ks7010: remove auxiliar zeros buffer in ks_wlan_get_encode

2018-04-18 Thread Sergio Paracuellos
This commit removes the local buffer zeros in ks_wlan_get_encode function. It also refactors related conditions in order to fill 'extra' output parameter of the function. Originally this zeros is just memset to zeros and only being used if drw->length is truncated to zero because of priv->reg.wep_k

[PATCH 01/21] staging: ks7010: remove struct ieee802_1x_eapol_key

2018-04-18 Thread Sergio Paracuellos
This commit removes ieee802_1x_eapol_key struct because it is not being used at all. It also removes definitions related to some fields of the removed struct. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/eap_packet.h | 41 - 1 file changed, 41

[PATCH 04/21] staging: ks7010: refactor ks_wlan_set_encode function

2018-04-18 Thread Sergio Paracuellos
This commit refactors ks_wlan_set_encode function to improve readability. It just removes level indentation in some paths as well as removes not needed conditions paths which was checked before. Changes are as follows: - (dwrq->length > MAX_KEY_SIZE) check has been moved to the top. - extra chec

[PATCH 13/21] staging: ks7010: removes data_buff field of ks_wlan_private struct

2018-04-18 Thread Sergio Paracuellos
This commit removes data_buff array field of ks_wlan_private which is not being used at all. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_wlan.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h index 31f8

[PATCH 19/21] staging: ks7010: align comments in ks_wlan_private_handler

2018-04-18 Thread Sergio Paracuellos
This commit align comment inside ks_wlan_private_handler WEXT private driver operations. This improves readability. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_wlan_net.c | 39 ++-- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git

[PATCH 14/21] staging: ks7010: review includes of ks_hostif file

2018-04-18 Thread Sergio Paracuellos
This commit reviews includes of ks_hostif.c source file. Those which are not being used at all have been removed. Driver header includes have been moved after the kernel header includes to make style consistent in different files of the driver. The need of ks_wlan.h header include is only because o

[PATCH 07/21] staging: ks7010: refactor ks_wlan_set_tx_gain function

2018-04-18 Thread Sergio Paracuellos
This commit refactors ks_wlan_set_rx_gain function to improve readability: - error condition is handling the error to avoid an 'else' - ternary operator is used to clean if-else block assignment. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_wlan_net.c | 11 +++

[PATCH 11/21] staging: ks7010: remove two fields of ks_wlan_private struct

2018-04-18 Thread Sergio Paracuellos
This commit removes l2_dev and l2_fd fields of ks_wlan_private struct because they are not being used at all. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_wlan.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_w

[PATCH 08/21] staging: ks7010: refactor ks_wlan_set_wps_enable function

2018-04-18 Thread Sergio Paracuellos
This commit refactors ks_wlan_set_wps_enable function to improve readability handling the error first to avoid an 'else'. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_wlan_net.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/ks7010/ks_

[PATCH 05/21] staging: ks7010: change if-else condition assignment to use ternary operator

2018-04-18 Thread Sergio Paracuellos
This commit changes an if-else block used to just assign a variable to use a ternary operator to do the same improving readability. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_wlan_net.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/k

[PATCH 20/21] staging: ks7010: use ARRAY_SIZE macro in ks_wlan_handler_def

2018-04-18 Thread Sergio Paracuellos
This commit make use of ARRAY_SIZE macro to set fields num_private and num_private_args of the iw_handler_def struct of the driver. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_wlan_net.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/

[PATCH 16/21] staging: ks7010: review includes of michael_mic.c file

2018-04-18 Thread Sergio Paracuellos
This commit reviews includes of michael_mic.c source file removing those which are not being used at all and reordering the remaining ones in alphabetically order. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/michael_mic.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-

[PATCH 15/21] staging: ks7010: review includes of ks7010_sdio file

2018-04-18 Thread Sergio Paracuellos
This commit reviews includes of ks7010_sdio.c source file removing those which are not being used at all. Kernel header includes have been ordered alphabetically also. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks7010_sdio.c | 8 +++- 1 file changed, 3 insertions(+), 5 dele

[PATCH 17/21] staging: ks7010: use IW_HANDLER macro in ks_wlan_handler

2018-04-18 Thread Sergio Paracuellos
This commit make use of IW_HANDLER to set wext operations of the device. Using this, comments are not neccessary anymore and also NULL entries so readability is clearly increased. In order to avoid casting because of the use of a different prototype in all related functions, those which are affecte

[PATCH 21/21] staging: ks7010: init local variables when they are declared in ks7010_sdio_probe

2018-04-18 Thread Sergio Paracuellos
This commit change init point of two variables to forward them to init time. This variables are just being assigned some lines after and it is more clear to init them when the init value is known and in this case this is known when they are declared. Signed-off-by: Sergio Paracuellos --- drivers

[PATCH 06/21] staging: ks7010: refactor ks_wlan_set_rx_gain function

2018-04-18 Thread Sergio Paracuellos
This commit refactors ks_wlan_set_rx_gain function to improve readability: - error condition is handling the error to avoid an 'else' - ternary operator is used to clean if-else block assignment. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_wlan_net.c | 11 +++

[PATCH 12/21] staging: ks7010: remove enum from ks_wlan.h header

2018-04-18 Thread Sergio Paracuellos
This commit removes an enum which is in ks_wlan.h and it is not being used at all. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_wlan.h | 8 1 file changed, 8 deletions(-) diff --git a/drivers/staging/ks7010/ks_wlan.h b/drivers/staging/ks7010/ks_wlan.h index 9ac3343..

[PATCH 10/21] staging: ks7010: review includes of ks_wlan.h file

2018-04-18 Thread Sergio Paracuellos
This commit reviews includes of ks_wlan.h header file. It removes those which are not being used at all. It also reorder remaining ones in alphabetical order. The linux/module.h include file has been moved to the correct file which is ks7010_sdio.c in order to be able to compile the driver without

[PATCH 18/21] staging: ks7010: remove KSC_OPNOTSUPP related code

2018-04-18 Thread Sergio Paracuellos
This commit reviews KSC_OPNOTSUPP related code. The preprocessor KSC_OPNOTSUPP is defined by default so related wext functions are not being used. Just clean code removing all of this stuff. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_wlan_net.c | 79 -

[PATCH 09/21] staging: ks7010: review includes of ks_wlan_net.c file

2018-04-18 Thread Sergio Paracuellos
This commit reviews really needed includes in ks_wlan_net.c source file. It removes those which are not needed at all. It also reorder the remaining ones in alphabetical order. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_wlan_net.c | 18 +++--- 1 file changed, 3 i

[PATCH] staging: speakup: separate 80+ chars lines.

2018-04-18 Thread Andrew Jye Shih Chuang
Increase readability of code following the Kernel coding style by breaking long lines and thus eliminating the checkpatch.pl warning. Signed-off-by: Andrew Jye Shih Chuang --- drivers/staging/speakup/main.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/driv