Message ID | 1549134974-5545-9-git-send-email-ajay.kathat@microchip.com (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Kalle Valo |
Headers | show |
Series | staging: wilc1000: cleanup patches & handle review comments | expand |
On Sat, Feb 02, 2019 at 07:17:13PM +0000, Ajay.Kathat@microchip.com wrote: > From: Ajay Singh <ajay.kathat@microchip.com> > > The value of 'vif_num'(interface count) starts with 0, so modified the > loop conditions to execute for all interface. > > Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> The right thing to do is to change ->vif_num = i + 1 in wilc_netdev_init(). That's how it was originally. Please, add a Fixes tag. Fixes: 735bb39ca3be ("staging: wilc1000: simplify vif[i]->ndev accesses") regards, dan carpenter
On 2/4/2019 1:43 PM, Dan Carpenter wrote: > On Sat, Feb 02, 2019 at 07:17:13PM +0000, Ajay.Kathat@microchip.com wrote: >> From: Ajay Singh <ajay.kathat@microchip.com> >> >> The value of 'vif_num'(interface count) starts with 0, so modified the >> loop conditions to execute for all interface. >> >> Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> > > The right thing to do is to change ->vif_num = i + 1 in > wilc_netdev_init(). That's how it was originally. Please, add a > Fixes tag. > > Fixes: 735bb39ca3be ("staging: wilc1000: simplify vif[i]->ndev accesses") > Thanks. Sure, I will add Fixes tag and resubmit the changes. Can other patches from the series be applied excluding this or should I resubmit the complete series? Please suggest. Regards, Ajay
On Mon, Feb 04, 2019 at 09:42:36AM +0000, Ajay.Kathat@microchip.com wrote: > > > On 2/4/2019 1:43 PM, Dan Carpenter wrote: > > On Sat, Feb 02, 2019 at 07:17:13PM +0000, Ajay.Kathat@microchip.com wrote: > >> From: Ajay Singh <ajay.kathat@microchip.com> > >> > >> The value of 'vif_num'(interface count) starts with 0, so modified the > >> loop conditions to execute for all interface. > >> > >> Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> > > > > The right thing to do is to change ->vif_num = i + 1 in > > wilc_netdev_init(). That's how it was originally. Please, add a > > Fixes tag. > > > > Fixes: 735bb39ca3be ("staging: wilc1000: simplify vif[i]->ndev accesses") > > > > Thanks. Sure, I will add Fixes tag and resubmit the changes. > > Can other patches from the series be applied excluding this or should I > resubmit the complete series? > Please suggest. I don't have an opinion on that. I guess if you just resend them all, that's the easiest for Greg. regards, dan carpenter
On Mon, Feb 04, 2019 at 12:47:23PM +0300, Dan Carpenter wrote: > On Mon, Feb 04, 2019 at 09:42:36AM +0000, Ajay.Kathat@microchip.com wrote: > > > > > > On 2/4/2019 1:43 PM, Dan Carpenter wrote: > > > On Sat, Feb 02, 2019 at 07:17:13PM +0000, Ajay.Kathat@microchip.com wrote: > > >> From: Ajay Singh <ajay.kathat@microchip.com> > > >> > > >> The value of 'vif_num'(interface count) starts with 0, so modified the > > >> loop conditions to execute for all interface. > > >> > > >> Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> > > > > > > The right thing to do is to change ->vif_num = i + 1 in > > > wilc_netdev_init(). That's how it was originally. Please, add a > > > Fixes tag. > > > > > > Fixes: 735bb39ca3be ("staging: wilc1000: simplify vif[i]->ndev accesses") > > > > > > > Thanks. Sure, I will add Fixes tag and resubmit the changes. > > > > Can other patches from the series be applied excluding this or should I > > resubmit the complete series? > > Please suggest. > > I don't have an opinion on that. I guess if you just resend them all, > that's the easiest for Greg. I took the first 7 patches here, so just a respin of the remaining ones would be fine. thanks, greg k-h
Hi Greg, On 2/4/2019 5:09 PM, Greg KH wrote: > On Mon, Feb 04, 2019 at 12:47:23PM +0300, Dan Carpenter wrote: >> On Mon, Feb 04, 2019 at 09:42:36AM +0000, Ajay.Kathat@microchip.com wrote: >>> >>> >>> On 2/4/2019 1:43 PM, Dan Carpenter wrote: >>>> On Sat, Feb 02, 2019 at 07:17:13PM +0000, Ajay.Kathat@microchip.com wrote: >>>>> From: Ajay Singh <ajay.kathat@microchip.com> >>>>> >>>>> The value of 'vif_num'(interface count) starts with 0, so modified the >>>>> loop conditions to execute for all interface. >>>>> >>>>> Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> >>>> >>>> The right thing to do is to change ->vif_num = i + 1 in >>>> wilc_netdev_init(). That's how it was originally. Please, add a >>>> Fixes tag. >>>> >>>> Fixes: 735bb39ca3be ("staging: wilc1000: simplify vif[i]->ndev accesses") >>>> >>> >>> Thanks. Sure, I will add Fixes tag and resubmit the changes. >>> >>> Can other patches from the series be applied excluding this or should I >>> resubmit the complete series? >>> Please suggest. >> >> I don't have an opinion on that. I guess if you just resend them all, >> that's the easiest for Greg. > > I took the first 7 patches here, so just a respin of the remaining ones > would be fine. > Thanks alot. This patch will take some time for modification. As remaining patches are not dependent on this. I will resend them. Regards, Ajay
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 3576834..fde236a 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -1659,7 +1659,7 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler) return -ENOMEM; *hif_drv_handler = hif_drv; - for (i = 0; i < wilc->vif_num; i++) + for (i = 0; i <= wilc->vif_num; i++) if (dev == wilc->vif[i]->ndev) { wilc->vif[i]->hif_drv = hif_drv; hif_drv->driver_handler_id = i + 1; diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 81472d2..466a1fa 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -164,7 +164,7 @@ static struct net_device *get_if_handler(struct wilc *wilc, u8 *mac_header) bssid = mac_header + 10; bssid1 = mac_header + 4; - for (i = 0; i < wilc->vif_num; i++) { + for (i = 0; i <= wilc->vif_num; i++) { if (wilc->vif[i]->mode == WILC_STATION_MODE) if (ether_addr_equal_unaligned(bssid, wilc->vif[i]->bssid)) @@ -195,7 +195,7 @@ int wilc_wlan_get_num_conn_ifcs(struct wilc *wilc) u8 i = 0; u8 ret_val = 0; - for (i = 0; i < wilc->vif_num; i++) + for (i = 0; i <= wilc->vif_num; i++) if (!is_zero_ether_addr(wilc->vif[i]->bssid)) ret_val++; @@ -739,7 +739,7 @@ static int wilc_mac_open(struct net_device *ndev) return ret; } - for (i = 0; i < wl->vif_num; i++) { + for (i = 0; i <= wl->vif_num; i++) { if (ndev == wl->vif[i]->ndev) { wilc_set_wfi_drv_handler(vif, wilc_get_vif_idx(vif), vif->iftype, vif->ifc_id); @@ -941,7 +941,7 @@ void wilc_wfi_mgmt_rx(struct wilc *wilc, u8 *buff, u32 size) int i = 0; struct wilc_vif *vif; - for (i = 0; i < wilc->vif_num; i++) { + for (i = 0; i <= wilc->vif_num; i++) { vif = netdev_priv(wilc->vif[i]->ndev); if (vif->monitor_flag) { wilc_wfi_monitor_rx(wilc->monitor_dev, buff, size);