All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: sm750fb: remove unused variables
@ 2015-06-22  7:26 Gujulan Elango, Hari Prasath (H.)
  2015-06-23  8:46 ` Dan Carpenter
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Gujulan Elango, Hari Prasath (H.) @ 2015-06-22  7:26 UTC (permalink / raw)
  To: linux-fbdev

From: Hari Prasath Gujulan Elango <hgujulan@visteon.com>

This patch removes unused variables as reported by cppcheck

Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
---
 drivers/staging/sm750fb/ddk750_chip.c   | 3 +--
 drivers/staging/sm750fb/ddk750_mode.c   | 3 +--
 drivers/staging/sm750fb/ddk750_sii164.c | 3 +--
 3 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_chip.c b/drivers/staging/sm750fb/ddk750_chip.c
index f4975d2..e8ac6e6 100644
--- a/drivers/staging/sm750fb/ddk750_chip.c
+++ b/drivers/staging/sm750fb/ddk750_chip.c
@@ -103,7 +103,6 @@ unsigned int getChipClock(void)
 void setChipClock(unsigned int frequency)
 {
 	pll_value_t pll;
-	unsigned int ulActualMxClk;
 #if 1
 	/* Cheok_0509: For SM750LE, the chip clock is fixed. Nothing to set. */
 	if (getChipType() = SM750LE)
@@ -122,7 +121,7 @@ void setChipClock(unsigned int frequency)
 		* Sometime, the chip cannot set up the exact clock required by User.
 		* Return value from calcPllValue() gives the actual possible clock.
 		*/
-		ulActualMxClk = calcPllValue(frequency, &pll);
+		calcPllValue(frequency, &pll);
 
 		/* Master Clock Control: MXCLK_PLL */
 		POKE32(MXCLK_PLL_CTRL, formatPllReg(&pll));
diff --git a/drivers/staging/sm750fb/ddk750_mode.c b/drivers/staging/sm750fb/ddk750_mode.c
index 74313ff..e67e1e9 100644
--- a/drivers/staging/sm750fb/ddk750_mode.c
+++ b/drivers/staging/sm750fb/ddk750_mode.c
@@ -188,11 +188,10 @@ static int programModeRegisters(mode_parameter_t *pModeParam, pll_value_t *pll)
 int ddk750_setModeTiming(mode_parameter_t *parm, clock_type_t clock)
 {
 	pll_value_t pll;
-	unsigned int uiActualPixelClk;
 	pll.inputFreq = DEFAULT_INPUT_CLOCK;
 	pll.clockType = clock;
 
-	uiActualPixelClk = calcPllValue(parm->pixel_clock, &pll);
+	calcPllValue(parm->pixel_clock, &pll);
 	if(getChipType() = SM750LE){
 		/* set graphic mode via IO method */
 		outb_p(0x88, 0x3d4);
diff --git a/drivers/staging/sm750fb/ddk750_sii164.c b/drivers/staging/sm750fb/ddk750_sii164.c
index b6395b8..2ac3470 100644
--- a/drivers/staging/sm750fb/ddk750_sii164.c
+++ b/drivers/staging/sm750fb/ddk750_sii164.c
@@ -345,8 +345,7 @@ void sii164EnableHotPlugDetection(
     unsigned char enableHotPlug
 )
 {
-    unsigned char detectReg;
-    detectReg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT);
+    i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT);
 
     /* Depending on each DVI controller, need to enable the hot plug based on each
        individual chip design. */
-- 
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in

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

* Re: [PATCH] staging: sm750fb: remove unused variables
  2015-06-22  7:26 [PATCH] staging: sm750fb: remove unused variables Gujulan Elango, Hari Prasath (H.)
@ 2015-06-23  8:46 ` Dan Carpenter
  2015-06-23 10:12 ` Sudip Mukherjee
  2015-06-23 13:05 ` Gujulan Elango, Hari Prasath (H.)
  2 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2015-06-23  8:46 UTC (permalink / raw)
  To: linux-fbdev

