staging: vt6656: remove variable declaration
PATCH 2/7 staging: vt6656: remove variable declaration
int ret is uneccesarily declared and initialised to 0. Return 0 directly.
--- drivers/staging/vt6656/card.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/vt6656/card.c +1 -3
@@ -719,8 +719,6 @@ int vnt_radio_power_off(struct vnt_private *priv)*/ int vnt_radio_power_on (struct vnt_private *priv) { -int ret =0 ; -vnt_exit_deep_sleep (priv);vnt_mac_reg_bits_on (priv,MAC_REG_HOSTCR ,HOSTCR_RXON );
@@ -739,7 +737,7 @@ int vnt_radio_power_on(struct vnt_private *priv)vnt_mac_reg_bits_off (priv,MAC_REG_GPIOCTL1 ,GPIO3_INTMD ); -return ret; +return 0 ; }void vnt_set_bss_mode (struct vnt_private *priv)
Signature · 1 line
2.17.1
--- Please note the new email address ---
Quoted 22 lines · Kaaira Gupta
int ret is uneccesarily declared and initialised to 0. Return 0 directly.
Signed-off-by Kaaira Gupta <[email protected]>--- drivers/staging/vt6656/card.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/staging/vt6656/card.c +0
-2@@ -719,8 +719,6 @@ int vnt_radio_power_off(struct vnt_private *priv)*/ int vnt_radio_power_on (struct vnt_private *priv) { -int ret =0 ; -vnt_exit_deep_sleep (priv);vnt_mac_reg_bits_on (priv,MAC_REG_HOSTCR ,HOSTCR_RXON );
drivers/staging/vt6656/card.c int vnt_radio_power_on(struct vnt_private *priv) · line 741
Quoted 6 lines
drivers/staging/vt6656/card.c +1
-1@@ -739,7 +737,7 @@ int vnt_radio_power_on(struct vnt_private *priv)vnt_mac_reg_bits_off (priv,MAC_REG_GPIOCTL1 ,GPIO3_INTMD ); -return ret; +return 0 ; }
The change looks fine, but since the change has to do with the return value, itcould be reasonable to adjust the comment about the return value as well:
Return Value: true if success; otherwise false
Actually, the comment seems completely off, since the function does not return either true or false.
julia
Quoted 3 lines · Julia Lawall
--- Please note the new email address ---
Which mail address?
Quoted 29 lines · Kaaira Gupta
Quoted 26 lines
int ret is uneccesarily declared and initialised to 0. Return 0 directly.
Signed-off-by Kaaira Gupta <[email protected]>--- drivers/staging/vt6656/card.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/staging/vt6656/card.c +0
-2@@ -719,8 +719,6 @@ int vnt_radio_power_off(struct vnt_private *priv)*/ int vnt_radio_power_on (struct vnt_private *priv) { -int ret =0 ; -vnt_exit_deep_sleep (priv);vnt_mac_reg_bits_on (priv,MAC_REG_HOSTCR ,HOSTCR_RXON );@@ -739,7 +737,7 @@ int vnt_radio_power_on(struct vnt_private *priv)vnt_mac_reg_bits_off (priv,MAC_REG_GPIOCTL1 ,GPIO3_INTMD );
Quoted 7 lines
drivers/staging/vt6656/card.c int vnt_radio_power_on(struct vnt_private *priv) · line 741
Quoted 3 lines
drivers/staging/vt6656/card.c +1
-1-return ret; +return 0 ; }The change looks fine, but since the change has to do with the return value, itcould be reasonable to adjust the comment about the return value as well:
Please explain where I should add this comment? Are you talking about the commit?
Quoted 7 lines
Return Value: true if success; otherwise false
Actually, the comment seems completely off, since the function does not return either true or false.
julia