Re: [PATCH v2 19/19] media: staging: davinci_vpfe: allow building with COMPILE_TEST

2018-04-06 Thread kbuild test robot
Hi Mauro, I love your patch! Perhaps something to improve: [auto build test WARNING on linuxtv-media/master] [also build test WARNING on next-20180406] [cannot apply to v4.16] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https

Re: [PATCH 07/10] staging: mt7621-mmc: Remove error message in debug

2018-04-06 Thread NeilBrown
On Fri, Apr 06 2018, Christian Lütke-Stetzkamp wrote: > On Fri, Apr 06, 2018 at 11:51:24AM +0300, Dan Carpenter wrote: >> On Fri, Apr 06, 2018 at 10:36:57AM +0200, Christian Lütke-Stetzkamp wrote: >> > If the debug file in proc fs is not successfully created current code >> > prints an error

[PATCH] staging: pi433: break long lines in rf69.c

2018-04-06 Thread Simon Sandström
Breaks long lines in rf69.c, fixing checkpatch.pl warnings: "WARNING: line over 80 characters" Signed-off-by: Simon Sandström --- drivers/staging/pi433/rf69.c | 182 ++- 1 file changed, 129 insertions(+), 53 deletions(-) diff --git

[PATCH] staging: pi433: break long lines in pi433_if.c

2018-04-06 Thread Simon Sandström
Breaks long lines in pi433_if.c, fixing checkpatch.pl warnings: "WARNING: line over 80 characters" Signed-off-by: Simon Sandström --- drivers/staging/pi433/pi433_if.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git

[PATCH] staging: pi433: break long lines

2018-04-06 Thread Simon Sandström
Breaks long lines in rf69.h, fixing checkpatch.pl warnings: "WARNING: line over 80 characters" Signed-off-by: Simon Sandström --- drivers/staging/pi433/rf69.h | 28 +++- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git

Re: [PATCH v3] staging: greybus: Fix warning to limit chars per line

2018-04-06 Thread Mark Greer
On Fri, Apr 06, 2018 at 04:39:22PM +0530, Gaurav Dhingra wrote: > Wrap comment to fix warning "prefer a maximum 75 chars per line" > > Signed-off-by: Gaurav Dhingra > --- > Changes in v2: > - use correct format for multiline comment > Changes in v3: > -

[PATCH 02/21] media: dm365_ipipe: remove an unused var

2018-04-06 Thread Mauro Carvalho Chehab
drivers/staging/media/davinci_vpfe/dm365_ipipe.c:74:17: warning: variable 'dev' set but not used [-Wunused-but-set-variable] struct device *dev; ^~~ Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 2 -- 1

[PATCH 03/21] media: davinci_vpfe: fix vpfe_ipipe_init() error handling

2018-04-06 Thread Mauro Carvalho Chehab
As warned: drivers/staging/media/davinci_vpfe/dm365_ipipe.c:1834 vpfe_ipipe_init() error: we previously assumed 'res' could be null (see line 1797) There's something wrong at vpfe_ipipe_init(): 1) it caches the resourse_size() from from the first region and reuses to the second

[PATCH 04/21] media: davinci_vpfe: mark __iomem as such

2018-04-06 Thread Mauro Carvalho Chehab
There are several usages of an __iomem memory that aren't marked as such, causing those warnings: drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26:expected void

[PATCH 07/21] media: davinci_vpfe: don't use kernel-doc markup for simple comments

2018-04-06 Thread Mauro Carvalho Chehab
Fix those two warnings: drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c:90: warning: Function parameter or member 'interface' not described in 'MODULE_PARM_DESC' drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c:90: warning: Function parameter or member '(default' not described in

[PATCH 01/21] media: davinci_vpfe: remove useless checks from ipipe

