* Re: [Outreachy kernel] [PATCH] staging: xgifb: Rename local variable
2016-02-10 1:52 [PATCH] staging: xgifb: Rename local variable Janani Ravichandran
@ 2016-02-09 21:59 ` Julia Lawall
2016-02-09 22:21 ` Janani Ravichandran
0 siblings, 1 reply; 3+ messages in thread
From: Julia Lawall @ 2016-02-09 21:59 UTC (permalink / raw)
To: Janani Ravichandran; +Cc: outreachy-kernel
On Tue, 9 Feb 2016, Janani Ravichandran wrote:
> As one of the global variables and a local variable share the same name,
> change the name of the local variable to avoid confusion.
Maybe local_refresh_rate might be better? I'm not sure that ref is so
obvious as an abbreviation for refresh.
julia
>
> Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
> ---
> drivers/staging/xgifb/XGI_main_26.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
> index f11cea1..ad8aaa2 100644
> --- a/drivers/staging/xgifb/XGI_main_26.c
> +++ b/drivers/staging/xgifb/XGI_main_26.c
> @@ -1230,7 +1230,7 @@ static int XGIfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
> unsigned int vtotal = 0;
> unsigned int drate = 0, hrate = 0;
> int found_mode = 0;
> - int refresh_rate, search_idx;
> + int ref_rate, search_idx;
>
> if ((var->vmode & FB_VMODE_MASK) == FB_VMODE_NONINTERLACED) {
> vtotal = var->upper_margin + var->yres + var->lower_margin
> @@ -1268,7 +1268,7 @@ static int XGIfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
>
> /* Calculation wrong for 1024x600 - force it to 60Hz */
> if ((var->xres == 1024) && (var->yres == 600))
> - refresh_rate = 60;
> + ref_rate = 60;
>
> search_idx = 0;
> while ((XGIbios_mode[search_idx].mode_no != 0) &&
> --
> 2.5.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 outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160210015234.GA12338%40janani-Inspiron-3521.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Outreachy kernel] [PATCH] staging: xgifb: Rename local variable
2016-02-09 21:59 ` [Outreachy kernel] " Julia Lawall
@ 2016-02-09 22:21 ` Janani Ravichandran
0 siblings, 0 replies; 3+ messages in thread
From: Janani Ravichandran @ 2016-02-09 22:21 UTC (permalink / raw)
To: outreachy-kernel; +Cc: janani.rvchndrn
[-- Attachment #1.1: Type: text/plain, Size: 2390 bytes --]
On Tuesday, 9 February 2016 16:59:26 UTC-5, Julia Lawall wrote:
>
> On Tue, 9 Feb 2016, Janani Ravichandran wrote:
>
> > As one of the global variables and a local variable share the same name,
> > change the name of the local variable to avoid confusion.
>
> Maybe local_refresh_rate might be better? I'm not sure that ref is so
> obvious as an abbreviation for refresh.
>
I will send a version 2 for this making that correction.
Janani.
>
> julia
>
> >
> > Signed-off-by: Janani Ravichandran <janani....@gmail.com <javascript:>>
> > ---
> > drivers/staging/xgifb/XGI_main_26.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/staging/xgifb/XGI_main_26.c
> b/drivers/staging/xgifb/XGI_main_26.c
> > index f11cea1..ad8aaa2 100644
> > --- a/drivers/staging/xgifb/XGI_main_26.c
> > +++ b/drivers/staging/xgifb/XGI_main_26.c
> > @@ -1230,7 +1230,7 @@ static int XGIfb_check_var(struct
> fb_var_screeninfo *var, struct fb_info *info)
> > unsigned int vtotal = 0;
> > unsigned int drate = 0, hrate = 0;
> > int found_mode = 0;
> > - int refresh_rate, search_idx;
> > + int ref_rate, search_idx;
> >
> > if ((var->vmode & FB_VMODE_MASK) == FB_VMODE_NONINTERLACED) {
> > vtotal = var->upper_margin + var->yres +
> var->lower_margin
> > @@ -1268,7 +1268,7 @@ static int XGIfb_check_var(struct
> fb_var_screeninfo *var, struct fb_info *info)
> >
> > /* Calculation wrong for 1024x600 - force it to 60Hz */
> > if ((var->xres == 1024) && (var->yres == 600))
> > - refresh_rate = 60;
> > + ref_rate = 60;
> >
> > search_idx = 0;
> > while ((XGIbios_mode[search_idx].mode_no != 0) &&
> > --
> > 2.5.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 outreachy-kern...@googlegroups.com <javascript:>.
> > To post to this group, send email to outreach...@googlegroups.com
> <javascript:>.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/outreachy-kernel/20160210015234.GA12338%40janani-Inspiron-3521.
>
> > For more options, visit https://groups.google.com/d/optout.
> >
>
[-- Attachment #1.2: Type: text/html, Size: 4405 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] staging: xgifb: Rename local variable
@ 2016-02-10 1:52 Janani Ravichandran
2016-02-09 21:59 ` [Outreachy kernel] " Julia Lawall
0 siblings, 1 reply; 3+ messages in thread
From: Janani Ravichandran @ 2016-02-10 1:52 UTC (permalink / raw)
To: outreachy-kernel
As one of the global variables and a local variable share the same name,
change the name of the local variable to avoid confusion.
Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
---
drivers/staging/xgifb/XGI_main_26.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
index f11cea1..ad8aaa2 100644
--- a/drivers/staging/xgifb/XGI_main_26.c
+++ b/drivers/staging/xgifb/XGI_main_26.c
@@ -1230,7 +1230,7 @@ static int XGIfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
unsigned int vtotal = 0;
unsigned int drate = 0, hrate = 0;
int found_mode = 0;
- int refresh_rate, search_idx;
+ int ref_rate, search_idx;
if ((var->vmode & FB_VMODE_MASK) == FB_VMODE_NONINTERLACED) {
vtotal = var->upper_margin + var->yres + var->lower_margin
@@ -1268,7 +1268,7 @@ static int XGIfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
/* Calculation wrong for 1024x600 - force it to 60Hz */
if ((var->xres == 1024) && (var->yres == 600))
- refresh_rate = 60;
+ ref_rate = 60;
search_idx = 0;
while ((XGIbios_mode[search_idx].mode_no != 0) &&
--
2.5.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-02-09 22:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-10 1:52 [PATCH] staging: xgifb: Rename local variable Janani Ravichandran
2016-02-09 21:59 ` [Outreachy kernel] " Julia Lawall
2016-02-09 22:21 ` Janani Ravichandran
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.