On Mon, Jun 22, 2015 at 07:26:25AM +0000, Gujulan Elango, Hari Prasath (H.) wrote:
> @@ -122,7 +121,7 @@ void setChipClock(unsigned int frequency)
>  		* Sometime, the chip cannot set up the exact clock required by User.
>  		* Return value from calcPllValue() gives the actual possible clock.
>  		*/
> -		ulActualMxClk = calcPllValue(frequency, &pll);
> +		calcPllValue(frequency, &pll);

Should we get rid of calcPllValue() as well?  I guess I would prefer to
leave the warnings until someone has the answer to this.

Warnings are good because they show where the bugs are.  It's not always
the right thing to silence them.

regards,
dan carpenter


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

* Re: [PATCH] staging: sm750fb: remove unused variables
  2015-06-22  7:26 [PATCH] staging: sm750fb: remove unused variables Gujulan Elango, Hari Prasath (H.)
  2015-06-23  8:46 ` Dan Carpenter
@ 2015-06-23 10:12 ` Sudip Mukherjee
  2015-06-23 13:05 ` Gujulan Elango, Hari Prasath (H.)
  2 siblings, 0 replies; 4+ messages in thread
From: Sudip Mukherjee @ 2015-06-23 10:12 UTC (permalink / raw)
  To: linux-fbdev

On Tue, Jun 23, 2015 at 11:46:13AM +0300, Dan Carpenter wrote:
> On Mon, Jun 22, 2015 at 07:26:25AM +0000, Gujulan Elango, Hari Prasath (H.) wrote:
> > @@ -122,7 +121,7 @@ void setChipClock(unsigned int frequency)
> >  		* Sometime, the chip cannot set up the exact clock required by User.
> >  		* Return value from calcPllValue() gives the actual possible clock.
> >  		*/
> > -		ulActualMxClk = calcPllValue(frequency, &pll);
> > +		calcPllValue(frequency, &pll);
> 
> Should we get rid of calcPllValue() as well?  I guess I would prefer to
> leave the warnings until someone has the answer to this.
> 
> Warnings are good because they show where the bugs are.  It's not always
> the right thing to silence them.
I think it should be kept, atleast for now. some members of pll are
modified in the function.

regards
sudip

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

* Re: [PATCH] staging: sm750fb: remove unused variables
  2015-06-22  7:26 [PATCH] staging: sm750fb: remove unused variables Gujulan Elango, Hari Prasath (H.)
  2015-06-23  8:46 ` Dan Carpenter
  2015-06-23 10:12 ` Sudip Mukherjee
@ 2015-06-23 13:05 ` Gujulan Elango, Hari Prasath (H.)
  2 siblings, 0 replies; 4+ messages in thread
From: Gujulan Elango, Hari Prasath (H.) @ 2015-06-23 13:05 UTC (permalink / raw)
  To: linux-fbdev



On Tuesday 23 June 2015 02:16 PM, Dan Carpenter wrote:
> On Mon, Jun 22, 2015 at 07:26:25AM +0000, Gujulan Elango, Hari Prasath (H.) wrote:
>> @@ -122,7 +121,7 @@ void setChipClock(unsigned int frequency)
>>  		* Sometime, the chip cannot set up the exact clock required by User.
>>  		* Return value from calcPllValue() gives the actual possible clock.
>>  		*/
>> -		ulActualMxClk = calcPllValue(frequency, &pll);
>> +		calcPllValue(frequency, &pll);
> 
> Should we get rid of calcPllValue() as well?  I guess I would prefer to
> leave the warnings until someone has the answer to this.
> 
> Warnings are good because they show where the bugs are.  It's not always
> the right thing to silence them.
> 
> regards,
> dan carpenter
> 
> 

Okay.Let us drop this patch and leave the warning as it is. Sudip,I saw
your e-mail on the same topic. Thank you both for reviewing.


-- 
thanks & regards,
Hari Prasath

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

end of thread, other threads:[~2015-06-23 13:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-22  7:26 [PATCH] staging: sm750fb: remove unused variables Gujulan Elango, Hari Prasath (H.)
2015-06-23  8:46 ` Dan Carpenter
2015-06-23 10:12 ` Sudip Mukherjee
2015-06-23 13:05 ` Gujulan Elango, Hari Prasath (H.)

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.