Skip to contentSkip to conversation

staging: vt6656: Fix return values

PATCH Superseded Namrata A Shettar 2 participants 6 messages Sep 26, 2016 – Sep 28, 2016 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover staging: vt6656: Fix return values

Remove unnecessary return values. Change return type of corresponding functions to 'void'. Make changes in header file to reflect this.

Namrata A Shettar (2):
staging: vt6656: Remove unnecessary return values
staging: vt6656: Make return type changes of functions

 drivers/staging/vt6656/card.c | 23 ++++++-----------------
 drivers/staging/vt6656/card.h |  6 +++---
 2 files changed, 9 insertions(+), 20 deletions(-)
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/2 staging: vt6656: Remove unnecessary return values

Remove unnecessary return values. Change return type of functions and comment accordingly.

---
 drivers/staging/vt6656/card.c | 23 ++++++-----------------
 1 file changed, 6 insertions(+), 17 deletions(-)
drivers/staging/vt6656/card.c +6 -17
index 53b469c..59bbfd1 100644
@@ -559,14 +559,12 @@ void vnt_adjust_tsf(struct vnt_private *priv, u8 rx_rate,
  *  Out:
  *	current_tsf	- Current TSF counter
  *
- * Return Value: true if success; otherwise false
+ * Return Value: none
  *
  */
-bool vnt_get_current_tsf(struct vnt_private *priv, u64 *current_tsf)
+void vnt_get_current_tsf(struct vnt_private *priv, u64 *current_tsf)
 {
 	*current_tsf = priv->current_tsf;
-
-	return true;
 }
 
 /*
@@ -703,13 +701,11 @@ void vnt_update_next_tbtt(struct vnt_private *priv, u64 tsf,
  *  Out:
  *      none
  *
- * Return Value: true if success; otherwise false
+ * Return Value: none
  *
  */
-int vnt_radio_power_off(struct vnt_private *priv)
+void vnt_radio_power_off(struct vnt_private *priv)
 {
-	int ret = true;
-
 	switch (priv->rf_type) {
 	case RF_AL2230:
 	case RF_AL2230S:
@@ -727,8 +723,6 @@ int vnt_radio_power_off(struct vnt_private *priv)
 	vnt_set_deep_sleep(priv);
 
 	vnt_mac_reg_bits_on(priv, MAC_REG_GPIOCTL1, GPIO3_INTMD);
-
-	return ret;
 }
 
 /*
@@ -740,13 +734,10 @@ int vnt_radio_power_off(struct vnt_private *priv)
  *  Out:
  *      none
  *
- * Return Value: true if success; otherwise false
- *
+ * Return Value: none
  */
-int vnt_radio_power_on(struct vnt_private *priv)
+void vnt_radio_power_on(struct vnt_private *priv)
 {
-	int ret = true;
-
 	vnt_exit_deep_sleep(priv);
 
 	vnt_mac_reg_bits_on(priv, MAC_REG_HOSTCR, HOSTCR_RXON);
@@ -764,8 +755,6 @@ int vnt_radio_power_on(struct vnt_private *priv)
 	}
 
 	vnt_mac_reg_bits_off(priv, MAC_REG_GPIOCTL1, GPIO3_INTMD);
-
-	return ret;
 }
 
 void vnt_set_bss_mode(struct vnt_private *priv)
Signature · 1 line
2.7.4
#2 lore raw

PATCH 2/2 staging: vt6656: Make return type changes of functions

In reply to Namrata A Shettar

Change return type of functions to reflect changes in code.

---
 drivers/staging/vt6656/card.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/vt6656/card.h +3 -3
index c2cde7e..84270c1 100644
@@ -41,14 +41,14 @@ void vnt_update_ifs(struct vnt_private *);
 void vnt_update_top_rates(struct vnt_private *);
 int vnt_ofdm_min_rate(struct vnt_private *);
 void vnt_adjust_tsf(struct vnt_private *, u8, u64, u64);
-bool vnt_get_current_tsf(struct vnt_private *, u64 *);
+void vnt_get_current_tsf(struct vnt_private *, u64 *);
 bool vnt_clear_current_tsf(struct vnt_private *);
 void vnt_reset_next_tbtt(struct vnt_private *, u16);
 void vnt_update_next_tbtt(struct vnt_private *, u64, u16);
 u64 vnt_get_next_tbtt(u64, u16);
 u64 vnt_get_tsf_offset(u8 byRxRate, u64 qwTSF1, u64 qwTSF2);
-int vnt_radio_power_off(struct vnt_private *);
-int vnt_radio_power_on(struct vnt_private *);
+void vnt_radio_power_off(struct vnt_private *);
+void vnt_radio_power_on(struct vnt_private *);
 u8 vnt_get_pkt_type(struct vnt_private *);
 void vnt_set_bss_mode(struct vnt_private *);
 
Signature · 1 line
2.7.4
#3 lore raw

Re: [PATCH 2/2] staging: vt6656: Make return type changes of functions

Quoted 18 lines · Namrata A Shettar

Change return type of functions to reflect changes in code.

---
 drivers/staging/vt6656/card.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/vt6656/card.h +1 -1
index c2cde7e..84270c1 100644
@@ -41,14 +41,14 @@ void vnt_update_ifs(struct vnt_private *);
 void vnt_update_top_rates(struct vnt_private *);
 int vnt_ofdm_min_rate(struct vnt_private *);
 void vnt_adjust_tsf(struct vnt_private *, u8, u64, u64);
-bool vnt_get_current_tsf(struct vnt_private *, u64 *);
+void vnt_get_current_tsf(struct vnt_private *, u64 *);
 bool vnt_clear_current_tsf(struct vnt_private *);

drivers/staging/vt6656/card.h void vnt_update_ifs(struct vnt_private *); · line 53

Quoted 10 lines
drivers/staging/vt6656/card.h +2 -2
 void vnt_reset_next_tbtt(struct vnt_private *, u16);
 void vnt_update_next_tbtt(struct vnt_private *, u64, u16);
 u64 vnt_get_next_tbtt(u64, u16);
 u64 vnt_get_tsf_offset(u8 byRxRate, u64 qwTSF1, u64 qwTSF2);
-int vnt_radio_power_off(struct vnt_private *);
-int vnt_radio_power_on(struct vnt_private *);
+void vnt_radio_power_off(struct vnt_private *);
+void vnt_radio_power_on(struct vnt_private *);
 u8 vnt_get_pkt_type(struct vnt_private *);
 void vnt_set_bss_mode(struct vnt_private *);

You have to do this in your first patch, as the build broke without these changes, right?

You can never break the build with any single patch.

Please fix up and resend.

thanks,

greg k-h

#4 lore raw

Re: [PATCH 2/2] staging: vt6656: Make return type changes of functions

Quoted 33 lines · Greg Kroah-Hartman
Quoted 18 lines · Namrata A Shettar

Change return type of functions to reflect changes in code.

---
 drivers/staging/vt6656/card.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/vt6656/card.h +1 -1
index c2cde7e..84270c1 100644
@@ -41,14 +41,14 @@ void vnt_update_ifs(struct vnt_private *);
 void vnt_update_top_rates(struct vnt_private *);
 int vnt_ofdm_min_rate(struct vnt_private *);
 void vnt_adjust_tsf(struct vnt_private *, u8, u64, u64);
-bool vnt_get_current_tsf(struct vnt_private *, u64 *);
+void vnt_get_current_tsf(struct vnt_private *, u64 *);
 bool vnt_clear_current_tsf(struct vnt_private *);

drivers/staging/vt6656/card.h void vnt_update_ifs(struct vnt_private *); · line 53

Quoted 10 lines
drivers/staging/vt6656/card.h +2 -2
 void vnt_reset_next_tbtt(struct vnt_private *, u16);
 void vnt_update_next_tbtt(struct vnt_private *, u64, u16);
 u64 vnt_get_next_tbtt(u64, u16);
 u64 vnt_get_tsf_offset(u8 byRxRate, u64 qwTSF1, u64 qwTSF2);
-int vnt_radio_power_off(struct vnt_private *);
-int vnt_radio_power_on(struct vnt_private *);
+void vnt_radio_power_off(struct vnt_private *);
+void vnt_radio_power_on(struct vnt_private *);
 u8 vnt_get_pkt_type(struct vnt_private *);
 void vnt_set_bss_mode(struct vnt_private *);

You have to do this in your first patch, as the build broke without these changes, right?

Quoted 3 lines

You can never break the build with any single patch.

Please fix up and resend.

I am sorry I understand that this is wrong but I don't think I quite got what has to be done. Does this have to be the first patch of the patchset and the other second?

thanks,

namrata

Quoted 4 lines

thanks,

greg k-h

#5 lore raw

Re: [PATCH 2/2] staging: vt6656: Make return type changes of functions

Quoted 34 lines · Namrata A Shettar
Quoted 33 lines · Greg Kroah-Hartman
Quoted 18 lines · Namrata A Shettar

Change return type of functions to reflect changes in code.

---
 drivers/staging/vt6656/card.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/vt6656/card.h +1 -1
index c2cde7e..84270c1 100644
@@ -41,14 +41,14 @@ void vnt_update_ifs(struct vnt_private *);
 void vnt_update_top_rates(struct vnt_private *);
 int vnt_ofdm_min_rate(struct vnt_private *);
 void vnt_adjust_tsf(struct vnt_private *, u8, u64, u64);
-bool vnt_get_current_tsf(struct vnt_private *, u64 *);
+void vnt_get_current_tsf(struct vnt_private *, u64 *);
 bool vnt_clear_current_tsf(struct vnt_private *);

drivers/staging/vt6656/card.h void vnt_update_ifs(struct vnt_private *); · line 53

Quoted 10 lines
drivers/staging/vt6656/card.h +2 -2
 void vnt_reset_next_tbtt(struct vnt_private *, u16);
 void vnt_update_next_tbtt(struct vnt_private *, u64, u16);
 u64 vnt_get_next_tbtt(u64, u16);
 u64 vnt_get_tsf_offset(u8 byRxRate, u64 qwTSF1, u64 qwTSF2);
-int vnt_radio_power_off(struct vnt_private *);
-int vnt_radio_power_on(struct vnt_private *);
+void vnt_radio_power_off(struct vnt_private *);
+void vnt_radio_power_on(struct vnt_private *);
 u8 vnt_get_pkt_type(struct vnt_private *);
 void vnt_set_bss_mode(struct vnt_private *);

You have to do this in your first patch, as the build broke without these changes, right?

Quoted 8 lines
Quoted 3 lines

You can never break the build with any single patch.

Please fix up and resend.

I am sorry I understand that this is wrong but I don't think I quite got what has to be done. Does this have to be the first patch of the patchset and the other second?

Neither, it has to be all one patch, right? Try building the kernel with only one of these patches applied and see what happens...

thanks,

greg k-h