2018-04-06 Thread Mauro Carvalho Chehab
The dm365_ipipe_hw.c and dm365_ipipe.c file check if several table pointers, declared at davinci_vpfe_user.h, are filled before using them. The problem is that those pointers come from struct declarations like: struct vpfe_ipipe_yee { ... short

[PATCH 10/21] media: davinci_vpfe: fix __user annotations

2018-04-06 Thread Mauro Carvalho Chehab
The __user annotations on this driver are wrong, causing lots of warnings: drivers/staging/media/davinci_vpfe/dm365_ipipe.c:1269:22: warning: incorrect type in assignment (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipe.c:1269:22:expected void [noderef]

[PATCH 06/21] media: davinci_vpfe: vpfe_video: remove an unused var

2018-04-06 Thread Mauro Carvalho Chehab
as warned: drivers/staging/media/davinci_vpfe/vpfe_video.c: In function 'vpfe_streamon': drivers/staging/media/davinci_vpfe/vpfe_video.c:1471:31: warning: variable 'sdinfo' set but not used [-Wunused-but-set-variable] struct vpfe_ext_subdev_info *sdinfo;

[PATCH 00/21] Fix sparse/smatch errors on non-x86 drivers

2018-04-06 Thread Mauro Carvalho Chehab
After applying this patch series: https://www.mail-archive.com/linux-media@vger.kernel.org/msg128829.html Which allows to build all drivers with COMPILE_TEST on x86, my scripts can finally check for errors/warnings on those drivers. This patch series correct those warnings. Mauro Carvalho

[PATCH 08/21] media: davinci_vpfe: fix a typo for "default"

2018-04-06 Thread Mauro Carvalho Chehab
resizer_set_defualt_configuration -> resizer_set_default_configuration Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/davinci_vpfe/dm365_resizer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 05/21] media: davinci_vpfe: get rid of an unused var at dm365_isif.c

2018-04-06 Thread Mauro Carvalho Chehab
Not sure what was the original idea here, but the implementation went into a different way, and the fmt var is not used anymore, as warned: drivers/staging/media/davinci_vpfe/dm365_isif.c: In function '__isif_get_format': drivers/staging/media/davinci_vpfe/dm365_isif.c:1401:29: warning: variable

[PATCH 09/21] media: davinci_vpfe: cleanup ipipe_[g|s]_config logic

2018-04-06 Thread Mauro Carvalho Chehab
Reduce one ident level inside those functions and use BIT() macro. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 98 1 file changed, 50 insertions(+), 48 deletions(-) diff --git

[PATCH v3 15/16] staging: ks7010: change sdio related read/write function parameter types

2018-04-06 Thread Sergio Paracuellos
This commit reviews and changes SDIO related read and write functions parameter types to use the preferred u* kernel types. Also length parameter which was defined as int has nonsense because calls to this functions are called useing an unsigned instead. Because of this length parameters have been

[PATCH v3 03/16] staging: ks7010: remove two redefined defines in eap_packet.h header

2018-04-06 Thread Sergio Paracuellos
This commit removes GENERIC_INFO_ELEM and RSN_INFO_ELEM definitions from eap_packet.h header file which are not being used at all. These two are also defined in the ks_wlan_net.c source file as GENERIC_INFO_ELEM_ID and RSN_INFO_ELEM_ID with the same values. Signed-off-by: Sergio Paracuellos

[PATCH v3 10/16] staging: ks7010: remove nosense #if 1 directive

2018-04-06 Thread Sergio Paracuellos
This commit removes #if 1 directive from code to improve readability. It is always true, so it makes no sense to have it there. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_wlan_net.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[PATCH v3 12/16] staging: ks7010: remove '\' character from michael_block function

2018-04-06 Thread Sergio Paracuellos
This commit removes '\' character from michael_block function. It seems these two were not removed properly in the following commit: - staging: ks7010: replace MichaelBlockFunction macro with inline function (c61cc2cc3be358da10121d119356dfe67fe240f2). Signed-off-by: Sergio Paracuellos

[PATCH v3 09/16] staging: ks7010: remove KS_WLAN_MEM_FLAG definition

2018-04-06 Thread Sergio Paracuellos
This commit removes KS_WLAN_MEM_FLAG definition which is hiding GFP_ATOMIC along the code. It is better to use directly GFP_ATOMIC in kmalloc's because this it is easier to read. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.c | 6 ++ 1

[PATCH v3 06/16] staging: ks7010: move and rename DEVICE_ALIGNMENT into correct header

2018-04-06 Thread Sergio Paracuellos
This commit moves DEVICE_ALIGNMENT definition into the header ks_hostif.h which is where it is being used. This is also defined always so just remove nosense undef definitions also and clean some preprocessor conditional directives in hif_align_size function. Signed-off-by: Sergio Paracuellos

[PATCH v3 14/16] staging: ks7010: fix remaining long line warnings in ks7010_sdio source

2018-04-06 Thread Sergio Paracuellos
This commit fixes remaining checkpatch warnings because of the use of lines longer than 80 characters in ks7010_sdio source file. After this clean, this file has no remaining warnings around. Signed-off-by: Sergio Paracuellos ---

[PATCH v3 13/16] staging: ks7010: remove nonsense comment

2018-04-06 Thread Sergio Paracuellos
This commit removes a comment which has nonsense because it is obvious what the code does just reading SET_NETDEV_DEV declaration. This also fixes a checkpatch warning because a line longer than 80 characters. Signed-off-by: Sergio Paracuellos ---

[PATCH v3 16/16] staging: ks7010: use msecs_to_jiffies in ks7010_rw_function function

2018-04-06 Thread Sergio Paracuellos
This commit replaces custom time calculations done in ks7010_rw_function with msecs_to_jiffies() function which has the same behaviour. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks7010_sdio.c | 8 1 file changed, 4 insertions(+), 4

[PATCH v3 08/16] staging: ks7010: rewrite hif_align_size inline function

2018-04-06 Thread Sergio Paracuellos
This commit rewrites hif_align_size inline function to improve readability. It also change parameters and return type from int to size_t which is the correct and the one which is being used when this function is called from several points of the code. Signed-off-by: Sergio Paracuellos

[PATCH v3 02/16] staging: ks7010: remove EAPOL_VERSION preprocessor definition

2018-04-06 Thread Sergio Paracuellos
This commit removes EAPOL_VERSION define from eap_packet.h header file because it is not being used anywhere. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/eap_packet.h | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH v3 01/16] staging: ks7010: remove not used enum values from eap_packet.h header

