[RESEND PATCH 31/47] staging: ks7010: add blank line between after definitions

2018-05-03 Thread Sergio Paracuellos
Add blank line after definitions in hostif_aplist_init function to fix a checkpatch script complain about that. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.c | 1 + 1 file changed, 1 insertion(+) diff --git

[RESEND PATCH 29/47] staging: ks7010: factor out send_request_to_device function

2018-05-03 Thread Sergio Paracuellos
In all functions related with requests to the device the same patter in used and is also adding a comment to make clear the intention of the code. Just factor out the pattern into a new send_request_to_device function to improve readability and make clear code intention. Signed-off-by: Sergio

[RESEND PATCH 22/47] staging: ks7010: move two preprocessor definitions to ks_wlan.h

2018-05-03 Thread Sergio Paracuellos
In ks_wlan_translate_scan function there are two preprocessor definitions: - RSN_INFO_ELEM_ID - GENERIC_INFO_ELEM_ID These can be moved to common ks_wlan.h because they can be used in get_current_ap function instead of use hardcoded values. GENERIC_INFO_ELEM_ID has been renamed to

[RESEND PATCH 13/47] staging: ks7010: change local variable type in ks_wlan_hw_rx

2018-05-03 Thread Sergio Paracuellos
Local variable event in ks_wlan_hw_rx function is declared as unsigned short and can be declared as u16 which is preferred style. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks7010_sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[RESEND PATCH 17/47] staging: ks7010: conver MIB attributes preprocessor defs into an enum

2018-05-03 Thread Sergio Paracuellos
This commit just change some preprocessor definitions related with MIB attributes into an enumeration which is much cleaner for this here. Also add kerneldoc to avoid long comment lines. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.h | 130

[RESEND PATCH 03/47] staging: ks7010: avoid ks_sdio_card dependency in ks_wlan header

2018-05-03 Thread Sergio Paracuellos
ks_wlan_private struct has a pointer to struct ks_sdio_card in its fields. Because of that a forward declaration in needed in ks_wlan.h header and also it makes necessary to have ks_sdio_card public in a ks7010_sdio.h header. Changing this pointer into a void pointer makes no longer necessary to

[RESEND PATCH 33/47] staging: ks7010: change parameter types in hostif_power_mgmt_request

2018-05-03 Thread Sergio Paracuellos
Parameters for hostif_power_mgmt_request are declared as unsigned long and then are forced to be change to be u32. Also the caller declares explicitly unsigned long parameters just to assign them and pass into the function. Change types for those to be u32 instead so no conversion is needed at all

[RESEND PATCH 35/47] staging: ks7010: use ether_addr_copy in ks_wlan_set_mac_address

2018-05-03 Thread Sergio Paracuellos
Use ether_addr_copy to copy ethernet address instad of using memcpy in ks_wlan_set_mac_address function. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_wlan_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[RESEND PATCH 21/47] staging: ks7010: use ether_addr_copy in get_current_ap

2018-05-03 Thread Sergio Paracuellos
Instead of use memcpy to copy ethernet addresses use ether_addr_copy created for that. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ks7010/ks_hostif.c

[RESEND PATCH 41/47] staging: ks7010: use CIRC_CNT_TO_END macro in cnt_smeqbody

2018-05-03 Thread Sergio Paracuellos
This commit changes custom implementation of CIRC_CNT_TO_END. Just use the linux kernel header one to simplify code. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[RESEND PATCH 14/47] staging: ks7010: remove nonsense comment in ks_wlan.h file

2018-05-03 Thread Sergio Paracuellos
Header file ks_wlan.h has a lot of nonsense comments along the different declarations included on it. Most of them are just the same as the variable name. Just remove them all. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_wlan.h | 49

[RESEND PATCH 15/47] staging: ks7010: clean SME_MIC_FAILURE_REQUEST case in hostif_sme_execute

