linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Ajay.Kathat@microchip.com
Cc: linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org,
	gregkh@linuxfoundation.org, stable@vger.kernel.org,
	Adham.Abozaeid@microchip.com, johannes@sipsolutions.net
Subject: Re: [PATCH 2/9] staging: wilc1000: fix to set the correct value for 'vif_num'
Date: Thu, 7 Feb 2019 11:26:46 +0300	[thread overview]
Message-ID: <20190207082646.GD1978@kadam> (raw)
In-Reply-To: <1549519927-2651-3-git-send-email-ajay.kathat@microchip.com>

On Thu, Feb 07, 2019 at 07:22:25AM +0000, Ajay.Kathat@microchip.com wrote:
> From: Ajay Singh <ajay.kathat@microchip.com>
> 
> Set correct interface count value in '->vif_num'.
> 'vif_num' was incorrectly set one less than total number of interfaces
> because 'i' is used to set its value, which starts from 0.
> 
> Fixes: 735bb39ca3be ("staging: wilc1000: simplify vif[i]->ndev accesses")
> Cc: <stable@vger.kernel.org> # v4.10
> Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
> ---
>  drivers/staging/wilc1000/linux_wlan.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
> index 648b658..8fa5f90 100644
> --- a/drivers/staging/wilc1000/linux_wlan.c
> +++ b/drivers/staging/wilc1000/linux_wlan.c
> @@ -1021,7 +1021,7 @@ int wilc_netdev_init(struct wilc **wilc, struct device *dev, int io_type,

The line before the diff looks like this:

		vif->idx = wl->vif_num;

can we can change that to:

		vif->idx = i;

It's the same thing, but more clear.

>  		vif->wilc = *wilc;
>  		vif->ndev = ndev;
>  		wl->vif[i] = vif;
> -		wl->vif_num = i;
> +		wl->vif_num = i + 1;
>  		ndev->netdev_ops = &wilc_netdev_ops;

regards,
dan carpenter


  reply	other threads:[~2019-02-07  8:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-07  7:22 [PATCH 0/9] staging: wilc1000: fixes & changes for mainline review comments Ajay.Kathat
2019-02-07  7:22 ` [PATCH 1/9] staging: wilc1000: revert fix related to vif index Ajay.Kathat
2019-02-07  8:12   ` Dan Carpenter
2019-02-07  9:39     ` Ajay.Kathat
2019-02-07 10:02       ` Dan Carpenter
2019-02-07  7:22 ` [PATCH 2/9] staging: wilc1000: fix to set the correct value for 'vif_num' Ajay.Kathat
2019-02-07  8:26   ` Dan Carpenter [this message]
2019-02-07  7:22 ` [PATCH 3/9] staging: wilc1000: add 'wilc_' prefix to have proper namespace Ajay.Kathat
2019-02-07  7:22 ` [PATCH 4/9] staging: wilc1000: move macro and function prototype from wilc_wlan_if.h file Ajay.Kathat
2019-02-07  7:22 ` [PATCH 5/9] staging: wilc1000: avoid function forward declaration in wilc_sdio.c file Ajay.Kathat
2019-02-07  7:22 ` [PATCH 6/9] staging: wilc1000: added 'wilc_' prefix for function " Ajay.Kathat
2019-02-07  7:22 ` [PATCH 7/9] staging: wilc1000: rename wilc_frmw_to_linux() Ajay.Kathat
2019-02-07  7:22 ` [PATCH 8/9] staging: wilc1000: remove 'linux_' prefix in function names Ajay.Kathat
2019-02-07  7:22 ` [PATCH 9/9] staging: wilc1000: rename linux_wlan.c and linux_mon.c Ajay.Kathat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190207082646.GD1978@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=Adham.Abozaeid@microchip.com \
    --cc=Ajay.Kathat@microchip.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).