2018-04-06 Thread Sergio Paracuellos
This commit removes not used at all enum values from eap_packet.h header file. This values are defined in the kernel ieee80211.h header and the only one that is being used in ks_wlan_net.c source which is WLAN_REASON_MIC_FAILURE is being used from this header. Signed-off-by: Sergio Paracuellos

[PATCH v3 04/16] staging: ks7010: change ETHER_HDR_SIZE definition to use the size of struct ether_hdr

2018-04-06 Thread Sergio Paracuellos
This commit changes ETHER_HDR_SIZE definition which is a hardcoded number using the size of the structure ether_hdr which is the one for what this definition has been created. This improves readability and makes clear the intention of this definition along the code. Signed-off-by: Sergio

[PATCH v3 11/16] staging: ks7010: avoid casts in michael_mic_function calls

2018-04-06 Thread Sergio Paracuellos
This commit removes casts in calls to michael_mic_function. Most of them are nosense because types match perfectly function parameters. To avoid also int casting for len parameter just pass unsigned len to function which makes sense because is only being called with unsigned int len parameters.

[PATCH v3 05/16] staging: ks7010: indent enum properly in eap_packet.h header file

2018-04-06 Thread Sergio Paracuellos
This commit indents properly some enumeration values to improve code readability a bit. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/eap_packet.h | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git

[PATCH v3 00/16] staging: ks7010: more cleanups

2018-04-06 Thread Sergio Paracuellos
This patch series continues with cleanups in this driver. Some checkpatch warnings have been removed as well as nonsense code and code that is not being used at all. Some functions have been rewriten or reviewed to improve readability. v2: - PATCH 8: use ALIGN() macro in rewrite of function

[PATCH v3 07/16] staging: ks7010: remove KS_ATOM preprocessor condtional code

2018-04-06 Thread Sergio Paracuellos
This commit removes KS_ATOM preprocessor conditional code from hif_align_size because it is not defined anywhere. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.h | 4 1 file changed, 4 deletions(-) diff --git

[PATCH v2 16/16] staging: ks7010: use msecs_to_jiffies in ks7010_rw_function function

2018-04-06 Thread Sergio Paracuellos
This commit replaces custom time calculations done in ks7010_rw_function with msecs_to_jiffies() function which has the same behaviour. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks7010_sdio.c | 8 1 file changed, 4 insertions(+), 4

[PATCH v2 04/16] staging: ks7010: change ETHER_HDR_SIZE definition to use the size of struct ether_hdr

2018-04-06 Thread Sergio Paracuellos
This commit changes ETHER_HDR_SIZE definition which is a hardcoded number using the size of the structure ether_hdr which is the one for what this definition has been created. This improves readability and makes clear the intention of this definition along the code. Signed-off-by: Sergio

[PATCH v2 12/16] staging: ks7010: remove '\' character from michael_block function

2018-04-06 Thread Sergio Paracuellos
This commit removes '\' character from michael_block function. It seems these two were not removed properly in the following commit: - staging: ks7010: replace MichaelBlockFunction macro with inline function (c61cc2cc3be358da10121d119356dfe67fe240f2). Signed-off-by: Sergio Paracuellos