2018-05-03 Thread Sergio Paracuellos
This commit cleans code for the event SME_MIC_FAILURE_REQUEST changing if logic to handle invalid value first and using a local variable. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.c | 23 ++- 1 file changed, 10

[RESEND PATCH 07/47] staging: ks7010: change local variable type in _ks_wlan_hw_power_save

2018-05-03 Thread Sergio Paracuellos
Local variable 'byte' in _ks_wlan_hw_power_save function is declared as unsigned char and can be declared as u8 which is preferred. It is being using with ks7010_sdio_readb which expects u8 already. Signed-off-by: Sergio Paracuellos ---

[RESEND PATCH 34/47] staging: ks7010: refactor hostif_sme_power_mgmt_set function

2018-05-03 Thread Sergio Paracuellos
This commit refactor hostif_sme_power_mgmt_set avoiding to use switch-case statement and simplifying data paths. This improves readability. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.c | 33 ++--- 1 file

[RESEND PATCH 46/47] staging: ks7010: use u32 instead of unsigned int in hostif_bss_scan_confirm

2018-05-03 Thread Sergio Paracuellos
Local variable 'result_code' is declared as unsigned int in hostif_bss_scan_confirm function. Its value is got calling get_dword which returns an 'u32' so change its type to u32 which is preferred Signed-off-by: Sergio Paracuellos ---

[RESEND PATCH 02/47] staging: ks7010: move tx and rx queues definitions into ks_wlan.h header

2018-05-03 Thread Sergio Paracuellos
There are some definitions for rx and tx queues in ks7010_sdio which is not the best place to put them. Changing them into the ks_wlan header file there is no need to explicity include ks7010_sdio.h which makes no sense at all and can be resolved easily using forward declarations. The functions

[RESEND PATCH 08/47] staging: ks7010: change local variable type in ks7010_rw_function

2018-05-03 Thread Sergio Paracuellos
Local variable 'byte' in ks7010_rw_function is declared as unsigned char and can be declared as u8 which is preferred. It is being used in ks7010_sdio_readb which is already expecting an u8. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks7010_sdio.c

[RESEND PATCH 10/47] staging: ks7010: change local variable type in ks7010_sdio_init_irqs

2018-05-03 Thread Sergio Paracuellos
Local variable 'byte' in ks7010_sdio_init_irqs is declared as unsigned char and can be declared as u8 which is preferred. It is being used in calls to ks7010_sdio_writeb which is already expected an u8. Signed-off-by: Sergio Paracuellos ---

[RESEND PATCH 16/47] staging: ks7010: convert MIB preprocessor defs into an enum

2018-05-03 Thread Sergio Paracuellos
This commit just change some preprocessor definitions related with MIB data types into an enumeration which is much cleaner for this here. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.h | 21 - 1 file changed, 16

[RESEND PATCH 37/47] staging: ks7010: refactor ks_wlan_set_sleep_mode function

2018-05-03 Thread Sergio Paracuellos
This commit refactors ks_wlan_set_sleep_mode function avoiding to use switch-case statement ans using simple if logic to handle invalid values first. This simplifies data paths as well as improves readability. Signed-off-by: Sergio Paracuellos ---

[RESEND PATCH 20/47] staging: ks7010: add new helpers to achieve mib set request and simplify code

2018-05-03 Thread Sergio Paracuellos
New three functions have been created to centralice and simplify calls related with set MIB requests: - hostif_mib_set_request_int - hostif_mib_set_request_bool - hostif_mib_set_request_ostring Using these in different calls simplify functions related with this mainly when types are

[RESEND PATCH 26/47] staging: ks7010: use ether_addr_copy to copy ethernet address sa_data

2018-05-03 Thread Sergio Paracuellos
Use ether_addr_copy kernel function to copy an ethernet address instead of a simple memcpy with ETH_ALEN size. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[RESEND PATCH 27/47] staging: ks7010: use ether_addr_copy in get_ap_information function

