Re: [PATCH 02/12] staging: wilc1000: fix too many leading tabs warning in sdio_clear_int_ext()

2018-02-21 Thread Claudiu Beznea
Hi Ajay,

Sure, I will take a look.

Thank you,
Claudiu

On 21.02.2018 18:25, Ajay Singh wrote:
> Hi Claudiu,
> 
> On Mon, 19 Feb 2018 15:33:09 +0200
> Claudiu Beznea  wrote:
> 
>> Since you re-factor this, as I suggested in patch:
>> "[PATCH 6/6] staging: wilc1000: fix line over 80 chars in
>> wilc_spi_clear_int_ext()" form your previous series:
>> "fix line over 80 char & coding style in wilc_spi.c",
>> for code starting here:
> 
> 
> Submitted a new patch "[PATCH 3/4] staging: wilc1000: refactor
> wilc_spi_clear_int_ext() by using GENMASK macro" 
> &
> "[PATCH 4/4] staging: wilc1000: refactor sdio_clear_int_ext() 
> by using GENMASK macro" which contain changes as suggested.
> 
>>
>> and ending here, further improvements could be done. Since the current series
>> was accepted, maybe add these to a todo list and review them later?
> 
> For both SPI and SDIO the changes are done. Please review and let me know
> if you any inputs.
> 
> 
> regards,
> ajay
> 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 02/12] staging: wilc1000: fix too many leading tabs warning in sdio_clear_int_ext()

2018-02-21 Thread Ajay Singh
Hi Claudiu,

On Mon, 19 Feb 2018 15:33:09 +0200
Claudiu Beznea  wrote:

> Since you re-factor this, as I suggested in patch:
> "[PATCH 6/6] staging: wilc1000: fix line over 80 chars in
> wilc_spi_clear_int_ext()" form your previous series:
> "fix line over 80 char & coding style in wilc_spi.c",
> for code starting here:


Submitted a new patch "[PATCH 3/4] staging: wilc1000: refactor
wilc_spi_clear_int_ext() by using GENMASK macro" 
&
"[PATCH 4/4] staging: wilc1000: refactor sdio_clear_int_ext() 
by using GENMASK macro" which contain changes as suggested.

> 
> and ending here, further improvements could be done. Since the current series
> was accepted, maybe add these to a todo list and review them later?

For both SPI and SDIO the changes are done. Please review and let me know
if you any inputs.


regards,
ajay
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 02/12] staging: wilc1000: fix too many leading tabs warning in sdio_clear_int_ext()

2018-02-19 Thread Claudiu Beznea
Hi Ajay,

On 16.02.2018 17:11, Ajay Singh wrote:
> Refactor sdio_clear_int_ext() function to remove "Too many leading tabs"
> warning reported by checkpatch.pl script.
> 
> Signed-off-by: Ajay Singh 
> ---
>  drivers/staging/wilc1000/wilc_sdio.c | 134 
> +--
>  1 file changed, 65 insertions(+), 69 deletions(-)
> 
> diff --git a/drivers/staging/wilc1000/wilc_sdio.c 
> b/drivers/staging/wilc1000/wilc_sdio.c
> index 6ce9c94..27ec90e 100644
> --- a/drivers/staging/wilc1000/wilc_sdio.c
> +++ b/drivers/staging/wilc1000/wilc_sdio.c
> @@ -871,6 +871,7 @@ static int sdio_clear_int_ext(struct wilc *wilc, u32 val)
>  {
>   struct sdio_func *func = dev_to_sdio_func(wilc->dev);
>   int ret;
> + int vmm_ctl;
>  
>   if (g_sdio.has_thrpt_enh3) {
>   u32 reg;
> @@ -909,84 +910,79 @@ static int sdio_clear_int_ext(struct wilc *wilc, u32 
> val)
>   goto _fail_;
>   }
>   }
> - } else {
> - if (g_sdio.irq_gpio) {
> - /* see below. has_thrpt_enh2 uses register 0xf8 to 
> clear interrupts. */
> - /* Cannot clear multiple interrupts. Must clear each 
> interrupt individually */
> - u32 flags;
> -
> - flags = val & (BIT(MAX_NUM_INT) - 1);
> - if (flags) {
> - int i;
> -
> - ret = 1;
> - for (i = 0; i < g_sdio.nint; i++) {
> - if (flags & 1) {
> - struct sdio_cmd52 cmd;
> -
> - cmd.read_write = 1;
> - cmd.function = 0;
> - cmd.raw = 0;
> - cmd.address = 0xf8;
> - cmd.data = BIT(i);
> -
> - ret = wilc_sdio_cmd52(wilc, 
> &cmd);
> - if (ret) {
> - dev_err(&func->dev,
> - "Failed cmd52, 
> set 0xf8 data (%d) ...\n",
> - __LINE__);
> - goto _fail_;
> - }
> + return 1;
> + }> +if (g_sdio.irq_gpio) {

Since you re-factor this, as I suggested in patch:
"[PATCH 6/6] staging: wilc1000: fix line over 80 chars in
wilc_spi_clear_int_ext()" form your previous series:
"fix line over 80 char & coding style in wilc_spi.c",
for code starting here:

> + /* see below. has_thrpt_enh2 uses register 0xf8 to clear 
> interrupts. */
> + /* Cannot clear multiple interrupts. Must clear each interrupt 
> individually */
> + u32 flags;
> +
> + flags = val & (BIT(MAX_NUM_INT) - 1);
> + if (flags) {
> + int i;
> +
> + ret = 1;
> + for (i = 0; i < g_sdio.nint; i++) {
> + if (flags & 1) {
> + struct sdio_cmd52 cmd;
> +
> + cmd.read_write = 1;
> + cmd.function = 0;
> + cmd.raw = 0;
> + cmd.address = 0xf8;
> + cmd.data = BIT(i);
> +
> + ret = wilc_sdio_cmd52(wilc, &cmd);
> + if (ret) {
> + dev_err(&func->dev,
> + "Failed cmd52, set 0xf8 
> data (%d) ...\n",
> + __LINE__);
> + goto _fail_;
>   }
> - if (!ret)
> - break;
> - flags >>= 1;
>   }
>   if (!ret)
> - goto _fail_;
> - for (i = g_sdio.nint; i < MAX_NUM_INT; i++) {
> - if (flags & 1)
> - dev_err(&func->dev,
> - "Unexpected interrupt 
> cleared %d...\n",
> - i);
> - flags >>= 1;
> - }
> + break;
> + flags >>= 1;
>   }
and e