[PATCH] media: staging: atomisp: fix a potential missing-check bug

2018-04-28 Thread Wenwen Wang
At the end of atomisp_subdev_set_selection(), the function atomisp_subdev_get_rect() is invoked to get the pointer to v4l2_rect. Since this function may return a NULL pointer, it is firstly invoked to check the returned pointer. If the returned pointer is not NULL, then the function is invoked agai

[staging:staging-next 143/420] drivers/staging/android/vsoc.c:804:4: warning: cast to pointer from integer of different size

2018-04-28 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-next head: fec2dbfeba0967fbb4cdf69114db29d5333d8a8f commit: 3d2ec9dcd5539d421a6814ded10a1a3008e70548 [143/420] staging: Android: Add 'vsoc' driver for cuttlefish. config: i386-randconfig-n0-201817 (attached as .c

[PATCH] [v4] staging: wlan-ng: prism2sta: fixed indent coding style issues.

2018-04-28 Thread Efstratios Gavas
Fixed format/style issues found with checkpatch. No code changes. Corrected alignment of variables after open parenthesis and line breaks. Checkpatch now returns clean except for "line over 80 char" warnings. Signed-off-by: Efstratios Gavas --- v2(unlabled): changed title info v3: improved changl

Re: [greybus-dev] [PATCH v2] staging: greybus: Use gpio_is_valid()

2018-04-28 Thread Alex Elder
On 04/27/2018 11:35 PM, Arvind Yadav wrote: > Replace the manual validity checks for the GPIO with the > gpio_is_valid(). > > Signed-off-by: Arvind Yadav Looks good. Reviewed-by: Alex Elder > --- > chnage in v2 : > Returning invalid gpio as error instead of -ENODEV. > > drivers

Re: [PATCH v3 9/9] staging: iio: ad2s1200: Move driver out of staging

2018-04-28 Thread Jonathan Cameron
On Mon, 23 Apr 2018 00:04:42 +0200 David Veenstra wrote: > Move the iio driver for the ad2s1200 and ad2s1205 resolver-to-digital > converter out of staging, into mainline iio subsystems. > > Signed-off-by: David Veenstra A few more minor bits and bobs + suggestions. Some little things that I m

Re: [PATCH v3 8/9] staging: iio: ad2s1200: Add scaling factor for angle channel

2018-04-28 Thread Jonathan Cameron
On Mon, 23 Apr 2018 00:04:24 +0200 David Veenstra wrote: > A scaling factor of approximately 2 * Pi / (2^12 -1) is added, > to scale the 12-bits angular position to radians. > > A return type of IIO_VAL_INT_PLUS_NANO is used, so that the scale of > both the angle channel and angular velocity cha

Re: [PATCH v3 7/9] staging: iio: Documentation: Add missing sysfs docs for angle channel

2018-04-28 Thread Jonathan Cameron
On Mon, 23 Apr 2018 00:04:10 +0200 David Veenstra wrote: > The iio resolver drivers in staging use angle channels. This patch > add missing documentation for this type of channel. > > As was discussed in [1], radians is chosen as the unit, to match the > unit of angular velocity. > > [1] https:

Re: [PATCH v3 6/9] staging: iio: ad2s1200: Add scaling factor for angular velocity channel

2018-04-28 Thread Jonathan Cameron
On Sat, 28 Apr 2018 18:23:44 +0100 Jonathan Cameron wrote: > On Mon, 23 Apr 2018 00:03:59 +0200 > David Veenstra wrote: > > > The sysfs iio ABI states radians per second is expected as the unit for > > angular velocity, but the 12-bit angular velocity register has rps > Really small point, bu

Re: [PATCH v3 6/9] staging: iio: ad2s1200: Add scaling factor for angular velocity channel

2018-04-28 Thread Jonathan Cameron
On Mon, 23 Apr 2018 00:03:59 +0200 David Veenstra wrote: > The sysfs iio ABI states radians per second is expected as the unit for > angular velocity, but the 12-bit angular velocity register has rps Really small point, but rps is a bit ambiguous given we are talking about converting to radian's

Re: [PATCH v3 4/9] staging: iio: ad2s1200: Replace platform data with dt bindings

2018-04-28 Thread Jonathan Cameron
On Mon, 23 Apr 2018 00:03:32 +0200 David Veenstra wrote: > Remove usage of platform data, and replace it with device tree > facilities. > > Signed-off-by: David Veenstra This is fine up to the need to add the prefix to the gpio names. Thanks, Jonathan > --- > Changes in v3: > - Introduced i

Re: [PATCH v3 3/9] staging: iio: ad2s1200: Replace legacy gpio API with modern API

2018-04-28 Thread Jonathan Cameron
On Mon, 23 Apr 2018 00:03:16 +0200 David Veenstra wrote: > The legacy, integer based gpio API is replaced with the modern > descriptor based API. > > Signed-off-by: David Veenstra This patch is fine, but I'm going to leave it for the next version as it makes more sense to pick up with the next

Re: [PATCH v3 2/9] staging: iio: ad2s1200: Improve readability with be16_to_cpup

2018-04-28 Thread Jonathan Cameron
On Mon, 23 Apr 2018 00:03:03 +0200 David Veenstra wrote: > The manual states that the data is contained in the upper 12 bits > of the 16 bits read by spi. The code that extracts these 12 bits > is correct for both be and le machines, but this is not clear > from a first glance. > > To improve re

Re: [PATCH v3 1/9] staging: iio: ad2s1200: Add kernel docs to driver state

2018-04-28 Thread Jonathan Cameron
On Mon, 23 Apr 2018 00:02:51 +0200 David Veenstra wrote: > Add missing kernel docs to the ad2s1200 driver state. > > Signed-off-by: David Veenstra Hi David, Comment inline. > --- > Changes in v3: > - Added more explanation to mutex lock. > > drivers/staging/iio/resolver/ad2s1200.c | 9

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

2018-04-28 Thread Dilger, Andreas
On Apr 27, 2018, at 17:45, Wenwen Wang wrote: > [PATCH] staging: luster: llite: fix potential missing-check bug when copying > lumv (typo) s/luster/lustre/ > In ll_dir_ioctl(), the object lumv3 is firstly copied from the user space > using Its address, i.e., lumv1 = &lumv3. If the lmm_magic fie

[PATCH V2 4/9] staging: vchiq_arm: Make index variable more self-explaining

2018-04-28 Thread Stefan Wahren
The chance to mixup i and j is very high. So rename variable j to a more explaining one. Signed-off-by: Stefan Wahren --- .../vc04_services/interface/vchiq_arm/vchiq_arm.c| 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/vc04_services/in

[PATCH V2 1/9] staging: vchiq_arm: print real dump limit

2018-04-28 Thread Stefan Wahren
We better use the real loop limit in the warning about "too many active services". Another benefit is than we don't have to care about the format string in the following change. Signed-off-by: Stefan Wahren --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 3 +-- 1 file changed

[PATCH V2 8/9] staging: vchiq_shim: Remove unnecessary break

2018-04-28 Thread Stefan Wahren
This removes an unnecessary break which has been reported by checkpatch.pl. Signed-off-by: Stefan Wahren --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c b/drivers

[PATCH V2 5/9] staging: vc04_services: Remove defines from Makefile

2018-04-28 Thread Stefan Wahren
The definition of USE_VCHIQ_ARM and VCOS_VERIFY_BKPTS isn't really necessary so remove them. Signed-off-by: Stefan Wahren --- drivers/staging/vc04_services/Makefile | 2 +- drivers/staging/vc04_services/interface/vchi/vchi_common.h | 2 -- 2 files changed, 1 insertion(+), 3 d

[PATCH V2 3/9] staging: vchiq_arm: Rework second abort criterion

2018-04-28 Thread Stefan Wahren
In order to make the code easier to review, move the second abort criterion into the loop and the incrementation into a separate line. Signed-off-by: Stefan Wahren --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff

[PATCH V2 7/9] staging: vchiq_arm: remove unnecessary return

2018-04-28 Thread Stefan Wahren
This removing an unnecessary return which has been reported by checkpatch.pl. Signed-off-by: Stefan Wahren --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers

[PATCH V2 2/9] staging: vchiq_arm: Clear VLA warning

2018-04-28 Thread Stefan Wahren
The kernel would like to have all stack VLA usage removed[1]. The array here is fixed (declared with a const variable) but it appears like a VLA to the compiler. Also, currently we are putting 768 bytes on the stack. This function is only called on the error path so performance is not critical, let

[PATCH V2 6/9] staging: vchiq_2835_arm: Fix whitespace issue in create_pagelist

2018-04-28 Thread Stefan Wahren
This fixes a whitespace issue reported by checkpatch: ERROR: code indent should use tabs where possible Signed-off-by: Stefan Wahren --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vc04_se

[PATCH V2 9/9] staging: vc04_services: Remove stack hog issue from TODO

2018-04-28 Thread Stefan Wahren
Since there is no vchiq function listed by "make checkstack" anymore, we can remove the stack hog issue from the TODO. Signed-off-by: Stefan Wahren --- drivers/staging/vc04_services/interface/vchi/TODO | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/staging/v

[PATCH V2 0/9] staging: vc04_services: Clean up round #2

2018-04-28 Thread Stefan Wahren
This series contains the follow-up versions from the first round [1]: staging: vchiq_arm: Clear VLA warning staging: vchiq_arm: Rework second abort criterion staging: vchiq_arm: Make index variable more self-explaining and some additional fixes. [1] - https://www.mail-archive.com/driverdev-deve

Re: [PATCH v3 5/9] staging: iio: ad2s1200: Add documentation for device tree binding

2018-04-28 Thread Jonathan Cameron
On Fri, 27 Apr 2018 09:48:20 -0500 Rob Herring wrote: > On Mon, Apr 23, 2018 at 12:03:47AM +0200, David Veenstra wrote: > > Add documentation for the added device tree bindings. > > > > Signed-off-by: David Veenstra > > --- > > Changes in v3: > > - Documentation is added to Documentation/devic

[PATCH 02/10] staging: ks7010: use ether_addr_copy to copy ethernet address sa_data

2018-04-28 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 a/drivers/staging/ks7010/ks_hostif.c b/driv

[PATCH 04/10] staging: ks7010: move WLAN_EID_DS_PARAMS to different place inside switch

2018-04-28 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 --- drivers/staging/ks7010/ks_hostif.c | 4 +--- 1

[PATCH 00/10] cleanupas continue

2018-04-28 Thread Sergio Paracuellos
The following patch series continue with driver cleanups. This series starts focusing in ks_hostif.c file which really needs refactors. Some functions have been refactor as well as some style stuff has been fixed. Sergio Paracuellos (10): staging: ks7010: change type for rsn_enabled in wpa_statu

[PATCH 01/10] staging: ks7010: change type for rsn_enabled in wpa_status struct

2018-04-28 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 --- drivers/staging/ks7010/ks_hostif.c | 2 +- d

[PATCH 07/10] staging: ks7010: add blank line between after definitions

2018-04-28 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 a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks701

[PATCH 08/10] staging: ks7010: refactor hostif_sme_set_rsn function

2018-04-28 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 --- drivers/staging/ks70

[PATCH 10/10] staging: ks7010: refactor hostif_sme_power_mgmt_set function

2018-04-28 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 changed, 10 insertions(+), 23 deleti

[PATCH 05/10] staging: ks7010: factor out send_request_to_device function

2018-04-28 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 Para

[PATCH 06/10] staging: ks7010: fix some style issues in ks_hostif.c

2018-04-28 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 changed, 26 insertions(+), 20

[PATCH 09/10] staging: ks7010: change parameter types in hostif_power_mgmt_request

2018-04-28 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

[PATCH 03/10] staging: use ether_addr_copy in get_ap_information function

2018-04-28 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 a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7

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

2018-04-28 Thread Herbert Xu
On Tue, Apr 17, 2018 at 07:49:03PM +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