2018-05-03 Thread Sergio Paracuellos
This commit make use of ether_addr_copy to copy ethernet address instead of copy it using memcpy. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[RESEND PATCH 19/47] staging: ks7010: change parameter types and reorder them in hostif_mib_set_request

2018-05-03 Thread Sergio Paracuellos
This commit changes parameter types to use enum mib_attribute, enum mib_data_type and size_t for size instead of unsigned short. It also reorder them in a more sense way. Code is updated in different calls to use new parameters order using 'size' auxiliar local variables in some of them to improve

[RESEND PATCH 30/47] staging: ks7010: fix some style issues in ks_hostif.c

2018-05-03 Thread Sergio Paracuellos
Fix some checkpatch complains about long lines in some parts of the code. It also fix some lines where spaces instead of tabs were inserted. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.c | 46 +- 1 file

[RESEND PATCH 36/47] staging: ks7010: use ether_addr_copy in ks_wlan_net_start

2018-05-03 Thread Sergio Paracuellos
Instead of use memcpy for copying ethernet addresses, use ether_addr_copy that do the same. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_wlan_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[RESEND PATCH 01/47] staging: ks7010: add SPDX identifiers to all files

2018-05-03 Thread Sergio Paracuellos
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Fix up the all of the staging ks7010 files to have a proper SPDX identifier, based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which

[RESEND PATCH 18/47] staging: ks7010: change some casts from uint8_t to u8 in ks_hostif header

2018-05-03 Thread Sergio Paracuellos
This commit changes some type cast in rate related preprocessor definitions included in ks_hostif header file to use preferred u8 type. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.h | 24 1 file changed, 12

[RESEND PATCH 00/47] staging: ks7010: next cleanups

2018-05-03 Thread Sergio Paracuellos
This patch series are all of my patches that haven't been applied yet. Most of them are from previous series and there are also a few new patches included. I resend them because I think Greg applies patches in FIFO order and other patches that have been applied in other drivers are newer than

[RESEND PATCH 05/47] staging: ks7010: remove missing WPS preprocessor conditional code

2018-05-03 Thread Sergio Paracuellos
Commit 92c1552caef3661f049c4e967550e933599e2663 removes WPS hardcoded definition and its related conditional preprocessor code. There was some missing stuff already in this files. Remove it. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.c |

[RESEND PATCH 43/47] staging: ks7010: use u16 instead of unsigned short in hostif_event_check

2018-05-03 Thread Sergio Paracuellos
Local variable 'event' is declared as unsigned short in hostif_event_check function. Its value is got calling get_word which returns an 'u16' so change its type to u16 which is preferred. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.c | 2

[RESEND PATCH 47/47] staging: ks7010: review local variable types in hostif_phy_information_confirm

2018-05-03 Thread Sergio Paracuellos
This commit changes types for local variables declared in hostif_phy_information_confirm function to use the preferred one 'u8' and 'u32'. Its values are get using get_byte and get_dword functions which returns 'u8' and 'u32' so it makes sense. Signed-off-by: Sergio Paracuellos

[RESEND PATCH 44/47] staging: ks7010: use u16 instead of unsigned short in hostif_data_indication

2018-05-03 Thread Sergio Paracuellos
Local variable 'auth_type' is declared as unsigned short in hostif_data_indication function. Its value is got calling get_word which returns an 'u16' so change its type to u16 which is preferred. Signed-off-by: Sergio Paracuellos ---

[RESEND PATCH 32/47] staging: ks7010: refactor hostif_sme_set_rsn function

2018-05-03 Thread Sergio Paracuellos
This commit make use of two introduced local variables to make more readable code of hostif_sme_set_rsn function. It just assign those local variables in different cases where are needed and extract common code to assign them at the end. Signed-off-by: Sergio Paracuellos

[RESEND PATCH 28/47] staging: ks7010: move WLAN_EID_DS_PARAMS to different place inside switch

