Message ID | 20200410090942.27239-1-yanaijie@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 2fd5fdca6a3ae0d7333c086e019ba6c4330fa0a8 |
Delegated to: | Kalle Valo |
Headers | show |
Series | libertas: make lbs_init_mesh() void | expand |
On Fri, Apr 10, 2020 at 05:09:42PM +0800, Jason Yan wrote: > Fix the following coccicheck warning: > > drivers/net/wireless/marvell/libertas/mesh.c:833:5-8: Unneeded variable: > "ret". Return "0" on line 874 > > Reported-by: Hulk Robot <hulkci@huawei.com> > Signed-off-by: Jason Yan <yanaijie@huawei.com> Reviewed-by: Lubomir Rintel <lkundrak@v3.sk> Thank you Lubo > --- > drivers/net/wireless/marvell/libertas/mesh.c | 6 +----- > drivers/net/wireless/marvell/libertas/mesh.h | 2 +- > 2 files changed, 2 insertions(+), 6 deletions(-) > > diff --git a/drivers/net/wireless/marvell/libertas/mesh.c b/drivers/net/wireless/marvell/libertas/mesh.c > index 44c8a550da4c..f5b78257d551 100644 > --- a/drivers/net/wireless/marvell/libertas/mesh.c > +++ b/drivers/net/wireless/marvell/libertas/mesh.c > @@ -828,10 +828,8 @@ static void lbs_persist_config_remove(struct net_device *dev) > * Check mesh FW version and appropriately send the mesh start > * command > */ > -int lbs_init_mesh(struct lbs_private *priv) > +void lbs_init_mesh(struct lbs_private *priv) > { > - int ret = 0; > - > /* Determine mesh_fw_ver from fwrelease and fwcapinfo */ > /* 5.0.16p0 9.0.0.p0 is known to NOT support any mesh */ > /* 5.110.22 have mesh command with 0xa3 command id */ > @@ -870,8 +868,6 @@ int lbs_init_mesh(struct lbs_private *priv) > > /* Stop meshing until interface is brought up */ > lbs_mesh_config(priv, CMD_ACT_MESH_CONFIG_STOP, 1); > - > - return ret; > } > > void lbs_start_mesh(struct lbs_private *priv) > diff --git a/drivers/net/wireless/marvell/libertas/mesh.h b/drivers/net/wireless/marvell/libertas/mesh.h > index 1561018f226f..d49717b20c09 100644 > --- a/drivers/net/wireless/marvell/libertas/mesh.h > +++ b/drivers/net/wireless/marvell/libertas/mesh.h > @@ -16,7 +16,7 @@ > > struct net_device; > > -int lbs_init_mesh(struct lbs_private *priv); > +void lbs_init_mesh(struct lbs_private *priv); > void lbs_start_mesh(struct lbs_private *priv); > int lbs_deinit_mesh(struct lbs_private *priv); > > -- > 2.17.2 >
Jason Yan <yanaijie@huawei.com> wrote: > Fix the following coccicheck warning: > > drivers/net/wireless/marvell/libertas/mesh.c:833:5-8: Unneeded variable: > "ret". Return "0" on line 874 > > Reported-by: Hulk Robot <hulkci@huawei.com> > Signed-off-by: Jason Yan <yanaijie@huawei.com> > Reviewed-by: Lubomir Rintel <lkundrak@v3.sk> Patch applied to wireless-drivers-next.git, thanks. 2fd5fdca6a3a libertas: make lbs_init_mesh() void
diff --git a/drivers/net/wireless/marvell/libertas/mesh.c b/drivers/net/wireless/marvell/libertas/mesh.c index 44c8a550da4c..f5b78257d551 100644 --- a/drivers/net/wireless/marvell/libertas/mesh.c +++ b/drivers/net/wireless/marvell/libertas/mesh.c @@ -828,10 +828,8 @@ static void lbs_persist_config_remove(struct net_device *dev) * Check mesh FW version and appropriately send the mesh start * command */ -int lbs_init_mesh(struct lbs_private *priv) +void lbs_init_mesh(struct lbs_private *priv) { - int ret = 0; - /* Determine mesh_fw_ver from fwrelease and fwcapinfo */ /* 5.0.16p0 9.0.0.p0 is known to NOT support any mesh */ /* 5.110.22 have mesh command with 0xa3 command id */ @@ -870,8 +868,6 @@ int lbs_init_mesh(struct lbs_private *priv) /* Stop meshing until interface is brought up */ lbs_mesh_config(priv, CMD_ACT_MESH_CONFIG_STOP, 1); - - return ret; } void lbs_start_mesh(struct lbs_private *priv) diff --git a/drivers/net/wireless/marvell/libertas/mesh.h b/drivers/net/wireless/marvell/libertas/mesh.h index 1561018f226f..d49717b20c09 100644 --- a/drivers/net/wireless/marvell/libertas/mesh.h +++ b/drivers/net/wireless/marvell/libertas/mesh.h @@ -16,7 +16,7 @@ struct net_device; -int lbs_init_mesh(struct lbs_private *priv); +void lbs_init_mesh(struct lbs_private *priv); void lbs_start_mesh(struct lbs_private *priv); int lbs_deinit_mesh(struct lbs_private *priv);
Fix the following coccicheck warning: drivers/net/wireless/marvell/libertas/mesh.c:833:5-8: Unneeded variable: "ret". Return "0" on line 874 Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Jason Yan <yanaijie@huawei.com> --- drivers/net/wireless/marvell/libertas/mesh.c | 6 +----- drivers/net/wireless/marvell/libertas/mesh.h | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-)