[PATCH v2 06/16] staging: ks7010: move and rename DEVICE_ALIGNMENT into correct header

2018-04-06 Thread Sergio Paracuellos
This commit moves DEVICE_ALIGNMENT definition into the header ks_hostif.h which is where it is being used. This is also defined always so just remove nosense undef definitions also and clean some preprocessor conditional directives in hif_align_size function. Signed-off-by: Sergio Paracuellos

[PATCH v2 07/16] staging: ks7010: remove KS_ATOM preprocessor condtional code

2018-04-06 Thread Sergio Paracuellos
This commit removes KS_ATOM preprocessor conditional code from hif_align_size because it is not defined anywhere. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.h | 4 1 file changed, 4 deletions(-) diff --git

[PATCH v2 05/16] staging: ks7010: indent enum properly in eap_packet.h header file

2018-04-06 Thread Sergio Paracuellos
This commit indents properly some enumeration values to improve code readability a bit. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/eap_packet.h | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git

[PATCH v2 03/16] staging: ks7010: remove two redefined defines in eap_packet.h header

2018-04-06 Thread Sergio Paracuellos
This commit removes GENERIC_INFO_ELEM and RSN_INFO_ELEM definitions from eap_packet.h header file which are not being used at all. These two are also defined in the ks_wlan_net.c source file as GENERIC_INFO_ELEM_ID and RSN_INFO_ELEM_ID with the same values. Signed-off-by: Sergio Paracuellos

[PATCH v2 09/16] staging: ks7010: remove KS_WLAN_MEM_FLAG definition

2018-04-06 Thread Sergio Paracuellos
This commit removes KS_WLAN_MEM_FLAG definition which is hiding GFP_ATOMIC along the code. It is better to use directly GFP_ATOMIC in kmalloc's because this it is easier to read. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.c | 6 ++ 1

[PATCH v2 08/16] staging: ks7010: rewrite hif_align_size inline function

2018-04-06 Thread Sergio Paracuellos
This commit rewrites hif_align_size inline function to improve readability. It also change parameters and return type from int to size_t which is the correct and the one which is being used when this function is called from several points of the code. Signed-off-by: Sergio Paracuellos

[PATCH v2 13/16] staging: ks7010: remove nonsense comment

2018-04-06 Thread Sergio Paracuellos
This commit removes a comment which has nonsense because it is obvious what the code does just reading SET_NETDEV_DEV declaration. This also fixes a checkpatch warning because a line longer than 80 characters. Signed-off-by: Sergio Paracuellos ---

[PATCH v2 11/16] staging: ks7010: avoid casts in michael_mic_function calls

2018-04-06 Thread Sergio Paracuellos
This commit removes casts in calls to michael_mic_function. Most of them are nosense because types match perfectly function parameters. To avoid also int casting for len parameter just pass unsigned len to function which makes sense because is only being called with unsigned int len parameters.

[PATCH v2 14/16] staging: ks7010: fix remaining long line warnings in ks7010_sdio source

2018-04-06 Thread Sergio Paracuellos
This commit fixes remaining checkpatch warnings because of the use of lines longer than 80 characters in ks7010_sdio source file. After this clean, this file has no remaining warnings around. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks7010_sdio.c

[PATCH v2 10/16] staging: ks7010: remove nosense #if 1 directive

2018-04-06 Thread Sergio Paracuellos
This commit removes #if 1 directive from code to improve readability. It is always true, so it makes no sense to have it there. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_wlan_net.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[PATCH v2 15/16] staging: ks7010: change sdio related read/write function parameter types

2018-04-06 Thread Sergio Paracuellos
This commit reviews and changes SDIO related read and write functions parameter types to use the preferred u* kernel types. Also length parameter which was defined as int has nonsense because calls to this functions are called useing an unsigned instead. Because of this length parameters have been

[PATCH v2 01/16] staging: ks7010: remove not used enum values from eap_packet.h header

2018-04-06 Thread Sergio Paracuellos
This commit removes not used at all enum values from eap_packet.h header file. This values are defined in the kernel ieee80211.h header and the only one that is being used in ks_wlan_net.c source which is WLAN_REASON_MIC_FAILURE is being used from this header. Signed-off-by: Sergio Paracuellos

[PATCH v2 02/16] staging: ks7010: remove EAPOL_VERSION preprocessor definition

2018-04-06 Thread Sergio Paracuellos
This commit removes EAPOL_VERSION define from eap_packet.h header file because it is not being used anywhere. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/eap_packet.h | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH v2 00/16] staging: ks7010: more cleanups

