* [PATCH 1/5] Staging: xgifb: Add space between ; and variable name
2015-10-21 16:47 [PATCH 0/5] Improve code, codestyle in xgifb Navya Sri Nizamkari
@ 2015-10-21 16:48 ` Navya Sri Nizamkari
2015-10-22 8:37 ` [Outreachy kernel] " Daniel Baluta
2015-10-21 16:49 ` [PATCH 2/5] Staging: xgifb: Remove blank line before } and after { Navya Sri Nizamkari
` (3 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Navya Sri Nizamkari @ 2015-10-21 16:48 UTC (permalink / raw)
To: outreachy-kernel; +Cc: outreachy-kernel
This patch fixes the checkpatch.pl error:
ERROR: space required after that ';'
Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
---
drivers/staging/xgifb/vb_init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/xgifb/vb_init.c b/drivers/staging/xgifb/vb_init.c
index ea358a0..6204a98 100644
--- a/drivers/staging/xgifb/vb_init.c
+++ b/drivers/staging/xgifb/vb_init.c
@@ -10,7 +10,7 @@ static const unsigned short XGINew_DDRDRAM_TYPE340[4][2] = {
{ 16, 0x45},
{ 8, 0x35},
{ 4, 0x31},
- { 2, 0x21} };e
+ { 2, 0x21} }; e
static const unsigned short XGINew_DDRDRAM_TYPE20[12][2] = {
{ 128, 0x5D},
--
1.9.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [Outreachy kernel] [PATCH 1/5] Staging: xgifb: Add space between ; and variable name
2015-10-21 16:48 ` [PATCH 1/5] Staging: xgifb: Add space between ; and variable name Navya Sri Nizamkari
@ 2015-10-22 8:37 ` Daniel Baluta
2015-10-22 8:42 ` Julia Lawall
2015-10-22 10:30 ` Navya Sri Nizamkari
0 siblings, 2 replies; 10+ messages in thread
From: Daniel Baluta @ 2015-10-22 8:37 UTC (permalink / raw)
To: Navya Sri Nizamkari; +Cc: outreachy-kernel
On Wed, Oct 21, 2015 at 7:48 PM, Navya Sri Nizamkari
<navyasri.tech@gmail.com> wrote:
> This patch fixes the checkpatch.pl error:
>
> ERROR: space required after that ';'
>
> Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
> ---
> drivers/staging/xgifb/vb_init.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/xgifb/vb_init.c b/drivers/staging/xgifb/vb_init.c
> index ea358a0..6204a98 100644
> --- a/drivers/staging/xgifb/vb_init.c
> +++ b/drivers/staging/xgifb/vb_init.c
> @@ -10,7 +10,7 @@ static const unsigned short XGINew_DDRDRAM_TYPE340[4][2] = {
> { 16, 0x45},
> { 8, 0x35},
> { 4, 0x31},
> - { 2, 0x21} };e
> + { 2, 0x21} }; e
Hmm, something went wrong here :)
Please edit the file and remove 'e' after ';'. Otherwise, your code
wouldn't even compile.
thanks,
Daniel.
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [Outreachy kernel] [PATCH 1/5] Staging: xgifb: Add space between ; and variable name
2015-10-22 8:37 ` [Outreachy kernel] " Daniel Baluta
@ 2015-10-22 8:42 ` Julia Lawall
2015-10-22 10:32 ` Navya Sri Nizamkari
2015-10-22 10:30 ` Navya Sri Nizamkari
1 sibling, 1 reply; 10+ messages in thread
From: Julia Lawall @ 2015-10-22 8:42 UTC (permalink / raw)
To: Daniel Baluta; +Cc: Navya Sri Nizamkari, outreachy-kernel
On Thu, 22 Oct 2015, Daniel Baluta wrote:
> On Wed, Oct 21, 2015 at 7:48 PM, Navya Sri Nizamkari
> <navyasri.tech@gmail.com> wrote:
> > This patch fixes the checkpatch.pl error:
> >
> > ERROR: space required after that ';'
> >
> > Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
> > ---
> > drivers/staging/xgifb/vb_init.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/xgifb/vb_init.c b/drivers/staging/xgifb/vb_init.c
> > index ea358a0..6204a98 100644
> > --- a/drivers/staging/xgifb/vb_init.c
> > +++ b/drivers/staging/xgifb/vb_init.c
> > @@ -10,7 +10,7 @@ static const unsigned short XGINew_DDRDRAM_TYPE340[4][2] = {
> > { 16, 0x45},
> > { 8, 0x35},
> > { 4, 0x31},
> > - { 2, 0x21} };e
> > + { 2, 0x21} }; e
>
> Hmm, something went wrong here :)
>
> Please edit the file and remove 'e' after ';'. Otherwise, your code
> wouldn't even compile.
Also, this seems to be a patch on top of your previous patch, whereas your
corrected patches should be on top of the current state of Greg's tree.
julia
>
> thanks,
> Daniel.
>
> --
> 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/CAEnQRZBqVWVHtc_pRUemU-6qZMmbD90TzuGsWe-5Xuh63mXG2A%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [Outreachy kernel] [PATCH 1/5] Staging: xgifb: Add space between ; and variable name
2015-10-22 8:42 ` Julia Lawall
@ 2015-10-22 10:32 ` Navya Sri Nizamkari
0 siblings, 0 replies; 10+ messages in thread
From: Navya Sri Nizamkari @ 2015-10-22 10:32 UTC (permalink / raw)
To: outreachy-kernel; +Cc: daniel.baluta, navyasri.tech
[-- Attachment #1.1: Type: text/plain, Size: 2032 bytes --]
On Thursday, October 22, 2015 at 2:12:48 PM UTC+5:30, Julia Lawall wrote:
>
> On Thu, 22 Oct 2015, Daniel Baluta wrote:
>
> > On Wed, Oct 21, 2015 at 7:48 PM, Navya Sri Nizamkari
> > <navyas...@gmail.com <javascript:>> wrote:
> > > This patch fixes the checkpatch.pl error:
> > >
> > > ERROR: space required after that ';'
> > >
> > > Signed-off-by: Navya Sri Nizamkari <navyas...@gmail.com <javascript:>>
>
> > > ---
> > > drivers/staging/xgifb/vb_init.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/staging/xgifb/vb_init.c
> b/drivers/staging/xgifb/vb_init.c
> > > index ea358a0..6204a98 100644
> > > --- a/drivers/staging/xgifb/vb_init.c
> > > +++ b/drivers/staging/xgifb/vb_init.c
> > > @@ -10,7 +10,7 @@ static const unsigned short
> XGINew_DDRDRAM_TYPE340[4][2] = {
> > > { 16, 0x45},
> > > { 8, 0x35},
> > > { 4, 0x31},
> > > - { 2, 0x21} };e
> > > + { 2, 0x21} }; e
> >
> > Hmm, something went wrong here :)
> >
> > Please edit the file and remove 'e' after ';'. Otherwise, your code
> > wouldn't even compile.
>
> Also, this seems to be a patch on top of your previous patch, whereas your
> corrected patches should be on top of the current state of Greg's tree.
>
> julia
>
>
I introduced the 'e' as a typo. I'll revert and send the patchset without
this patch. Thanks.
> >
> > thanks,
> > Daniel.
> >
> > --
> > 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/CAEnQRZBqVWVHtc_pRUemU-6qZMmbD90TzuGsWe-5Xuh63mXG2A%40mail.gmail.com.
>
> > For more options, visit https://groups.google.com/d/optout.
> >
>
[-- Attachment #1.2: Type: text/html, Size: 3330 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Outreachy kernel] [PATCH 1/5] Staging: xgifb: Add space between ; and variable name
2015-10-22 8:37 ` [Outreachy kernel] " Daniel Baluta
2015-10-22 8:42 ` Julia Lawall
@ 2015-10-22 10:30 ` Navya Sri Nizamkari
1 sibling, 0 replies; 10+ messages in thread
From: Navya Sri Nizamkari @ 2015-10-22 10:30 UTC (permalink / raw)
To: outreachy-kernel; +Cc: navyasri.tech
[-- Attachment #1.1: Type: text/plain, Size: 1141 bytes --]
On Thursday, October 22, 2015 at 2:08:02 PM UTC+5:30, Daniel Baluta wrote:
>
> On Wed, Oct 21, 2015 at 7:48 PM, Navya Sri Nizamkari
> <navyas...@gmail.com <javascript:>> wrote:
> > This patch fixes the checkpatch.pl error:
> >
> > ERROR: space required after that ';'
> >
> > Signed-off-by: Navya Sri Nizamkari <navyas...@gmail.com <javascript:>>
> > ---
> > drivers/staging/xgifb/vb_init.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/xgifb/vb_init.c
> b/drivers/staging/xgifb/vb_init.c
> > index ea358a0..6204a98 100644
> > --- a/drivers/staging/xgifb/vb_init.c
> > +++ b/drivers/staging/xgifb/vb_init.c
> > @@ -10,7 +10,7 @@ static const unsigned short
> XGINew_DDRDRAM_TYPE340[4][2] = {
> > { 16, 0x45},
> > { 8, 0x35},
> > { 4, 0x31},
> > - { 2, 0x21} };e
> > + { 2, 0x21} }; e
>
> Hmm, something went wrong here :)
>
> Please edit the file and remove 'e' after ';'. Otherwise, your code
> wouldn't even compile.
>
> thanks,
> Daniel.
>
This 'e' seems the typo introduced by me. Sorry. Thanks for the correction.
[-- Attachment #1.2: Type: text/html, Size: 1726 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 2/5] Staging: xgifb: Remove blank line before } and after {
2015-10-21 16:47 [PATCH 0/5] Improve code, codestyle in xgifb Navya Sri Nizamkari
2015-10-21 16:48 ` [PATCH 1/5] Staging: xgifb: Add space between ; and variable name Navya Sri Nizamkari
@ 2015-10-21 16:49 ` Navya Sri Nizamkari
2015-10-21 16:50 ` [PATCH 3/5] Staging: xgifb: Remove extra blank lines Navya Sri Nizamkari
` (2 subsequent siblings)
4 siblings, 0 replies; 10+ messages in thread
From: Navya Sri Nizamkari @ 2015-10-21 16:49 UTC (permalink / raw)
To: outreachy-kernel; +Cc: outreachy-kernel
Remove blank line after { and before }.
Problem found using checkpatch.
Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
---
drivers/staging/xgifb/vb_init.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/staging/xgifb/vb_init.c b/drivers/staging/xgifb/vb_init.c
index 6204a98..2eee3ac 100644
--- a/drivers/staging/xgifb/vb_init.c
+++ b/drivers/staging/xgifb/vb_init.c
@@ -195,7 +195,6 @@ static void XGINew_DDRII_Bootup_XG27(
/* Set SR1B refresh control 000:close; 010:open */
xgifb_reg_set(P3c4, 0x1B, 0x04);
usleep_range(200);
-
}
static void XGINew_DDR2_MRS_XG20(struct xgi_hw_device_info *HwDeviceExtension,
@@ -1059,7 +1058,6 @@ static void XGINew_SetModeScratch(struct vb_device_info *pVBInfo)
CR38Data &= ~SetYPbPr;
CR38Data |= tempch;
xgifb_reg_set(pVBInfo->P3d4, 0x38, CR38Data);
-
}
static unsigned short XGINew_SenseLCD(struct xgi_hw_device_info
@@ -1134,7 +1132,6 @@ static void XGINew_GetXG27Sense(struct vb_device_info *pVBInfo)
xgifb_reg_and_or(pVBInfo->P3d4, 0x38, ~0xE0, 0xA0);
}
xgifb_reg_or(pVBInfo->P3d4, 0x32, LCDSense);
-
}
static unsigned char GetXG21FPBits(struct vb_device_info *pVBInfo)
@@ -1329,14 +1326,12 @@ unsigned char XGIInitNew(struct pci_dev *pdev)
XGI_SenseCRT1(pVBInfo);
if (HwDeviceExtension->jChipType == XG21) {
-
xgifb_reg_and_or(pVBInfo->P3d4,
0x32,
~Monitor1Sense,
Monitor1Sense); /* Z9 default has CRT */
temp = GetXG21FPBits(pVBInfo);
xgifb_reg_and_or(pVBInfo->P3d4, 0x37, ~0x01, temp);
-
}
if (HwDeviceExtension->jChipType == XG27) {
xgifb_reg_and_or(pVBInfo->P3d4,
--
1.9.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 3/5] Staging: xgifb: Remove extra blank lines.
2015-10-21 16:47 [PATCH 0/5] Improve code, codestyle in xgifb Navya Sri Nizamkari
2015-10-21 16:48 ` [PATCH 1/5] Staging: xgifb: Add space between ; and variable name Navya Sri Nizamkari
2015-10-21 16:49 ` [PATCH 2/5] Staging: xgifb: Remove blank line before } and after { Navya Sri Nizamkari
@ 2015-10-21 16:50 ` Navya Sri Nizamkari
2015-10-21 16:50 ` [PATCH 4/5] Staging: xgifb: Fix comparison to NULL warning Navya Sri Nizamkari
2015-10-21 16:51 ` [PATCH 5/5] Staging: xgifb: Remove space after cast Navya Sri Nizamkari
4 siblings, 0 replies; 10+ messages in thread
From: Navya Sri Nizamkari @ 2015-10-21 16:50 UTC (permalink / raw)
To: outreachy-kernel; +Cc: outreachy-kernel
This patch fixes the checkpatch.pl check:
CHECK: Please don't use multiple blank lines
Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
---
drivers/staging/xgifb/vb_init.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/xgifb/vb_init.c b/drivers/staging/xgifb/vb_init.c
index 2eee3ac..1aa8600 100644
--- a/drivers/staging/xgifb/vb_init.c
+++ b/drivers/staging/xgifb/vb_init.c
@@ -498,7 +498,6 @@ static void XGINew_SetDRAMDefaultRegister340(
xgifb_reg_set(P3c4, 0x1B, 0x03); /* SR1B */
}
-
static unsigned short XGINew_SetDRAMSize20Reg(
unsigned short dram_size,
struct vb_device_info *pVBInfo)
--
1.9.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 4/5] Staging: xgifb: Fix comparison to NULL warning
2015-10-21 16:47 [PATCH 0/5] Improve code, codestyle in xgifb Navya Sri Nizamkari
` (2 preceding siblings ...)
2015-10-21 16:50 ` [PATCH 3/5] Staging: xgifb: Remove extra blank lines Navya Sri Nizamkari
@ 2015-10-21 16:50 ` Navya Sri Nizamkari
2015-10-21 16:51 ` [PATCH 5/5] Staging: xgifb: Remove space after cast Navya Sri Nizamkari
4 siblings, 0 replies; 10+ messages in thread
From: Navya Sri Nizamkari @ 2015-10-21 16:50 UTC (permalink / raw)
To: outreachy-kernel; +Cc: outreachy-kernel
Change comparison to NULL to a ! operation.
Found using checkpatch.
Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
---
drivers/staging/xgifb/vb_init.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/xgifb/vb_init.c b/drivers/staging/xgifb/vb_init.c
index 1aa8600..0615f1c 100644
--- a/drivers/staging/xgifb/vb_init.c
+++ b/drivers/staging/xgifb/vb_init.c
@@ -851,11 +851,11 @@ static u8 *xgifb_copy_rom(struct pci_dev *dev, size_t *rom_size)
u8 *rom_copy;
rom_address = pci_map_rom(dev, rom_size);
- if (rom_address == NULL)
+ if (!rom_address)
return NULL;
rom_copy = vzalloc(XGIFB_ROM_SIZE);
- if (rom_copy == NULL)
+ if (!rom_copy)
goto done;
*rom_size = min_t(size_t, *rom_size, XGIFB_ROM_SIZE);
@@ -877,7 +877,7 @@ static bool xgifb_read_vbios(struct pci_dev *pdev)
int entry;
vbios = xgifb_copy_rom(pdev, &vbios_size);
- if (vbios == NULL) {
+ if (!vbios) {
dev_err(&pdev->dev, "Video BIOS not available\n");
return false;
}
@@ -1187,7 +1187,7 @@ unsigned char XGIInitNew(struct pci_dev *pdev)
pVBInfo->FBAddr = HwDeviceExtension->pjVideoMemoryAddress;
- if (pVBInfo->FBAddr == NULL) {
+ if (!pVBInfo->FBAddr) {
dev_dbg(&pdev->dev, "pVBInfo->FBAddr == 0\n");
return 0;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 5/5] Staging: xgifb: Remove space after cast
2015-10-21 16:47 [PATCH 0/5] Improve code, codestyle in xgifb Navya Sri Nizamkari
` (3 preceding siblings ...)
2015-10-21 16:50 ` [PATCH 4/5] Staging: xgifb: Fix comparison to NULL warning Navya Sri Nizamkari
@ 2015-10-21 16:51 ` Navya Sri Nizamkari
4 siblings, 0 replies; 10+ messages in thread
From: Navya Sri Nizamkari @ 2015-10-21 16:51 UTC (permalink / raw)
To: outreachy-kernel; +Cc: outreachy-kernel
This patch fixes the checkpatch check:
CHECK: No space is necessary after a cast
Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
---
drivers/staging/xgifb/vb_init.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/xgifb/vb_init.c b/drivers/staging/xgifb/vb_init.c
index 0615f1c..cef24b3 100644
--- a/drivers/staging/xgifb/vb_init.c
+++ b/drivers/staging/xgifb/vb_init.c
@@ -815,7 +815,7 @@ static int XGINew_DDRSizing340(struct xgi_hw_device_info *HwDeviceExtension,
memsize += (pVBInfo->ram_channel - 2) + 20;
if ((HwDeviceExtension->ulVideoMemorySize - 1) <
- (unsigned long) (1 << memsize))
+ (unsigned long)(1 << memsize))
continue;
if (XGINew_ReadWriteRest(memsize, start_addr, pVBInfo) == 1)
@@ -836,7 +836,7 @@ static void XGINew_SetDRAMSize_340(struct xgifb_video_info *xgifb_info,
data = xgifb_reg_get(pVBInfo->P3c4, 0x21);
/* disable read cache */
- xgifb_reg_set(pVBInfo->P3c4, 0x21, (unsigned short) (data & 0xDF));
+ xgifb_reg_set(pVBInfo->P3c4, 0x21, (unsigned short)(data & 0xDF));
XGI_DisplayOff(xgifb_info, HwDeviceExtension, pVBInfo);
XGINew_DDRSizing340(HwDeviceExtension, pVBInfo);
--
1.9.1
^ permalink raw reply related [flat|nested] 10+ messages in thread