2018-05-03 Thread Sergio Paracuellos
WLAN_EID_DS_PARAMS case inside switch case is just doing nothing and it is located inside other cases. There is a place inside the switch with other don't do anything cases are located. Move this to that place. Signed-off-by: Sergio Paracuellos ---

[RESEND PATCH 40/47] staging: ks7010: refactor ks_get_wireless_stats function

2018-05-03 Thread Sergio Paracuellos
This commit refactor a bit ks_get_wireless_stats using ternary operator for return code. It also change a comment to use preferred style. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_wlan_net.c | 11 --- 1 file changed, 4 insertions(+), 7

[RESEND PATCH 09/47] staging: ks7010: change some local variables type in ks_sdio_interrupt

2018-05-03 Thread Sergio Paracuellos
Local variables 'status', 'rsize' and 'byte' are declared as unsigned char and can be declared as u8 which is preferred. They are being used in ks7010_sdio_readb calls which is already expected an u8. Signed-off-by: Sergio Paracuellos ---

[RESEND PATCH 23/47] staging: ks7010: avoid two long lines in hostif_sme_mode_setup

2018-05-03 Thread Sergio Paracuellos
This commit avoid two checkpatch script complains about two long lines. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/ks7010/ks_hostif.c

[RESEND PATCH 06/47] staging: ks7010: use u8 instead of unsigned char in write_to_device function

2018-05-03 Thread Sergio Paracuellos
Parameter buffer in write_to_device function is declared as a pointer to unsigned char and can be declared as an u8 type which is preferred. Internally it calls to ks7010_sdio_write which is using also u8 as parameter type. Update calls to this function as well. Signed-off-by: Sergio Paracuellos

[RESEND PATCH 11/47] staging: ks7010: use the same parameter for 'event' in hostif_sme_enqueue

2018-05-03 Thread Sergio Paracuellos
Declaration of second parameter 'event' in ks_hostif .h and .c file is different using uint16_t and unsigned short respectively. Just unify both using 'u16' which is preferred instead. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.c | 2 +-

[RESEND PATCH 12/47] staging: ks7010: refactor ks7010_sme_enqueue_events function

2018-05-03 Thread Sergio Paracuellos
Event to send to init the card are always the same so change code to be more readable putting them into an array and enqueuing also using a for loop. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks7010_sdio.c | 31 +-- 1

[RESEND PATCH 04/47] staging: ks7010: change netdev_dbg msg to avoid a long line

2018-05-03 Thread Sergio Paracuellos
This commit avoids a long line changing a bit message in _ks_wlan_hw_power_save function. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks7010_sdio.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git

[PATCH] staging: r8822be: fix typo in variable name "offest" -> "offset"

2018-05-03 Thread Colin King
From: Colin Ian King There are multiple occurrances of typos of "offest" that should be "offset". Fix these. Signed-off-by: Colin Ian King --- .../rtlwifi/phydm/rtl8822b/halphyrf_8822b.c | 34 +-- 1 file changed, 17

[PATCH v2] staging: lustre: o2iblnd: Enable Multiple OPA Endpoints between Nodes

2018-05-03 Thread Doug Oucharek
OPA driver optimizations are based on the MPI model where it is expected to have multiple endpoints between two given nodes. To enable this optimization for Lustre, we need to make it possible, via an LND-specific tuneable, to create multiple endpoints and to balance the traffic over them. Both

Re: [PATCH] ANDROID: binder: fix binder work return error is wrongly consumed

2018-05-03 Thread Martijn Coenen
On Wed, May 2, 2018 at 7:30 AM, wrote: > But there is potential risks in the future, future functional extensions > need to consider nesting issues, maybe extending more methods where we > push to thread->todo. I think that using queueing return error transaction > to the head

RE: [PATCH 1/4] staging: lustre: obdclass: change spinlock of key to rwlock