2018-04-06 Thread Sergio Paracuellos
From: Sergio Paracuellos This patch series continues with cleanups in this driver. Some checkpatch warnings have been removed as well as nonsense code and code that is not being used at all. Some functions have been rewriten or reviewed to improve readability. v2:

Re: [PATCH 09/16] staging: ks7010: remove KS_WLAN_MEM_FLAG definition

2018-04-06 Thread Dan Carpenter
On Fri, Apr 06, 2018 at 01:52:47PM +0200, Sergio Paracuellos wrote: > On Fri, Apr 6, 2018 at 1:07 PM, Dan Carpenter > wrote: > > On Fri, Apr 06, 2018 at 12:38:16PM +0200, Sergio Paracuellos wrote: > >> This commit removes KS_WLAN_MEM_FLAG definition which is > >> hiding

Re: [PATCH 16/16] staging: ks7010: extract JIFFIES_TO_WAIT definition for common code

2018-04-06 Thread Dan Carpenter
On Fri, Apr 06, 2018 at 02:08:31PM +0200, Sergio Paracuellos wrote: > On Fri, Apr 6, 2018 at 1:55 PM, Dan Carpenter > wrote: > > On Fri, Apr 06, 2018 at 12:38:23PM +0200, Sergio Paracuellos wrote: > I don't have hardware yet to test this and see what happends because >

Re: [PATCH 16/16] staging: ks7010: extract JIFFIES_TO_WAIT definition for common code

2018-04-06 Thread Sergio Paracuellos
On Fri, Apr 6, 2018 at 1:55 PM, Dan Carpenter wrote: > On Fri, Apr 06, 2018 at 12:38:23PM +0200, Sergio Paracuellos wrote: >> This commit extracts JIFFIES_TO_WAIT definition to be precalculated >> by preprocessor insted of just do the same operation different times >> in

Re: [PATCH 16/16] staging: ks7010: extract JIFFIES_TO_WAIT definition for common code

2018-04-06 Thread Dan Carpenter
On Fri, Apr 06, 2018 at 12:38:23PM +0200, Sergio Paracuellos wrote: > This commit extracts JIFFIES_TO_WAIT definition to be precalculated > by preprocessor insted of just do the same operation different times > in ks7010_rw_function. > I don't understand what you're saying at all. Are you

Re: [PATCH 09/16] staging: ks7010: remove KS_WLAN_MEM_FLAG definition

2018-04-06 Thread Sergio Paracuellos
On Fri, Apr 6, 2018 at 1:07 PM, Dan Carpenter wrote: > On Fri, Apr 06, 2018 at 12:38:16PM +0200, Sergio Paracuellos wrote: >> This commit removes KS_WLAN_MEM_FLAG definition which is >> hiding GFP_ATOMIC along the code. It is better to use directly >> GFP_ATOMIC in

Re: [PATCH v3] staging: greybus: Fix warning to limit chars per line

2018-04-06 Thread Vaibhav Agarwal
On Fri, Apr 6, 2018 at 4:39 PM, Gaurav Dhingra wrote: > Wrap comment to fix warning "prefer a maximum 75 chars per line" > > Signed-off-by: Gaurav Dhingra > --- > Changes in v2: > - use correct format for multiline comment > Changes

[PATCH v3] staging: greybus: Fix warning to limit chars per line

2018-04-06 Thread Gaurav Dhingra
Wrap comment to fix warning "prefer a maximum 75 chars per line" Signed-off-by: Gaurav Dhingra --- Changes in v2: - use correct format for multiline comment Changes in v3: - include commit log --- drivers/staging/greybus/audio_codec.h | 5 - 1 file

Re: [PATCH 09/16] staging: ks7010: remove KS_WLAN_MEM_FLAG definition

2018-04-06 Thread Dan Carpenter
On Fri, Apr 06, 2018 at 12:38:16PM +0200, Sergio Paracuellos wrote: > This commit removes KS_WLAN_MEM_FLAG definition which is > hiding GFP_ATOMIC along the code. It is better to use directly > GFP_ATOMIC in kmalloc's because this it is easier to read. > > Signed-off-by: Sergio Paracuellos

Re: [PATCH 06/16] staging: ks7010: move and rename DEVICE_ALIGNMENT into correct header

2018-04-06 Thread Dan Carpenter
This patch is fine as-is but later you might want to use the ALIGN() macro. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v2] staging: greybus: Fix warning to limit chars per line

