All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: sm750fb: Cleaning up a few return statements
@ 2015-04-17 20:44 Julian Gindi
  2015-05-03 19:25 ` Greg KH
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Julian Gindi @ 2015-04-17 20:44 UTC (permalink / raw)
  To: linux-fbdev

Signed-off-by: Julian Gindi <juliangindi@gmail.com>
---
 drivers/staging/sm750fb/ddk750_chip.c | 4 +---
 drivers/staging/sm750fb/sm750.c       | 6 +-----
 drivers/staging/sm750fb/sm750_hw.c    | 5 +----
 3 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_chip.c b/drivers/staging/sm750fb/ddk750_chip.c
index 7b28328..ac88623 100644
--- a/drivers/staging/sm750fb/ddk750_chip.c
+++ b/drivers/staging/sm750fb/ddk750_chip.c
@@ -499,7 +499,6 @@ pll_value_t *pPLL           /* Structure to hold the value to be set in PLL */
 {
 	unsigned int M, N, OD, POD = 0, diff, pllClk, odPower, podPower;
 	unsigned int bestDiff = 0xffffffff; /* biggest 32 bit unsigned number */
-	unsigned int ret;
     /* Init PLL structure to know states */
 	pPLL->M = 0;
 	pPLL->N = 0;
@@ -589,8 +588,7 @@ pll_value_t *pPLL           /* Structure to hold the value to be set in PLL */
 	//DDKDEBUGPRINT((DISPLAY_LEVEL, "calcPllValue: Input CLK = %dHz, M=%d, N=%d, OD=%d, POD=%d\n", pPLL->inputFreq, pPLL->M, pPLL->N, pPLL->OD, pPLL->POD));
 
     /* Return actual frequency that the PLL can set */
-	ret = calcPLL(pPLL);
-	return ret;
+	return calcPLL(pPLL);
 }
 
 
diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 3c7ea95..e05bb64 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -303,8 +303,6 @@ static int lynxfb_ops_pan_display(struct fb_var_screeninfo *var,
 {
 	struct lynxfb_par *par;
 	struct lynxfb_crtc *crtc;
-	int ret;
-
 
 	if (!info)
 		return -EINVAL;
@@ -312,9 +310,7 @@ static int lynxfb_ops_pan_display(struct fb_var_screeninfo *var,
 	ret = 0;
 	par = info->par;
 	crtc = &par->crtc;
-	ret = crtc->proc_panDisplay(crtc, var, info);
-
-	return ret;
+	return crtc->proc_panDisplay(crtc, var, info);
 }
 
 static int lynxfb_ops_set_par(struct fb_info *info)
diff --git a/drivers/staging/sm750fb/sm750_hw.c b/drivers/staging/sm750fb/sm750_hw.c
index 9f0d06d..8f2432d 100644
--- a/drivers/staging/sm750fb/sm750_hw.c
+++ b/drivers/staging/sm750fb/sm750_hw.c
@@ -203,10 +203,7 @@ int hw_sm750_inithw(struct lynx_share* share, struct pci_dev * pdev)
 
 resource_size_t hw_sm750_getVMSize(struct lynx_share * share)
 {
-	resource_size_t ret;
-	
-	ret = ddk750_getVMSize();
-	return ret;
+	return ddk750_getVMSize();
 }
 
 
-- 
1.9.1


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

* Re: [PATCH] staging: sm750fb: Cleaning up a few return statements
  2015-04-17 20:44 [PATCH] staging: sm750fb: Cleaning up a few return statements Julian Gindi
@ 2015-05-03 19:25 ` Greg KH
  2015-05-04  5:55 ` Sudip Mukherjee
  2015-05-05 16:01 ` Julian Gindi
  2 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2015-05-03 19:25 UTC (permalink / raw)
  To: linux-fbdev