2018-05-03 Thread David Laight
From: James Simmons > Sent: 02 May 2018 19:22 > From: Li Xi > > Most of the time, keys are never changed. So rwlock might be > better for the concurrency of key read. OTOH unless there is contention on the spin lock during reads the additional cost of a rwlock (probably double

Re: [PATCH 3/3] staging: Android: Fix sparse warnings in vsoc driver.

2018-05-03 Thread Greg Kroah-Hartman
On Wed, May 02, 2018 at 09:46:16PM -0700, Alistair Strachan wrote: > Cc: Greg Kroah-Hartman > Cc: Arve Hjønnevåg > Cc: Todd Kjos > Cc: Martijn Coenen > Cc: Greg Hartman > Cc:

RE: [PATCH 1/4] staging: lustre: obdclass: change spinlock of key to rwlock

2018-05-03 Thread NeilBrown
On Thu, May 03 2018, David Laight wrote: > From: James Simmons >> Sent: 02 May 2018 19:22 >> From: Li Xi >> >> Most of the time, keys are never changed. So rwlock might be >> better for the concurrency of key read. > > OTOH unless there is contention on the spin lock during reads

Re: [PATCH 1/4] staging: lustre: obdclass: change spinlock of key to rwlock

2018-05-03 Thread Dilger, Andreas
On May 3, 2018, at 07:50, David Laight wrote: > > From: James Simmons >> Sent: 02 May 2018 19:22 >> From: Li Xi >> >> Most of the time, keys are never changed. So rwlock might be >> better for the concurrency of key read. > > OTOH unless there is

Re: [PATCH v3 2/5] efi: Add embedded peripheral firmware support

2018-05-03 Thread Luis R. Rodriguez
Android folks, poke below. otherwise we'll have no option but to seriously consider Mimi's patch to prevent these calls when IMA appraisal is enforced: http://lkml.kernel.org/r/1525182503-13849-7-git-send-email-zo...@linux.vnet.ibm.com Please read below On Wed, Apr 25, 2018 at 05:55:57PM

Re: [PATCH 4/4] staging: lustre: obdclass: change object lookup to no wait mode

2018-05-03 Thread NeilBrown
On Wed, May 02 2018, James Simmons wrote: > From: Lai Siyao > > Currently we set LU_OBJECT_HEARD_BANSHEE on object when we want > to remove object from cache, but this may lead to deadlock, because > when other process lookup such object, it needs to wait for this > object

Re: [PATCH 1/4] staging: lustre: obdclass: change spinlock of key to rwlock

2018-05-03 Thread NeilBrown
On Fri, May 04 2018, Dilger, Andreas wrote: > On May 3, 2018, at 07:50, David Laight wrote: >> >> From: James Simmons >>> Sent: 02 May 2018 19:22 >>> From: Li Xi >>> >>> Most of the time, keys are never changed. So rwlock might be >>> better for the

[PATCH v2 11/11] staging: iio: tsl2x7x/tsl2772: move out of staging

2018-05-03 Thread Brian Masney
Move the tsl2772 driver out of staging and into mainline. Signed-off-by: Brian Masney --- drivers/iio/light/Kconfig | 8 drivers/iio/light/Makefile | 1 + drivers/{staging => }/iio/light/tsl2772.c

[PATCH v2 08/11] staging: iio: tsl2x7x: add device ids for code readability

2018-05-03 Thread Brian Masney
This patch adds the device IDs to the device_channel_config array to improve code readability. Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git

[PATCH v2 09/11] staging: iio: tsl2x7x: correct IIO_EV_INFO_PERIOD values

2018-05-03 Thread Brian Masney
The thresh periods assumed an integration time of 3ms. This patch adds support for the correct integration time (2.72ms or 2.73ms). The code had the ALS filter values as going up to 15, however the values actually went up to 60 since the values scaled in increments of 5 once the persistence value

[PATCH v2 06/11] staging: iio: tsl2x7x: correct integration time and lux equation

2018-05-03 Thread Brian Masney
The integration_time sysfs attribute did not report the correct time. Changing the integration time would cause the reported lux to change wildly. Once the integration time was corrected, all of the equations, and lux tables needed to be corrected to match what the data sheets expected. This patch

[PATCH v2 10/11] staging: iio: tsl2x7x: rename driver to tsl2772

2018-05-03 Thread Brian Masney
This patch renames this driver from tsl2x7x to tsl2772 since it is highly likely that additional devices will be added to this driver that do not match that wildcard. The tsl2772 driver name was selected since that is currently the device with the most features that are supported by this driver.

[PATCH v2 04/11] staging: iio: tsl2x7x: move calibscale_available attribute to IIO_INTENSITY channel

2018-05-03 Thread Brian Masney
The calibscale_available attribute is currently associated with the IIO_LIGHT channel but should be associated with the IIO_INTENSITY channel. This patch corrects that association and it also corrects lines that were unnecessarily split for the in_intensity0_integration_time sysfs attribute.

[PATCH v2 02/11] staging: iio: tsl2x7x: add range checking to three sysfs attributes

2018-05-03 Thread Brian Masney
The sysfs attributes in_illuminance0_target_input, in_illuminance0_calibrate, and in_proximity0_calibrate did not have proper range checking in place so this patch adds the correct range checks. Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 28

[PATCH v2 00/11] staging: iio: tsl2x7x: move out of staging

2018-05-03 Thread Brian Masney
Here is a patch set that should hopefully be the last of the changes required for a staging graduation. Changes since v1: - Use correct syntax for SPDX license identifier - Use kstrtou16 for range checking - Correct integration time sysfs attribute. This fix required correcting all of the

[PATCH v2 05/11] staging: iio: tsl2x7x: use IIO_CONST_ATTR for calibscale_available

2018-05-03 Thread Brian Masney
The in_intensity0_calibscale_available sysfs attribute has code that checks the device type to determine which calibration scales are available. This check is not necessary since all of the supported ALS device types use the scales 1 8 16 120. This patch converts the sysfs attribute to use

[PATCH v2 03/11] staging: iio: tsl2x7x: don't setup event handlers if interrupts are not configured

2018-05-03 Thread Brian Masney
The driver would expose to userspace the events directory even if the interrupts were not configured. This patch changes the driver so that the events directory is not exposed to user space if interrupts are not configured. This patch also corrects the indentation of the chan_table_elements and

[PATCH v2 01/11] staging: iio: tsl2x7x: use GPL-2.0+ SPDX license identifier

2018-05-03 Thread Brian Masney
The summary text for the GPL is not needed since the SPDX identifier is a legally binding shorthand that can be used instead. Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 11 +-- drivers/staging/iio/light/tsl2x7x.h | 15 +-- 2

[PATCH v2 07/11] staging: iio: tsl2x7x: support 2.72 and 2.73 ALS increments

2018-05-03 Thread Brian Masney
The driver assumed that the ALS increment was 2.72 ms, and the upper range was 696 ms. Some other supported devices use 2.73 ms - 699 ms. This patch adds support for the multiple ranges. Signed-off-by: Brian Masney --- I debated whether or not this change should even be

Re: [PATCH v2 11/11] staging: iio: tsl2x7x/tsl2772: move out of staging

2018-05-03 Thread Brian Masney
Hey Jonathan, I intentionally didn't run git format-patch with the --no-renames since patch 10 renamed the driver. Here is the .[ch] files included inline to make your review easier. Brian tsl2772.c: // SPDX-License-Identifier: GPL-2.0+ /* * Device driver for monitoring ambient light

Re: [PATCH v8] PCI: hv: Make sure the bus domain is really unique

2018-05-03 Thread Lorenzo Pieralisi
On Tue, May 01, 2018 at 05:56:32PM +, Sridhar Pitchai wrote: > When Linux runs as a guest VM in Hyper-V and Hyper-V adds the virtual PCI > bus to the guest, Hyper-V always provides unique PCI domain. > > commit 4a9b0933bdfc ("PCI: hv: Use device serial number as PCI domain") > overrode unique

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

2018-05-03 Thread Joerg Roedel
On Tue, Apr 17, 2018 at 07:49:09PM +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,

[PATCH] staging: most: video: use __func__ instead of function name

2018-05-03 Thread Abdun Nihaal
This fixes the following checkpatch warning in video.c: WARNING: Prefer using '\"%s...\", __func__' to using function's name in a string Signed-off-by: Abdun Nihaal --- drivers/staging/most/video/video.c | 24 1 file changed, 12 insertions(+),

[PATCH] staging: wilc1000: allocate less memory

2018-05-03 Thread Dan Carpenter
We should be allocating space for hidden_network_info structs. They are slightly smaller than hidden_network structs. This bug doesn't cause a runtime issue beyond the very small ammount of extra memory used. Signed-off-by: Dan Carpenter diff --git

team of photo editors for you

2018-05-03 Thread Edward Nelson
We are a good photo team, who can process 200+ images each day. If you need any image editing service, just let us know. Such as ecommerce photos cutting out, clipping path, masking. Jewelry photos cut out and retouching Beauty model retouching and skin image retouching, also wedding photo

Re: [PATCH v2] staging: lustre: llite: fix potential missing-check bug when copying lumv

2018-05-03 Thread Wenwen Wang
On Tue, May 1, 2018 at 3:46 AM, Dan Carpenter wrote: > On Mon, Apr 30, 2018 at 05:56:10PM -0500, Wenwen Wang wrote: >> However, given that the user data resides in the user space, a malicious >> user-space process can race to change the data between the two copies. By >>

[RESEND PATCH 38/47] staging: ks7010: refactor ks_wlan_set_phy_type function

2018-05-03 Thread Sergio Paracuellos
Handle invalid values first and assign good ones at the end if it is the case. This makes code simplier. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_wlan_net.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git

[RESEND PATCH 42/47] staging: ks7010: refactor LOCAL_EEPROM_SUM case in hostif_mib_get_confirm

2018-05-03 Thread Sergio Paracuellos
This commit simplify conditional paths in LOCAL_EEPROM_SUM case inside hostif_mib_get_confirm function. It change logic to handle invalid values first and assign good ones at the end if it is the case. Signed-off-by: Sergio Paracuellos ---

[RESEND PATCH 25/47] staging: ks7010: change type for rsn_enabled in wpa_status struct

2018-05-03 Thread Sergio Paracuellos
Field rsn_enabled included in wpa_status struct is declared as unsigned int but it is only be set using 0 and 1 values and in conditional if code is just being used as a boolean. Change its type to be a boolean. Signed-off-by: Sergio Paracuellos ---

[RESEND PATCH 45/47] staging: ks7010: use u16 instead of unsigned short in hostif_connect_indication

2018-05-03 Thread Sergio Paracuellos
Local variable 'connect_code' is declared as unsigned short in hostif_connect_indication function. Its value is got calling get_word which returns an 'u16' so change its type to u16 which is preferred. Signed-off-by: Sergio Paracuellos ---

[RESEND PATCH 39/47] staging: ks7010: refactor ks_wlan_set_mlme function

2018-05-03 Thread Sergio Paracuellos
This commit refactors ks_wlan_set_mlme function changing switch-case block for more simple if paths improving readability. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_wlan_net.c | 23 ++- 1 file changed, 10 insertions(+), 13

Re: [PATCH] staging: wilc1000: allocate less memory

2018-05-03 Thread Ajay Singh
On Thu, 3 May 2018 13:56:55 +0300 Dan Carpenter wrote: > We should be allocating space for hidden_network_info structs. They > are slightly smaller than hidden_network structs. This bug doesn't > cause a runtime issue beyond the very small ammount of extra memory >

Re: [PATCH v2] staging: lustre: llite: fix potential missing-check bug when copying lumv

2018-05-03 Thread Wenwen Wang
On Fri, May 4, 2018 at 12:27 AM, Dan Carpenter wrote: > There is no security problem here. The user is allowed to choose either > v1 or v3. Using a double read race condition to choose v1 is not > going to cause problems. It's slightly more complicated than just >

[PATCH 1/8] staging: mt7621-eth: Lock is never unlocked.

2018-05-03 Thread NeilBrown
mtk_phy_link_adjust takes a spinlock and disables interrupts, but never unlocks. This can leave interrupts disabled on one CPU and various things stop working. Signed-off-by: NeilBrown --- drivers/staging/mt7621-eth/mdio.c |1 + 1 file changed, 1 insertion(+) diff --git

[PATCH 7/8] staging: mt7621-pci: remove some dead code.

2018-05-03 Thread NeilBrown
Some code is dead because it is commented out. Some is dead because it is uninteresting printks. Some is dead because it declares unused functions. Remove it all. Signed-off-by: NeilBrown --- drivers/staging/mt7621-pci/pci-mt7621.c | 14 -- 1 file changed, 14

[PATCH 6/8] staging: mt7621-pci: remove unnecessary resource details.

2018-05-03 Thread NeilBrown
These resources are extracted from devicetree, so they aren't needed here. Signed-off-by: NeilBrown --- drivers/staging/mt7621-pci/pci-mt7621.c | 19 ++- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c

[PATCH 2/8] staging: mt7621-spi: remove unused lock.

2018-05-03 Thread NeilBrown
This lock is never initialized, locked once, and never unlocked. Clearly it is pointless - so remove it. Signed-off-by: NeilBrown --- drivers/staging/mt7621-spi/spi-mt7621.c |3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/mt7621-spi/spi-mt7621.c

[PATCH 8/8] staging: mt7621-dts: update nor-flash info for gnubee1

2018-05-03 Thread NeilBrown
The GNUBEE has 32MB flash, so set partitions accordingly. Also remove "m25p,chunked-io" which isn't documented or used anywhere (outside of freewrt). Signed-off-by: NeilBrown --- drivers/staging/mt7621-dts/gbpc1.dts |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)

[PATCH 5/8] staging: mt7621-pci: remove conditional compilation.

2018-05-03 Thread NeilBrown
Code currently defines: #define CONFIG_PCIE_PORT0 #define CONFIG_PCIE_PORT1 #define CONFIG_PCIE_PORT2 #define GPIO_PERST and then compiles code only if they are defined. We might want to disable some of these via devicetree one day, but for now just remove the #defines and the conditions - all

[PATCH 3/8] staging: mt7621-pci: improve interrupt mapping

2018-05-03 Thread NeilBrown
As the Interrupts for the PCI adapters are listed in devicetree we shouldn't need to have them explicit in the code. The simplest way to do this is to use of_irq_parse_and_map_pci() and specify an interrupt-map which identifies the different PCI hosts by bus/slot numbers. This has the advantage

[PATCH 4/8] staging: mt7621-pci: white-space cleanups.

2018-05-03 Thread NeilBrown
- remove white space at end of line. - no more than 2 blank line at a time - remove spaces before tabs - use tabs to line things up - re-indent some #define do{}while(0) Signed-off-by: NeilBrown --- drivers/staging/mt7621-pci/pci-mt7621.c | 291 +++

[PATCH 0/8] staging: various mt7621 fixes

2018-05-03 Thread NeilBrown
Highlights here are a bugfix for the ethernet driver, and proper handling of irq assignments in the PCI driver. We also make the full 32M of the gnubee flash available and start cleaning up the mt7621-pci code. --- NeilBrown (8): staging: mt7621-eth: Lock is never unlocked. staging:

Re: [PATCH v2] staging: lustre: llite: fix potential missing-check bug when copying lumv

2018-05-03 Thread Dan Carpenter
There is no security problem here. The user is allowed to choose either v1 or v3. Using a double read race condition to choose v1 is not going to cause problems. It's slightly more complicated than just choosing it directly but that doesn't make it a security issue. It's a bit like typing with