2018-04-06 Thread Viresh Kumar
On 06-04-18, 16:02, Gaurav Dhingra wrote: > I didn't realize that it would be necessary to add it to this patch set. I > thought you guys will do squashing of the commits (v2 and v1) and using just > one commit message (and will take it from last commit), seems like I was > wrong. Now I've

[PATCH 14/16] staging: ks7010: fix remaining checkpatch warnings about long lines in ks7010_sdio source

2018-04-06 Thread Sergio Paracuellos
This commit fixes remaining checkpatch warnings because of the use of lines longer than 80 characters in ks7010_sdio source file. After this clean, this file has no remaining warnings around. Signed-off-by: Sergio Paracuellos ---

[PATCH 12/16] staging: ks7010: remove '\' character from michael_block function

2018-04-06 Thread Sergio Paracuellos
This commit removes '\' character from michael_block function. It seems these two were not removed properly in the following commit: - staging: ks7010: replace MichaelBlockFunction macro with inline function (c61cc2cc3be358da10121d119356dfe67fe240f2). Signed-off-by: Sergio Paracuellos

[PATCH 13/16] staging: ks7010: remove nonsense comment

2018-04-06 Thread Sergio Paracuellos
This commit removes a comment which has nonsense because it is obvious what the code does just reading SET_NETDEV_DEV declaration. This also fixes a checkpatch warning because a line longer than 80 characters. Signed-off-by: Sergio Paracuellos ---

[PATCH 16/16] staging: ks7010: extract JIFFIES_TO_WAIT definition for common code

2018-04-06 Thread Sergio Paracuellos
This commit extracts JIFFIES_TO_WAIT definition to be precalculated by preprocessor insted of just do the same operation different times in ks7010_rw_function. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks7010_sdio.c | 9 + 1 file changed,

[PATCH 04/16] staging: ks7010: change ETHER_HDR_SIZE definition to use the size of struct ether_hdr

2018-04-06 Thread Sergio Paracuellos
This commit changes ETHER_HDR_SIZE definition which is a hardcoded number using the size of the structure ether_hdr which is the one for what this definition has been created. This improves readability and makes clear the intention of this definition along the code. Signed-off-by: Sergio

[PATCH 15/16] staging: ks7010: change sdio related read/write function parameter types

2018-04-06 Thread Sergio Paracuellos
This commit reviews and changes SDIO related read and write functions parameter types to use the preferred u* kernel types. Also lenght parameter which was defined as int has nonsense because calls to this functions are called useing an unsigned instead. Because of this lenght parameters have been

[PATCH 02/16] staging: ks7010: remove EAPOL_VERSION preprocessor definition

2018-04-06 Thread Sergio Paracuellos
This commit removes EAPOL_VERSION define from eap_packet.h header file because it is not being used anywhere. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/eap_packet.h | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH 06/16] staging: ks7010: move and rename DEVICE_ALIGNMENT into correct header

2018-04-06 Thread Sergio Paracuellos
This commit moves DEVICE_ALIGNMENT definition into the header ks_hostif.h which is where it is being used. This is also defined always so just remove nosense undef definitions also and clean some preprocessor conditional directives in hif_align_size function. Signed-off-by: Sergio Paracuellos

[PATCH 11/16] staging: ks7010: avoid casts in michael_mic_function calls

2018-04-06 Thread Sergio Paracuellos
This commit removes casts in calls to michael_mic_function. Most of them are nosense because types match perfectly function parameters. To avoid also int casting for len parameter just pass unsigned len to function which makes sense because is only being called with unsigned int len parameters.

[PATCH 08/16] staging: ks7010: rewrite hif_align_size inline function

2018-04-06 Thread Sergio Paracuellos
This commit rewrites hif_align_size inline function to improve readability. It also change parameters and return type from int to size_t which is the correct and the one which is being used when this function is called from several points of the code. Signed-off-by: Sergio Paracuellos

[PATCH 09/16] staging: ks7010: remove KS_WLAN_MEM_FLAG definition

2018-04-06 Thread Sergio Paracuellos
This commit removes KS_WLAN_MEM_FLAG definition which is hiding GFP_ATOMIC along the code. It is better to use directly GFP_ATOMIC in kmalloc's because this it is easier to read. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.c | 6 ++ 1

[PATCH 01/16] staging: ks7010: remove not used enum values from eap_packet.h header

2018-04-06 Thread Sergio Paracuellos
This commit removes not used at all enum values from eap_packet.h header file. This values are defined in the kernel ieee80211.h header and the only one that is being used in ks_wlan_net.c source which is WLAN_REASON_MIC_FAILURE is being used from this header. Signed-off-by: Sergio Paracuellos

