Skip to contentSkip to conversation

Staging: sm750fb: sm750: Remove unused code

PATCH Superseded Shivani Bhardwaj 2 participants 4 messages Oct 13, 2015

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: sm750fb: sm750: Remove unused code

Remove declaration and a statement comprising of a variable which is not used throughout the code.

---
 drivers/staging/sm750fb/sm750.c | 2 --
 1 file changed, 2 deletions(-)
drivers/staging/sm750fb/sm750.c +0 -2
index 8c1ecb3..805a403 100644
@@ -524,14 +524,12 @@ static int lynxfb_ops_check_var(struct fb_var_screeninfo *var,
 	struct lynxfb_crtc *crtc;
 	struct lynxfb_output *output;
 	struct lynx_share *share;
-	int ret;
 	resource_size_t request;
 
 	par = info->par;
 	crtc = &par->crtc;
 	output = &par->output;
 	share = par->share;
-	ret = 0;
 
 	pr_debug("check var:%dx%d-%d\n",
 		 var->xres,
Signature · 1 line
2.1.0
#1 lore raw
Quoted 2 lines · Shivani Bhardwaj

Remove declaration and a statement comprising of a variable which is not used throughout the code.

This could be a little more helpful to the reader.

The variable ret is only declared and initialized to 0, but never referenced, so remove it.

Ret is a common variable name, so mentioning it conveys some information.

julia

Quoted 34 lines
---
 drivers/staging/sm750fb/sm750.c | 2 --
 1 file changed, 2 deletions(-)
drivers/staging/sm750fb/sm750.c +0 -2
index 8c1ecb3..805a403 100644
@@ -524,14 +524,12 @@ static int lynxfb_ops_check_var(struct fb_var_screeninfo *var,
 	struct lynxfb_crtc *crtc;
 	struct lynxfb_output *output;
 	struct lynx_share *share;
-	int ret;
 	resource_size_t request;
 
 	par = info->par;
 	crtc = &par->crtc;
 	output = &par->output;
 	share = par->share;
-	ret = 0;
 
 	pr_debug("check var:%dx%d-%d\n",
 		 var->xres,
Signature · 8 lines
2.1.0

-- 
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20151013211140.GA12128%40ubuntu.
For more options, visit https://groups.google.com/d/optout.
#2 lore raw
Quoted 5 lines · Julia Lawall
Quoted 2 lines · Shivani Bhardwaj

Remove declaration and a statement comprising of a variable which is not used throughout the code.

Quoted 9 lines

This could be a little more helpful to the reader.

The variable ret is only declared and initialized to 0, but never referenced, so remove it.

Ret is a common variable name, so mentioning it conveys some information.

julia

v2 with updated commit message?
Thank you.

Quoted 34 lines
Quoted 34 lines
---
 drivers/staging/sm750fb/sm750.c | 2 --
 1 file changed, 2 deletions(-)
drivers/staging/sm750fb/sm750.c +0 -3
index 8c1ecb3..805a403 100644
@@ -524,14 +524,12 @@ static int lynxfb_ops_check_var(struct fb_var_screeninfo *var,
      struct lynxfb_crtc *crtc;
      struct lynxfb_output *output;
      struct lynx_share *share;
-     int ret;
      resource_size_t request;
 
      par = info->par;
      crtc = &par->crtc;
      output = &par->output;
      share = par->share;
-     ret = 0;
 
      pr_debug("check var:%dx%d-%d\n",
               var->xres,
--

2.1.0

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20151013211140.GA12128%40ubuntu.
For more options, visit https://groups.google.com/d/optout.

#3 lore raw
Quoted 11 lines · Shivani Bhardwaj
Quoted 10 lines · Julia Lawall
Quoted 2 lines · Shivani Bhardwaj

Remove declaration and a statement comprising of a variable which is not used throughout the code.

This could be a little more helpful to the reader.

The variable ret is only declared and initialized to 0, but never referenced, so remove it.

Quoted 6 lines
Quoted 4 lines

Ret is a common variable name, so mentioning it conveys some information.

julia

v2 with updated commit message?

For practicing, it could be a good idea.

julia

Quoted 44 lines

Thank you.

Quoted 34 lines
Quoted 34 lines
---
 drivers/staging/sm750fb/sm750.c | 2 --
 1 file changed, 2 deletions(-)
drivers/staging/sm750fb/sm750.c +0 -3
index 8c1ecb3..805a403 100644
@@ -524,14 +524,12 @@ static int lynxfb_ops_check_var(struct fb_var_screeninfo *var,
      struct lynxfb_crtc *crtc;
      struct lynxfb_output *output;
      struct lynx_share *share;
-     int ret;
      resource_size_t request;
 
      par = info->par;
      crtc = &par->crtc;
      output = &par->output;
      share = par->share;
-     ret = 0;
 
      pr_debug("check var:%dx%d-%d\n",
               var->xres,
--

2.1.0

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20151013211140.GA12128%40ubuntu.
For more options, visit https://groups.google.com/d/optout.

Signature · 5 lines
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/CAKHNQQFuxc%3DRCSeAgSMZeTPj-Q5QkzkW0T1LupqdR63%3DjcYF3w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.