staging: sm750fb: Cleaning up a few return statements
PATCH 1/1 staging: sm750fb: Cleaning up a few return statements
Signed-off-by Julian Gindi <[email protected]>
--- 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(-)
drivers/staging/sm750fb/ddk750_chip.c +1 -3
@@ -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); }
drivers/staging/sm750fb/sm750.c +1 -5
@@ -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)
drivers/staging/sm750fb/sm750_hw.c +1 -4
@@ -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 (); }
Signature · 1 line
1.9.1
Greg KH
maintainerQuoted 71 lines · Julian Gindi
Signed-off-by Julian Gindi <[email protected]>--- 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(-)drivers/staging/sm750fb/ddk750_chip.c +1
-3@@ -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); }drivers/staging/sm750fb/sm750.c +1
-5@@ -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)drivers/staging/sm750fb/sm750_hw.c +1
-4@@ -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 (); }Signature · 1 line
1.9.1
This breaks the build, showing that you never even tested it :(
Sudip Mukherjee
maintainerQuoted 8 lines · Greg KH
Quoted 5 lines · Julian Gindi
Signed-off-by Julian Gindi <[email protected]>Signature · 1 line
1.9.1This breaks the build, showing that you never even tested it :(
sorry Greg, I should have buildtested after Julian has submitted the patch.
regards
sudip
Quoted 11 lines · Sudip Mukherjee
Quoted 8 lines · Greg KH
Quoted 5 lines · Julian Gindi
Signed-off-by Julian Gindi <[email protected]>Signature · 1 line
1.9.1This 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.
Quoted 3 lines
regards
sudip