[PATCH 10/16] staging: ks7010: remove nosense #if 1 directive

2018-04-06 Thread Sergio Paracuellos
This commit removes #if 1 directive from code to improve readability. It is always true, so it makes no sense to have it there. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_wlan_net.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[PATCH 07/16] staging: ks7010: remove KS_ATOM preprocessor condtional code

2018-04-06 Thread Sergio Paracuellos
This commit removes KS_ATOM preprocessor conditional code from hif_align_size because it is not defined anywhere. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/ks_hostif.h | 4 1 file changed, 4 deletions(-) diff --git

[PATCH 05/16] staging: ks7010: indent enum properly in eap_packet.h header file

2018-04-06 Thread Sergio Paracuellos
This commit indents properly some enumeration values to improve code readability a bit. Signed-off-by: Sergio Paracuellos --- drivers/staging/ks7010/eap_packet.h | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git

[PATCH 00/16] staging: ks7010: more cleanups

2018-04-06 Thread Sergio Paracuellos
This patch series continues with cleanups in this driver. Some checkpatch warnings have been removed as well as nonsense code and code that is not being used at all. Some functions have been rewriten or reviewed to improve readability. Sergio Paracuellos (16): staging: ks7010: remove not

[PATCH 03/16] staging: ks7010: remove two redefined defines in eap_packet.h header

2018-04-06 Thread Sergio Paracuellos
This commit removes GENERIC_INFO_ELEM and RSN_INFO_ELEM definitions from eap_packet.h header file which are not being used at all. These two are also defined in the ks_wlan_net.c source file as GENERIC_INFO_ELEM_ID and RSN_INFO_ELEM_ID with the same values. Signed-off-by: Sergio Paracuellos

Re: [PATCH v2] staging: greybus: Fix warning to limit chars per line

2018-04-06 Thread Gaurav Dhingra
Hi, On Friday 06 April 2018 03:52 PM, Viresh Kumar wrote: On Fri, Apr 6, 2018 at 3:39 PM, Gaurav Dhingra wrote: Why did you remove the commit log? You had the right one in v1. I didn't realize that it would be necessary to add it to this patch set. I thought

Re: [PATCH v2] staging: greybus: Fix warning to limit chars per line

2018-04-06 Thread Viresh Kumar
On Fri, Apr 6, 2018 at 3:39 PM, Gaurav Dhingra wrote: Why did you remove the commit log? You had the right one in v1. > Signed-off-by: Gaurav Dhingra > --- > Changes in v2: > - use correct format for multiline comment > --- >

[PATCH v2] staging: greybus: Fix warning to limit chars per line

2018-04-06 Thread Gaurav Dhingra
Signed-off-by: Gaurav Dhingra --- Changes in v2: - use correct format for multiline comment --- drivers/staging/greybus/audio_codec.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/staging/greybus/audio_codec.h

Re: [PATCH 07/10] staging: mt7621-mmc: Remove error message in debug

2018-04-06 Thread Christian Lütke-Stetzkamp
On Fri, Apr 06, 2018 at 11:51:24AM +0300, Dan Carpenter wrote: > On Fri, Apr 06, 2018 at 10:36:57AM +0200, Christian Lütke-Stetzkamp wrote: > > If the debug file in proc fs is not successfully created current code > > prints an error message, this is removed. > > > > Reported-by: Dan Carpenter

Re: [PATCH 07/10] staging: mt7621-mmc: Remove error message in debug

2018-04-06 Thread Dan Carpenter
On Fri, Apr 06, 2018 at 10:36:57AM +0200, Christian Lütke-Stetzkamp wrote: > If the debug file in proc fs is not successfully created current code > prints an error message, this is removed. > > Reported-by: Dan Carpenter > Signed-off-by: Christian Lütke-Stetzkamp

[PATCH 03/10] staging: mt7621-mmc: Remove unused global: msdc_6575_host

2018-04-06 Thread Christian Lütke-Stetzkamp
The mt6575_host variable is never used, only set and exported. Removing it for code cleanup. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/sd.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/staging/mt7621-mmc/sd.c

[PATCH 00/10] staging: mt7621-mmc: Fixes and cleanups

2018-04-06 Thread Christian Lütke-Stetzkamp
Again, here are some fixes (most of them reported by Dan Carpenter) and some removements of unused code in the mt7621-mmc driver. With this patches, the driver at least compiles while CONFIG_PM is selected, but it remains untested. Christian Lütke-Stetzkamp (10): staging: mt7621-mmc: Fix power