On Fri, Apr 17, 2015 at 04:44:16PM -0400, Julian Gindi wrote:
> Signed-off-by: Julian Gindi <juliangindi@gmail.com>
> ---
>  drivers/staging/sm750fb/ddk750_chip.c | 4 +---
>  drivers/staging/sm750fb/sm750.c       | 6 +-----
>  drivers/staging/sm750fb/sm750_hw.c    | 5 +----
>  3 files changed, 3 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/staging/sm750fb/ddk750_chip.c b/drivers/staging/sm750fb/ddk750_chip.c
> index 7b28328..ac88623 100644
> --- a/drivers/staging/sm750fb/ddk750_chip.c
> +++ b/drivers/staging/sm750fb/ddk750_chip.c
> @@ -499,7 +499,6 @@ pll_value_t *pPLL           /* Structure to hold the value to be set in PLL */
>  {
>  	unsigned int M, N, OD, POD = 0, diff, pllClk, odPower, podPower;
>  	unsigned int bestDiff = 0xffffffff; /* biggest 32 bit unsigned number */
> -	unsigned int ret;
>      /* Init PLL structure to know states */
>  	pPLL->M = 0;
>  	pPLL->N = 0;
> @@ -589,8 +588,7 @@ pll_value_t *pPLL           /* Structure to hold the value to be set in PLL */
>  	//DDKDEBUGPRINT((DISPLAY_LEVEL, "calcPllValue: Input CLK = %dHz, M=%d, N=%d, OD=%d, POD=%d\n", pPLL->inputFreq, pPLL->M, pPLL->N, pPLL->OD, pPLL->POD));
>  
>      /* Return actual frequency that the PLL can set */
> -	ret = calcPLL(pPLL);
> -	return ret;
> +	return calcPLL(pPLL);
>  }
>  
>  
> diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
> index 3c7ea95..e05bb64 100644
> --- a/drivers/staging/sm750fb/sm750.c
> +++ b/drivers/staging/sm750fb/sm750.c
> @@ -303,8 +303,6 @@ static int lynxfb_ops_pan_display(struct fb_var_screeninfo *var,
>  {
>  	struct lynxfb_par *par;
>  	struct lynxfb_crtc *crtc;
> -	int ret;
> -
>  
>  	if (!info)
>  		return -EINVAL;
> @@ -312,9 +310,7 @@ static int lynxfb_ops_pan_display(struct fb_var_screeninfo *var,
>  	ret = 0;
>  	par = info->par;
>  	crtc = &par->crtc;
> -	ret = crtc->proc_panDisplay(crtc, var, info);
> -
> -	return ret;
> +	return crtc->proc_panDisplay(crtc, var, info);
>  }
>  
>  static int lynxfb_ops_set_par(struct fb_info *info)
> diff --git a/drivers/staging/sm750fb/sm750_hw.c b/drivers/staging/sm750fb/sm750_hw.c
> index 9f0d06d..8f2432d 100644
> --- a/drivers/staging/sm750fb/sm750_hw.c
> +++ b/drivers/staging/sm750fb/sm750_hw.c
> @@ -203,10 +203,7 @@ int hw_sm750_inithw(struct lynx_share* share, struct pci_dev * pdev)
>  
>  resource_size_t hw_sm750_getVMSize(struct lynx_share * share)
>  {
> -	resource_size_t ret;
> -	
> -	ret = ddk750_getVMSize();
> -	return ret;
> +	return ddk750_getVMSize();
>  }
>  
>  
> -- 
> 1.9.1

This breaks the build, showing that you never even tested it :(

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

* Re: [PATCH] staging: sm750fb: Cleaning up a few return statements
  2015-04-17 20:44 [PATCH] staging: sm750fb: Cleaning up a few return statements Julian Gindi
  2015-05-03 19:25 ` Greg KH
@ 2015-05-04  5:55 ` Sudip Mukherjee
  2015-05-05 16:01 ` Julian Gindi
  2 siblings, 0 replies; 4+ messages in thread
From: Sudip Mukherjee @ 2015-05-04  5:55 UTC (permalink / raw)
  To: linux-fbdev

On Sun, May 03, 2015 at 09:25:47PM +0200, Greg KH wrote:
> On Fri, Apr 17, 2015 at 04:44:16PM -0400, Julian Gindi wrote:
> > Signed-off-by: Julian Gindi <juliangindi@gmail.com>
> >  
> >  
> > -- 
> > 1.9.1
> 
> This breaks the build, showing that you never even tested it :(
sorry Greg, I should have buildtested after Julian has submitted the
patch.

regards
sudip

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

* Re: [PATCH] staging: sm750fb: Cleaning up a few return statements
  2015-04-17 20:44 [PATCH] staging: sm750fb: Cleaning up a few return statements Julian Gindi
  2015-05-03 19:25 ` Greg KH
  2015-05-04  5:55 ` Sudip Mukherjee
@ 2015-05-05 16:01 ` Julian Gindi
  2 siblings, 0 replies; 4+ messages in thread
From: Julian Gindi @ 2015-05-05 16:01 UTC (permalink / raw)
  To: linux-fbdev

On 05/04, Sudip Mukherjee wrote:
> On Sun, May 03, 2015 at 09:25:47PM +0200, Greg KH wrote:
> > On Fri, Apr 17, 2015 at 04:44:16PM -0400, Julian Gindi wrote:
> > > Signed-off-by: Julian Gindi <juliangindi@gmail.com>
> > >  
> > >  
> > > -- 
> > > 1.9.1
> > 
> > This breaks the build, showing that you never even tested it :(
> sorry Greg, I should have buildtested after Julian has submitted the
> patch.
Apologies. Embarrasing mistake. I thought I tested, but was obviously
confused. Will fix and get everything working.
> 
> regards
> sudip

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

end of thread, other threads:[~2015-05-05 16:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-17 20:44 [PATCH] staging: sm750fb: Cleaning up a few return statements Julian Gindi
2015-05-03 19:25 ` Greg KH
2015-05-04  5:55 ` Sudip Mukherjee
2015-05-05 16:01 ` Julian Gindi

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.