All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] staging: vt6656: Fix return values
@ 2016-09-26 18:25 Namrata A Shettar
  2016-09-26 18:25 ` [PATCH 1/2] staging: vt6656: Remove unnecessary " Namrata A Shettar
  2016-09-26 18:26 ` [PATCH 2/2] staging: vt6656: Make return type changes of functions Namrata A Shettar
  0 siblings, 2 replies; 6+ messages in thread
From: Namrata A Shettar @ 2016-09-26 18:25 UTC (permalink / raw)
  To: Forest Bond, Greg Kroah-Hartman, Rithvik Patibandla, outreachy-kernel

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(-)

-- 
2.7.4



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] staging: vt6656: Remove unnecessary return values
  2016-09-26 18:25 [PATCH 0/2] staging: vt6656: Fix return values Namrata A Shettar
@ 2016-09-26 18:25 ` Namrata A Shettar
  2016-09-26 18:26 ` [PATCH 2/2] staging: vt6656: Make return type changes of functions Namrata A Shettar
  1 sibling, 0 replies; 6+ messages in thread
From: Namrata A Shettar @ 2016-09-26 18:25 UTC (permalink / raw)
  To: Forest Bond, Greg Kroah-Hartman, Rithvik Patibandla, outreachy-kernel

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

Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com>
---
 drivers/staging/vt6656/card.c | 23 ++++++-----------------
 1 file changed, 6 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index 53b469c..59bbfd1 100644
--- a/drivers/staging/vt6656/card.c
+++ b/drivers/staging/vt6656/card.c
@@ -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)
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] staging: vt6656: Make return type changes of functions
  2016-09-26 18:25 [PATCH 0/2] staging: vt6656: Fix return values Namrata A Shettar
  2016-09-26 18:25 ` [PATCH 1/2] staging: vt6656: Remove unnecessary " Namrata A Shettar
@ 2016-09-26 18:26 ` Namrata A Shettar
  2016-09-27 11:09   ` Greg Kroah-Hartman
  1 sibling, 1 reply; 6+ messages in thread
From: Namrata A Shettar @ 2016-09-26 18:26 UTC (permalink / raw)
  To: Forest Bond, Greg Kroah-Hartman, Rithvik Patibandla, outreachy-kernel

Change return type of functions to reflect changes in code.

Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com>
---
 drivers/staging/vt6656/card.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/vt6656/card.h b/drivers/staging/vt6656/card.h
index c2cde7e..84270c1 100644
--- a/drivers/staging/vt6656/card.h
+++ b/drivers/staging/vt6656/card.h
@@ -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 *);
 
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] staging: vt6656: Make return type changes of functions
  2016-09-26 18:26 ` [PATCH 2/2] staging: vt6656: Make return type changes of functions Namrata A Shettar
@ 2016-09-27 11:09   ` Greg Kroah-Hartman
  2016-09-27 16:39     ` Namrata A Shettar
  0 siblings, 1 reply; 6+ messages in thread
From: Greg Kroah-Hartman @ 2016-09-27 11:09 UTC (permalink / raw)
  To: Namrata A Shettar; +Cc: Forest Bond, Rithvik Patibandla, outreachy-kernel

On Mon, Sep 26, 2016 at 11:56:10PM +0530, Namrata A Shettar wrote:
> Change return type of functions to reflect changes in code.
> 
> Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com>
> ---
>  drivers/staging/vt6656/card.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/vt6656/card.h b/drivers/staging/vt6656/card.h
> index c2cde7e..84270c1 100644
> --- a/drivers/staging/vt6656/card.h
> +++ b/drivers/staging/vt6656/card.h
> @@ -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 *);

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] staging: vt6656: Make return type changes of functions
  2016-09-27 11:09   ` Greg Kroah-Hartman
@ 2016-09-27 16:39     ` Namrata A Shettar
  2016-09-28  9:24       ` Greg Kroah-Hartman
  0 siblings, 1 reply; 6+ messages in thread
From: Namrata A Shettar @ 2016-09-27 16:39 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Forest Bond, Rithvik Patibandla, outreachy-kernel

On Tue, Sep 27, 2016 at 01:09:30PM +0200, Greg Kroah-Hartman wrote:
> On Mon, Sep 26, 2016 at 11:56:10PM +0530, Namrata A Shettar wrote:
> > Change return type of functions to reflect changes in code.
> > 
> > Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com>
> > ---
> >  drivers/staging/vt6656/card.h | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/staging/vt6656/card.h b/drivers/staging/vt6656/card.h
> > index c2cde7e..84270c1 100644
> > --- a/drivers/staging/vt6656/card.h
> > +++ b/drivers/staging/vt6656/card.h
> > @@ -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 *);
> 
> 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.


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

> 
> thanks,
> 
> greg k-h


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] staging: vt6656: Make return type changes of functions
  2016-09-27 16:39     ` Namrata A Shettar
@ 2016-09-28  9:24       ` Greg Kroah-Hartman
  0 siblings, 0 replies; 6+ messages in thread
From: Greg Kroah-Hartman @ 2016-09-28  9:24 UTC (permalink / raw)
  To: Namrata A Shettar; +Cc: Forest Bond, Rithvik Patibandla, outreachy-kernel

On Tue, Sep 27, 2016 at 10:09:38PM +0530, Namrata A Shettar wrote:
> On Tue, Sep 27, 2016 at 01:09:30PM +0200, Greg Kroah-Hartman wrote:
> > On Mon, Sep 26, 2016 at 11:56:10PM +0530, Namrata A Shettar wrote:
> > > Change return type of functions to reflect changes in code.
> > > 
> > > Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com>
> > > ---
> > >  drivers/staging/vt6656/card.h | 6 +++---
> > >  1 file changed, 3 insertions(+), 3 deletions(-)
> > > 
> > > diff --git a/drivers/staging/vt6656/card.h b/drivers/staging/vt6656/card.h
> > > index c2cde7e..84270c1 100644
> > > --- a/drivers/staging/vt6656/card.h
> > > +++ b/drivers/staging/vt6656/card.h
> > > @@ -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 *);
> > 
> > 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.
> 
> 
> 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-09-28  9:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-26 18:25 [PATCH 0/2] staging: vt6656: Fix return values Namrata A Shettar
2016-09-26 18:25 ` [PATCH 1/2] staging: vt6656: Remove unnecessary " Namrata A Shettar
2016-09-26 18:26 ` [PATCH 2/2] staging: vt6656: Make return type changes of functions Namrata A Shettar
2016-09-27 11:09   ` Greg Kroah-Hartman
2016-09-27 16:39     ` Namrata A Shettar
2016-09-28  9:24       ` Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.