* [PATCH 0/2] staging: xgifb: vb_setmode: fix multiple line dereference and indentations
@ 2018-10-28 18:09 Kimberly Brown
2018-10-28 18:11 ` [PATCH 1/2] staging: xgifb: vb_setmode: fix multiple line dereference Kimberly Brown
2018-10-28 18:12 ` [PATCH 2/2] staging: xgifb: vb_setmode: adjust descendant indentation to right Kimberly Brown
0 siblings, 2 replies; 6+ messages in thread
From: Kimberly Brown @ 2018-10-28 18:09 UTC (permalink / raw)
To: outreachy-kernel, Arnaud Patard, Greg Kroah-Hartman
This patchset fixes a multiple line dereference and adjusts indentations
to comply with the Linux kernel coding style.
Kimberly Brown (2):
staging: xgifb: vb_setmode: fix multiple line dereference
staging: xgifb: vb_setmode: adjust descendant indentation to right
drivers/staging/xgifb/vb_setmode.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] staging: xgifb: vb_setmode: fix multiple line dereference
2018-10-28 18:09 [PATCH 0/2] staging: xgifb: vb_setmode: fix multiple line dereference and indentations Kimberly Brown
@ 2018-10-28 18:11 ` Kimberly Brown
2018-10-28 18:12 ` [PATCH 2/2] staging: xgifb: vb_setmode: adjust descendant indentation to right Kimberly Brown
1 sibling, 0 replies; 6+ messages in thread
From: Kimberly Brown @ 2018-10-28 18:11 UTC (permalink / raw)
To: outreachy-kernel, Arnaud Patard, Greg Kroah-Hartman
Fix multiple line dereference by adding a new line and adjusting
indentations. This change improves code readability. Issue found by
checkpatch.
Signed-off-by: Kimberly Brown <kimbrownkd@gmail.com>
---
drivers/staging/xgifb/vb_setmode.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c
index 1fa0dc66406e..62b45a30e0f1 100644
--- a/drivers/staging/xgifb/vb_setmode.c
+++ b/drivers/staging/xgifb/vb_setmode.c
@@ -656,8 +656,9 @@ static void XGI_UpdateXG21CRTC(unsigned short ModeNo,
(XGI330_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC ==
RES640x480x60))
index = 12;
- else if (ModeNo == 0x2E && (XGI330_RefIndex[RefreshRateTableIndex].
- Ext_CRT1CRTC == RES640x480x72))
+ else if (ModeNo == 0x2E &&
+ (XGI330_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC ==
+ RES640x480x72))
index = 13;
else if (ModeNo == 0x2F)
index = 14;
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] staging: xgifb: vb_setmode: adjust descendant indentation to right
2018-10-28 18:09 [PATCH 0/2] staging: xgifb: vb_setmode: fix multiple line dereference and indentations Kimberly Brown
2018-10-28 18:11 ` [PATCH 1/2] staging: xgifb: vb_setmode: fix multiple line dereference Kimberly Brown
@ 2018-10-28 18:12 ` Kimberly Brown
2018-10-28 18:34 ` [Outreachy kernel] " Julia Lawall
1 sibling, 1 reply; 6+ messages in thread
From: Kimberly Brown @ 2018-10-28 18:12 UTC (permalink / raw)
To: outreachy-kernel, Arnaud Patard, Greg Kroah-Hartman
Adjust descendant indentation so that it is placed substantially to the
right. This change improves code readability and complies with the
Linux kernel coding style.
Signed-off-by: Kimberly Brown <kimbrownkd@gmail.com>
---
drivers/staging/xgifb/vb_setmode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c
index 62b45a30e0f1..3782f8641bf2 100644
--- a/drivers/staging/xgifb/vb_setmode.c
+++ b/drivers/staging/xgifb/vb_setmode.c
@@ -654,7 +654,7 @@ static void XGI_UpdateXG21CRTC(unsigned short ModeNo,
xgifb_reg_and(pVBInfo->P3d4, 0x11, 0x7F); /* Unlock CR0~7 */
if (ModeNo == 0x2E &&
(XGI330_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC ==
- RES640x480x60))
+ RES640x480x60))
index = 12;
else if (ModeNo == 0x2E &&
(XGI330_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC ==
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Outreachy kernel] [PATCH 2/2] staging: xgifb: vb_setmode: adjust descendant indentation to right
2018-10-28 18:12 ` [PATCH 2/2] staging: xgifb: vb_setmode: adjust descendant indentation to right Kimberly Brown
@ 2018-10-28 18:34 ` Julia Lawall
2018-10-29 2:26 ` Kimberly Brown
0 siblings, 1 reply; 6+ messages in thread
From: Julia Lawall @ 2018-10-28 18:34 UTC (permalink / raw)
To: Kimberly Brown; +Cc: outreachy-kernel, Arnaud Patard, Greg Kroah-Hartman
On Sun, 28 Oct 2018, Kimberly Brown wrote:
> Adjust descendant indentation so that it is placed substantially to the
> right. This change improves code readability and complies with the
> Linux kernel coding style.
>
> Signed-off-by: Kimberly Brown <kimbrownkd@gmail.com>
> ---
> drivers/staging/xgifb/vb_setmode.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c
> index 62b45a30e0f1..3782f8641bf2 100644
> --- a/drivers/staging/xgifb/vb_setmode.c
> +++ b/drivers/staging/xgifb/vb_setmode.c
> @@ -654,7 +654,7 @@ static void XGI_UpdateXG21CRTC(unsigned short ModeNo,
> xgifb_reg_and(pVBInfo->P3d4, 0x11, 0x7F); /* Unlock CR0~7 */
> if (ModeNo == 0x2E &&
> (XGI330_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC ==
> - RES640x480x60))
> + RES640x480x60))
The variable RefreshRateTableIndex is really long,and uses camel case,
which is also not the kernel style. If there is a shorter version that
would be acceptable, then perhaps the value to the right of the == could
be on the same line, thus solving two problems at once.
julia
> index = 12;
> else if (ModeNo == 0x2E &&
> (XGI330_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC ==
> --
> 2.17.1
>
> --
> 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/a85f97b40dabc0f2a978d0928af6bba05b9724e5.1540749179.git.kimbrownkd%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Outreachy kernel] [PATCH 2/2] staging: xgifb: vb_setmode: adjust descendant indentation to right
2018-10-28 18:34 ` [Outreachy kernel] " Julia Lawall
@ 2018-10-29 2:26 ` Kimberly Brown
2018-10-29 5:52 ` Julia Lawall
0 siblings, 1 reply; 6+ messages in thread
From: Kimberly Brown @ 2018-10-29 2:26 UTC (permalink / raw)
To: Julia Lawall; +Cc: outreachy-kernel, Arnaud Patard, Greg Kroah-Hartman
On Sun, Oct 28, 2018 at 07:34:50PM +0100, Julia Lawall wrote:
>
>
> On Sun, 28 Oct 2018, Kimberly Brown wrote:
>
> > Adjust descendant indentation so that it is placed substantially to the
> > right. This change improves code readability and complies with the
> > Linux kernel coding style.
> >
> > Signed-off-by: Kimberly Brown <kimbrownkd@gmail.com>
> > ---
> > drivers/staging/xgifb/vb_setmode.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c
> > index 62b45a30e0f1..3782f8641bf2 100644
> > --- a/drivers/staging/xgifb/vb_setmode.c
> > +++ b/drivers/staging/xgifb/vb_setmode.c
> > @@ -654,7 +654,7 @@ static void XGI_UpdateXG21CRTC(unsigned short ModeNo,
> > xgifb_reg_and(pVBInfo->P3d4, 0x11, 0x7F); /* Unlock CR0~7 */
> > if (ModeNo == 0x2E &&
> > (XGI330_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC ==
> > - RES640x480x60))
> > + RES640x480x60))
>
> The variable RefreshRateTableIndex is really long,and uses camel case,
> which is also not the kernel style. If there is a shorter version that
> would be acceptable, then perhaps the value to the right of the == could
> be on the same line, thus solving two problems at once.
Julia,
Good point! I propose 'ref_index' to replace 'RefreshRateTableIndex'. I
chose this based on the 'RefreshRateTableIndex' assignment on line 5096:
RefreshRateTableIndex = XGI330_EModeIDTable[ModeIdIndex].REFindex;
Do you have any objections to 'ref_index'?
Thanks!
>
> julia
>
> > index = 12;
> > else if (ModeNo == 0x2E &&
> > (XGI330_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC ==
> > --
> > 2.17.1
> >
> > --
> > 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/a85f97b40dabc0f2a978d0928af6bba05b9724e5.1540749179.git.kimbrownkd%40gmail.com.
> > For more options, visit https://groups.google.com/d/optout.
> >
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Outreachy kernel] [PATCH 2/2] staging: xgifb: vb_setmode: adjust descendant indentation to right
2018-10-29 2:26 ` Kimberly Brown
@ 2018-10-29 5:52 ` Julia Lawall
0 siblings, 0 replies; 6+ messages in thread
From: Julia Lawall @ 2018-10-29 5:52 UTC (permalink / raw)
To: Kimberly Brown; +Cc: outreachy-kernel, Arnaud Patard, Greg Kroah-Hartman
On Sun, 28 Oct 2018, Kimberly Brown wrote:
> On Sun, Oct 28, 2018 at 07:34:50PM +0100, Julia Lawall wrote:
> >
> >
> > On Sun, 28 Oct 2018, Kimberly Brown wrote:
> >
> > > Adjust descendant indentation so that it is placed substantially to the
> > > right. This change improves code readability and complies with the
> > > Linux kernel coding style.
> > >
> > > Signed-off-by: Kimberly Brown <kimbrownkd@gmail.com>
> > > ---
> > > drivers/staging/xgifb/vb_setmode.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c
> > > index 62b45a30e0f1..3782f8641bf2 100644
> > > --- a/drivers/staging/xgifb/vb_setmode.c
> > > +++ b/drivers/staging/xgifb/vb_setmode.c
> > > @@ -654,7 +654,7 @@ static void XGI_UpdateXG21CRTC(unsigned short ModeNo,
> > > xgifb_reg_and(pVBInfo->P3d4, 0x11, 0x7F); /* Unlock CR0~7 */
> > > if (ModeNo == 0x2E &&
> > > (XGI330_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC ==
> > > - RES640x480x60))
> > > + RES640x480x60))
> >
> > The variable RefreshRateTableIndex is really long,and uses camel case,
> > which is also not the kernel style. If there is a shorter version that
> > would be acceptable, then perhaps the value to the right of the == could
> > be on the same line, thus solving two problems at once.
>
> Julia,
>
> Good point! I propose 'ref_index' to replace 'RefreshRateTableIndex'. I
> chose this based on the 'RefreshRateTableIndex' assignment on line 5096:
>
> RefreshRateTableIndex = XGI330_EModeIDTable[ModeIdIndex].REFindex;
>
> Do you have any objections to 'ref_index'?
Intuitively, I would have suggested rate_index, but I can see your
reasoning in this case.
julia
>
> Thanks!
>
> >
> > julia
> >
> > > index = 12;
> > > else if (ModeNo == 0x2E &&
> > > (XGI330_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC ==
> > > --
> > > 2.17.1
> > >
> > > --
> > > 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/a85f97b40dabc0f2a978d0928af6bba05b9724e5.1540749179.git.kimbrownkd%40gmail.com.
> > > For more options, visit https://groups.google.com/d/optout.
> > >
>
> --
> 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/20181029022658.GA158541%40ubu-Virtual-Machine.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-10-29 5:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-28 18:09 [PATCH 0/2] staging: xgifb: vb_setmode: fix multiple line dereference and indentations Kimberly Brown
2018-10-28 18:11 ` [PATCH 1/2] staging: xgifb: vb_setmode: fix multiple line dereference Kimberly Brown
2018-10-28 18:12 ` [PATCH 2/2] staging: xgifb: vb_setmode: adjust descendant indentation to right Kimberly Brown
2018-10-28 18:34 ` [Outreachy kernel] " Julia Lawall
2018-10-29 2:26 ` Kimberly Brown
2018-10-29 5:52 ` Julia Lawall
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.