[PATCH 04/10] staging: mt7621-mmc: Remove unused functions

2018-04-06 Thread Christian Lütke-Stetzkamp
The functions msdc_eirq_cd and msdc_eirq_sdio are defined but never used, so they are removed. This also fixes two compiler warnings: drivers/staging/mt7621-mmc/sd.c:517:13: warning: ‘msdc_eirq_cd’ defined but not used [-Wunused-function] static void msdc_eirq_cd(void *data)

[PATCH 02/10] staging: mt7621-mmc: Remove constant flag

2018-04-06 Thread Christian Lütke-Stetzkamp
The MSDC_SYS_SUSPEND flag is always set and is never unset. Removing it cleans up the code. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/board.h | 1 - drivers/staging/mt7621-mmc/sd.c| 8 2 files changed, 4 insertions(+), 5

[PATCH 10/10] staging: mt7621-mmc: Remove redundant opcode check

2018-04-06 Thread Christian Lütke-Stetzkamp
The opcode check in msdc_command_start is redundant in case of MMC_SET_RELATIVE_ADDR, this is 3 like SD_SEND_RELATIVE_ADDR, so the second check can be removed. Reported-by: Dan Carpenter Signed-off-by: Christian Lütke-Stetzkamp ---

[PATCH 09/10] staging: mt7621-mmc: Fix: copy_from_user() returns a positive value

2018-04-06 Thread Christian Lütke-Stetzkamp
copy_from_user() returns a positive value in case of an error, to fix this the check is turned around, also a better return value is chosen. Reported-by: Dan Carpenter Suggested-by: Dan Carpenter Signed-off-by: Christian Lütke-Stetzkamp

[PATCH 01/10] staging: mt7621-mmc: Fix power management by removing old api

2018-04-06 Thread Christian Lütke-Stetzkamp
The mmc_suspend|resume_host functions have been decrepated in the 3.11 [1] release and were completely removed in 3.13 [2]. Removing the calls to this functions as it was done for other mmc host drivers before the old api was removed (eg. [3]) fixes compile errors in this driver while CONFIG_PM is

[PATCH 07/10] staging: mt7621-mmc: Remove error message in debug

2018-04-06 Thread Christian Lütke-Stetzkamp
If the debug file in proc fs is not successfully created current code prints an error message, this is removed. Reported-by: Dan Carpenter Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/dbg.c | 4 1 file changed, 4

[PATCH 08/10] staging: mt7621-mmc: Fix debug file world writable

2018-04-06 Thread Christian Lütke-Stetzkamp
Currently the debug file in proc fs is world writable, remove the access for other. Reported-by: Dan Carpenter Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/dbg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

[PATCH 05/10] staging: mt7621-mmc: Remove constant flag MSDC_HIGHSPEED

2018-04-06 Thread Christian Lütke-Stetzkamp
The MSDC_HIGHSPEED flag is always set and never unset, remove it to clean up the code. Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/board.h | 1 - drivers/staging/mt7621-mmc/sd.c| 7 ++- 2 files changed, 2 insertions(+), 6 deletions(-)

[PATCH 06/10] staging: mt7621-mmc: Fix dereference before check in msdc_drv_pm

2018-04-06 Thread Christian Lütke-Stetzkamp
In the msdc_drv_pm function the variable mmc is dereferenced before checked. Reordering fixes that. Reported-by: Dan Carpenter Signed-off-by: Christian Lütke-Stetzkamp --- drivers/staging/mt7621-mmc/sd.c | 6 +++--- 1 file changed, 3 insertions(+),

Re: [bug report] staging: mt7621-mmc: MIPS: ralink: add sdhci for mt7620a SoC

2018-04-06 Thread Greg KH
On Fri, Apr 06, 2018 at 10:09:54AM +0300, Dan Carpenter wrote: > It feels sort of rude talking about Greg like a machine, but to me > having a very predictable maintainer is a fantastic thing. I try to be > machine-like when I am reviewing patches because it removes a lot of the > questions about

Re: [bug report] staging: mt7621-mmc: MIPS: ralink: add sdhci for mt7620a SoC

2018-04-06 Thread Dan Carpenter
On Thu, Apr 05, 2018 at 06:39:47PM +0200, Christian Lütke-Stetzkamp wrote: > > Hi Dan, > > thanks for the report, I have created patches for all of these and > will send them, once my previous series got merged, because I based > them on that status. I would just be optimistic and send them