Re: [PATCH] staging: media: lirc: fix coding style error

2015-06-19 Thread Dan Carpenter
On Wed, Jun 17, 2015 at 06:01:32PM +0530, Sunil Shahu wrote:
> Fix code indentation error by replacing tab in place of spaces.
> 
> Signed-off-by: Sunil Shahu 
> ---
>  drivers/staging/media/lirc/lirc_sasem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/lirc/lirc_sasem.c 
> b/drivers/staging/media/lirc/lirc_sasem.c
> index 8ebee96..12aae72 100644
> --- a/drivers/staging/media/lirc/lirc_sasem.c
> +++ b/drivers/staging/media/lirc/lirc_sasem.c
> @@ -185,7 +185,7 @@ static void deregister_from_lirc(struct sasem_context 
> *context)
>  __func__, retval);
>   else
>   dev_info(&context->dev->dev,
> -  "Deregistered Sasem driver (minor:%d)\n", minor);
> + "Deregistered Sasem driver (minor:%d)\n", minor);

Not quite.  The original is:

[tab][tab][space][space][space][space][space][space][space][space][space]"Dere...

You have:

[tab][tab][tab]"Deregistered Sasem driver ...

It should be:

[tab][tab][tab][space]"Deregistered Sasem driver (minor:%d)\n", minor);

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] drivers: staging: rtl8712: remove unnecessory else statement

2015-06-19 Thread Sunil Shahu
"else" statement after "if" is unnecessory, hence removed.

Signed-off-by: Sunil Shahu 
---
 drivers/staging/rtl8712/rtl871x_security.c | 35 ++
 1 file changed, 16 insertions(+), 19 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl871x_security.c 
b/drivers/staging/rtl8712/rtl871x_security.c
index bcd1a51..21465c9 100644
--- a/drivers/staging/rtl8712/rtl871x_security.c
+++ b/drivers/staging/rtl8712/rtl871x_security.c
@@ -124,28 +124,25 @@ static u8 crc32_reverseBit(u8 data)
 
 static void crc32_init(void)
 {
+   sint i, j;
+   u32 c = 0x1234;
+   u8 *p = (u8 *)&c, *p1;
+   u8 k;
+
if (bcrc32initialized == 1)
return;
-   else {
-   sint i, j;
-   u32 c;
-   u8 *p = (u8 *)&c, *p1;
-   u8 k;
-
-   c = 0x1234;
-   for (i = 0; i < 256; ++i) {
-   k = crc32_reverseBit((u8)i);
-   for (c = ((u32)k) << 24, j = 8; j > 0; --j)
-   c = c & 0x8000 ? (c << 1) ^ CRC32_POLY :
-   (c << 1);
-   p1 = (u8 *)&crc32_table[i];
-   p1[0] = crc32_reverseBit(p[3]);
-   p1[1] = crc32_reverseBit(p[2]);
-   p1[2] = crc32_reverseBit(p[1]);
-   p1[3] = crc32_reverseBit(p[0]);
-   }
-   bcrc32initialized = 1;
+
+   for (i = 0; i < 256; ++i) {
+   k = crc32_reverseBit((u8)i);
+   for (c = ((u32)k) << 24, j = 8; j > 0; --j)
+   c = c & 0x8000 ? (c << 1) ^ CRC32_POLY : (c << 1);
+   p1 = (u8 *)&crc32_table[i];
+   p1[0] = crc32_reverseBit(p[3]);
+   p1[1] = crc32_reverseBit(p[2]);
+   p1[2] = crc32_reverseBit(p[1]);
+   p1[3] = crc32_reverseBit(p[0]);
}
+   bcrc32initialized = 1;
 }
 
 static u32 getcrc32(u8 *buf, u32 len)
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: media: lirc: fix coding style error

2015-06-19 Thread Sunil Shahu
Fix code indentation error by replacing tab in place of spaces.

Signed-off-by: Sunil Shahu 
---
 drivers/staging/media/lirc/lirc_sasem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/lirc/lirc_sasem.c 
b/drivers/staging/media/lirc/lirc_sasem.c
index 8ebee96..12aae72 100644
--- a/drivers/staging/media/lirc/lirc_sasem.c
+++ b/drivers/staging/media/lirc/lirc_sasem.c
@@ -185,7 +185,7 @@ static void deregister_from_lirc(struct sasem_context 
*context)
   __func__, retval);
else
dev_info(&context->dev->dev,
-"Deregistered Sasem driver (minor:%d)\n", minor);
+   "Deregistered Sasem driver (minor:%d)\n", minor);
 
 }
 
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: media: lirc: fix coding style error

2015-06-19 Thread Sunil Shahu
Fix code indentation error by replacing tab in place of spaces.

Signed-off-by: Sunil Shahu 
---
 drivers/staging/media/lirc/lirc_sasem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/lirc/lirc_sasem.c 
b/drivers/staging/media/lirc/lirc_sasem.c
index 8ebee96..c14ca7e 100644
--- a/drivers/staging/media/lirc/lirc_sasem.c
+++ b/drivers/staging/media/lirc/lirc_sasem.c
@@ -185,7 +185,7 @@ static void deregister_from_lirc(struct sasem_context 
*context)
   __func__, retval);
else
dev_info(&context->dev->dev,
-"Deregistered Sasem driver (minor:%d)\n", minor);
+"Deregistered Sasem driver (minor:%d)\n", minor);
 
 }
 
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: doubt about sm7xxfb (was: Re: [PATCH v4 0/7] staging: fsl-mc: New functionality to the MC bus driver)

2015-06-19 Thread Dan Carpenter
On Sat, Jun 13, 2015 at 02:16:18PM +0530, Sudip Mukherjee wrote:
>
> can you please have a look (when you are free) at it to see if anything
> else needs to be done.

Remove any unused macros.
Cleanup indenting in the .h file.
drivers/staging/sm7xxfb/sm7xxfb.c:821 smtcfb_pci_probe() warn: 
'smtc_regbaseaddress' can't be NULL.
move the BIG_ENDIAN ifdefs to the .h file.  I don't understand why only
big endian systems get a fb_read/write?  Cleanup casts in fb_read/write.
cleanup comments.  make sure they are up to date and make sense.
cleanup function declarations.  Make the style consistent.
run checkpatch.pl --strict
Remind me we need the #ifndef MODULE?

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 2/3] staging: unisys: convert pack pragma to __packed

2015-06-19 Thread Dan Carpenter
On Fri, Jun 12, 2015 at 04:46:07PM -0400, David Kershner wrote:
> It was noticed that iochannel.h was still using pragmas to
> pack the datastructures, should be using __packed instead.
> 
> Signed-off-by: David Kershner 

Could you take some time and figure out which structs should actually
be packed and which should not?  For example, in net_pkt_rcv the
pointers are not aligned so it will cause a slow down on x86 and crash
on other arches (which we don't care about).

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 09/17] staging/lirc_serial: Remove TSC-based timing

2015-06-19 Thread Dan Carpenter
This one should go to Mauro and linux-me...@vger.kernel.org instead of
Greg and de...@driverdev.osuosl.org.

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] drivers: staging: rtl8712: remove unnecessary else statement

2015-06-19 Thread Sunil Shahu
"else" statement after "if" is unnecessary, hence removed.

Signed-off-by: Sunil Shahu 
---
 drivers/staging/rtl8712/rtl871x_security.c | 35 ++
 1 file changed, 16 insertions(+), 19 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl871x_security.c 
b/drivers/staging/rtl8712/rtl871x_security.c
index bcd1a51..21465c9 100644
--- a/drivers/staging/rtl8712/rtl871x_security.c
+++ b/drivers/staging/rtl8712/rtl871x_security.c
@@ -124,28 +124,25 @@ static u8 crc32_reverseBit(u8 data)
 
 static void crc32_init(void)
 {
+   sint i, j;
+   u32 c = 0x1234;
+   u8 *p = (u8 *)&c, *p1;
+   u8 k;
+
if (bcrc32initialized == 1)
return;
-   else {
-   sint i, j;
-   u32 c;
-   u8 *p = (u8 *)&c, *p1;
-   u8 k;
-
-   c = 0x1234;
-   for (i = 0; i < 256; ++i) {
-   k = crc32_reverseBit((u8)i);
-   for (c = ((u32)k) << 24, j = 8; j > 0; --j)
-   c = c & 0x8000 ? (c << 1) ^ CRC32_POLY :
-   (c << 1);
-   p1 = (u8 *)&crc32_table[i];
-   p1[0] = crc32_reverseBit(p[3]);
-   p1[1] = crc32_reverseBit(p[2]);
-   p1[2] = crc32_reverseBit(p[1]);
-   p1[3] = crc32_reverseBit(p[0]);
-   }
-   bcrc32initialized = 1;
+
+   for (i = 0; i < 256; ++i) {
+   k = crc32_reverseBit((u8)i);
+   for (c = ((u32)k) << 24, j = 8; j > 0; --j)
+   c = c & 0x8000 ? (c << 1) ^ CRC32_POLY : (c << 1);
+   p1 = (u8 *)&crc32_table[i];
+   p1[0] = crc32_reverseBit(p[3]);
+   p1[1] = crc32_reverseBit(p[2]);
+   p1[2] = crc32_reverseBit(p[1]);
+   p1[3] = crc32_reverseBit(p[0]);
}
+   bcrc32initialized = 1;
 }
 
 static u32 getcrc32(u8 *buf, u32 len)
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: media: lirc: fix coding style error

2015-06-19 Thread Sudip Mukherjee
On Fri, Jun 19, 2015 at 02:22:02PM +0530, Sunil Shahu wrote:
> Fix code indentation error by replacing tab in place of spaces.
> 
> Signed-off-by: Sunil Shahu 
when you are sending a modified patch, please mark it as [PATCH v2]
otherwise it becomes confusing.

regards
sudip
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 3/6] Staging: comedi: daqboard2000: Simplify a trivial if-return sequence

2015-06-19 Thread Sudip Mukherjee
On Fri, Jun 19, 2015 at 06:00:06AM +, Abdul, Hussain (H.) wrote:
> From: Abdul Hussain 
> 
> This patch simplify a trivial if-return sequence. Possibly combine with
> a preceding function call.
> 
> Signed-off-by: Abdul Hussain 
> ---

> - return 0;
> + return subdev_8255_init(dev, s, daqboard2000_8255_cb, 
> dioP2ExpansionIO8Bit);
this is introducing new checkpatch warning about line over 80 characters

regards
sudip
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 7/7] Staging: rts5208: helper function to manage delink states

2015-06-19 Thread Dan Carpenter
On Sun, Jun 14, 2015 at 03:48:53PM +0200, Fabio Falzoi wrote:
> Use a helper function to manage delink states
> 
> Signed-off-by: Fabio Falzoi 
> ---
>  drivers/staging/rts5208/rtsx_chip.c | 141 
> ++--
>  1 file changed, 72 insertions(+), 69 deletions(-)
> 
> diff --git a/drivers/staging/rts5208/rtsx_chip.c 
> b/drivers/staging/rts5208/rtsx_chip.c
> index 298163a..d6fb6cd 100644
> --- a/drivers/staging/rts5208/rtsx_chip.c
> +++ b/drivers/staging/rts5208/rtsx_chip.c
> @@ -1318,6 +1318,77 @@ static void rtsx_manage_1lun_mode(struct rtsx_chip 
> *chip)
>  #endif
>  }
>  
> +static void rtsx_delink_stage1(struct rtsx_chip *chip, int enter_L1,
> +int stage3_cnt)
> +{
> + u8 val;
> +
> + rtsx_set_stat(chip, RTSX_STAT_DELINK);
> +
> + if (chip->asic_code && CHECK_PID(chip, 0x5208))
> + rtsx_set_phy_reg_bit(chip, 0x1C, 2);
> +
> + if (chip->card_exist)
> + dev_dbg(rtsx_dev(chip), "False card inserted, do force 
> delink\n");
> + else
> + dev_dbg(rtsx_dev(chip), "No card inserted, do delink\n");
> +
> + if (enter_L1)
> + rtsx_write_register(chip, HOST_SLEEP_STATE, 0x03, 1);
> +
> + if (chip->card_exist)
> + val = 0x03;

This should be 0x02.  Please fix it in another patch.


> + else
> + val = 0x0A;
> +
> + rtsx_write_register(chip, CHANGE_LINK_STATE, val, val);
> +
> + if (enter_L1)
> + rtsx_enter_L1(chip);
> +
> + if (chip->card_exist)
> + chip->auto_delink_cnt = stage3_cnt + 1;
> +}
> +
> +static void rtsx_delink_stage(struct rtsx_chip *chip)
> +{
> + int delink_stage1_cnt, delink_stage2_cnt, delink_stage3_cnt;
> + int enter_L1;
> +
> + if (!chip->auto_delink_en || !chip->auto_delink_allowed ||
> + chip->card_ready || chip->card_ejected || chip->sd_io) {
> + chip->auto_delink_cnt = 0;
> + return;
> + }
> +
> + enter_L1 = chip->auto_delink_in_L1 &&
> + (chip->aspm_l0s_l1_en || chip->ss_en);
> +
> + delink_stage1_cnt = chip->delink_stage1_step;
> + delink_stage2_cnt = delink_stage1_cnt + chip->delink_stage2_step;
> + delink_stage3_cnt = delink_stage2_cnt + chip->delink_stage3_step;
> +
> + if (chip->auto_delink_cnt > delink_stage3_cnt)
> + return;
> +
> + if (chip->auto_delink_cnt == delink_stage1_cnt)
> + rtsx_delink_stage1(chip, enter_L1, delink_stage3_cnt);
> +
> + if (chip->auto_delink_cnt == delink_stage2_cnt) {
> + dev_dbg(rtsx_dev(chip), "Try to do force delink\n");
> +
> + if (enter_L1)
> + rtsx_exit_L1(chip);
> +
> + if (chip->asic_code && CHECK_PID(chip, 0x5208))
> + rtsx_set_phy_reg_bit(chip, 0x1C, 2);
> +
> + rtsx_write_register(chip, CHANGE_LINK_STATE, 0x0A, 0x0A);
> + }
> +
> + chip->auto_delink_cnt++;


You didn't introduce this, but I'm not positive the
chip->auto_delink_cnt value is correct.  It feels like
rtsx_delink_stage1() increments it; fine; but then if it's
not equal to delink_stage2_cnt should we increment it again?

It's fine if you don't know the answer, I was just wondering if maybe
someone on the CC list knows.

regards,
dan carpenter


> +}
> +
>  void rtsx_polling_func(struct rtsx_chip *chip)
>  {
>   if (rtsx_chk_stat(chip, RTSX_STAT_SUSPEND))
> @@ -1372,75 +1443,7 @@ void rtsx_polling_func(struct rtsx_chip *chip)
>   rtsx_manage_1lun_mode(chip);
>  
>  delink_stage:
> - if (chip->auto_delink_en && chip->auto_delink_allowed &&
> - !chip->card_ready && !chip->card_ejected && !chip->sd_io) {
> - int enter_L1 = chip->auto_delink_in_L1 && (
> - chip->aspm_l0s_l1_en || chip->ss_en);
> - int delink_stage1_cnt = chip->delink_stage1_step;
> - int delink_stage2_cnt = delink_stage1_cnt +
> - chip->delink_stage2_step;
> - int delink_stage3_cnt = delink_stage2_cnt +
> - chip->delink_stage3_step;
> -
> - if (chip->auto_delink_cnt <= delink_stage3_cnt) {
> - if (chip->auto_delink_cnt == delink_stage1_cnt) {
> - rtsx_set_stat(chip, RTSX_STAT_DELINK);
> -
> - if (chip->asic_code && CHECK_PID(chip, 0x5208))
> - rtsx_set_phy_reg_bit(chip, 0x1C, 2);
> -
> - if (chip->card_exist) {
> - dev_dbg(rtsx_dev(chip), "False card 
> inserted, do force delink\n");
> -
> - if (enter_L1)
> - rtsx_write_register(chip,
> -   HOST_SLEEP_STATE,
> -   0x03, 1);
> -
> - rtsx_wr

Re: [PATCH 1/6] Staging: comedi: dmm32at: Simplify a trivial if-return sequence

2015-06-19 Thread gre...@linuxfoundation.org
On Fri, Jun 19, 2015 at 06:08:04AM +, Abdul, Hussain (H.) wrote:
> On Friday 19 June 2015 04:30 AM, gre...@linuxfoundation.org wrote:
> > On Tue, Jun 16, 2015 at 02:03:44PM +, Abdul, Hussain (H.) wrote:
> >> From: Abdul Hussain 
> >>
> >> This patch simplify a trivial if-return sequence. Possibly combine with
> >> a preceding function call.
> >>
> >> Signed-off-by: Abdul Hussain 
> > Always use scripts/get_maintainer.pl to properly cc the maintainers
> > responsible for these drivers.
> >
> > Please fix this up and resend.
> >
> > thanks,
> >
> > greg k-h
> >
> Greg, I resent the patch set with all the maintainer in the CC.

But you didn't label it as a v2, so now I have a bunch of duplicate
emails in my inbox :(
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: rtl8712: Corrected line that was over 80 characters

2015-06-19 Thread Arjun Krishna Babu
Signed-off-by: Arjun Krishna Babu 
---
 drivers/staging/rtl8712/rtl8712_led.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8712/rtl8712_led.c 
b/drivers/staging/rtl8712/rtl8712_led.c
index ada8d5d..0df7b0c 100644
--- a/drivers/staging/rtl8712/rtl8712_led.c
+++ b/drivers/staging/rtl8712/rtl8712_led.c
@@ -358,7 +358,7 @@ static void SwLedBlink1(struct LED_871x *pLed)
else
pLed->BlinkingLedState = LED_ON;
mod_timer(&pLed->BlinkTimer, jiffies +
- 
msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA));
+   msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA));
}
break;
case LED_TXRX_BLINK:
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 5/9] staging: sm7xxfb: fix alignment

2015-06-19 Thread Dan Carpenter
On Wed, Jun 17, 2015 at 04:54:44PM +0530, Sudip Mukherjee wrote:
> @@ -346,9 +346,8 @@ static ssize_t smtcfb_read(struct fb_info *info, char 
> __user *buf, size_t
>   dst = buffer;
>   for (i = c >> 2; i--;) {
>   *dst = fb_readl(src++);
> - *dst =
> - (*dst & 0xff00ff00 >> 8) |
> - (*dst & 0x00ff00ff << 8);
> + *dst = (*dst & 0xff00ff00 >> 8) |
> +(*dst & 0x00ff00ff << 8);

This is supposed to convert __le16 to __be16?

>   dst++;
>   }
>   if (c & 3) {

regards,
dan carpenter
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: rtl8712: Corrected line that was over 80 characters

2015-06-19 Thread Greg KH
On Fri, Jun 19, 2015 at 10:41:28PM +0800, Arjun Krishna Babu wrote:
> Signed-off-by: Arjun Krishna Babu 
> ---
>  drivers/staging/rtl8712/rtl8712_led.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtl8712/rtl8712_led.c 
> b/drivers/staging/rtl8712/rtl8712_led.c
> index ada8d5d..0df7b0c 100644
> --- a/drivers/staging/rtl8712/rtl8712_led.c
> +++ b/drivers/staging/rtl8712/rtl8712_led.c
> @@ -358,7 +358,7 @@ static void SwLedBlink1(struct LED_871x *pLed)
>   else
>   pLed->BlinkingLedState = LED_ON;
>   mod_timer(&pLed->BlinkTimer, jiffies +
> -   
> msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA));
> + msecs_to_jiffies(LED_BLINK_SCAN_INTERVAL_ALPHA));

No, please look at what you did, it does not look correct now does it?
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 8/9] staging: sm7xxfb: fix indention

2015-06-19 Thread Dan Carpenter
Oh.  Ok.  Fine.

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 9/9] staging: sm7xxfb: fix camelcase

2015-06-19 Thread Dan Carpenter
On Wed, Jun 17, 2015 at 04:54:48PM +0530, Sudip Mukherjee wrote:
> Fix the checkpatch warning about CamelCase.
> 
> Signed-off-by: Sudip Mukherjee 
> ---
>  drivers/staging/sm7xxfb/sm7xx.h   | 2 +-
>  drivers/staging/sm7xxfb/sm7xxfb.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/sm7xxfb/sm7xx.h b/drivers/staging/sm7xxfb/sm7xx.h
> index fc28429..4bed094 100644
> --- a/drivers/staging/sm7xxfb/sm7xx.h
> +++ b/drivers/staging/sm7xxfb/sm7xx.h
> @@ -98,7 +98,7 @@ static inline unsigned int smtc_seqr(int reg)
>  /* The next structure holds all information relevant for a specific video 
> mode.
>   */
>  
> -struct ModeInit {
> +struct modeinit {

struct mode_init is easier to read.

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 7/9] staging: sm7xxfb: move mode table

2015-06-19 Thread Dan Carpenter
On Wed, Jun 17, 2015 at 04:54:46PM +0530, Sudip Mukherjee wrote:
> +static const struct ModeInit vgamode[] = {
> + {
> +  /*  mode#0: 640 x 480  16Bpp  60Hz */
> +  640, 480, 16, 60,
> +  /*  Init_MISC */
> +  0xE3,
> +  {  /*  Init_SR0_SR4 */
> +   0x03, 0x01, 0x0F, 0x00, 0x0E,
> +   },

All this indenting is kind of whacky.

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH v2 2/3] staging: unisys: convert pack pragma to __packed

2015-06-19 Thread Kershner, David A


> -Original Message-
> From: Dan Carpenter [mailto:dan.carpen...@oracle.com]
> Sent: Friday, June 19, 2015 8:55 AM
> To: Kershner, David A
> Cc: gre...@linuxfoundation.org; jes.soren...@redhat.com; *S-Par-
> Maintainer; driverdev-devel@linuxdriverproject.org; Romer, Benjamin M
> Subject: Re: [PATCH v2 2/3] staging: unisys: convert pack pragma to
> __packed
> 
> On Fri, Jun 12, 2015 at 04:46:07PM -0400, David Kershner wrote:
> > It was noticed that iochannel.h was still using pragmas to
> > pack the datastructures, should be using __packed instead.
> >
> > Signed-off-by: David Kershner 
> 
> Could you take some time and figure out which structs should actually
> be packed and which should not?  For example, in net_pkt_rcv the
> pointers are not aligned so it will cause a slow down on x86 and crash
> on other arches (which we don't care about).
> 
> regards,
> dan carpenter

Dan, 

Thanks for the find. Unfortunately, all the structs defined in iochannel.h
need to be packed since they are shared across different OS and code
instances. I'll look into changing the s-Par firmware and will update the
iochannels structure as well.  

Your reference to x86, does that include x86_64? 

Thanks, 
David
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 2/3] staging: unisys: convert pack pragma to __packed

2015-06-19 Thread Jes Sorensen
"Kershner, David A"  writes:
>> -Original Message-
>> From: Dan Carpenter [mailto:dan.carpen...@oracle.com]
>> Sent: Friday, June 19, 2015 8:55 AM
>> To: Kershner, David A
>> Cc: gre...@linuxfoundation.org; jes.soren...@redhat.com; *S-Par-
>> Maintainer; driverdev-devel@linuxdriverproject.org; Romer, Benjamin M
>> Subject: Re: [PATCH v2 2/3] staging: unisys: convert pack pragma to
>> __packed
>> 
>> On Fri, Jun 12, 2015 at 04:46:07PM -0400, David Kershner wrote:
>> > It was noticed that iochannel.h was still using pragmas to
>> > pack the datastructures, should be using __packed instead.
>> >
>> > Signed-off-by: David Kershner 
>> 
>> Could you take some time and figure out which structs should actually
>> be packed and which should not?  For example, in net_pkt_rcv the
>> pointers are not aligned so it will cause a slow down on x86 and crash
>> on other arches (which we don't care about).
>> 
>> regards,
>> dan carpenter
>
> Dan, 
>
> Thanks for the find. Unfortunately, all the structs defined in iochannel.h
> need to be packed since they are shared across different OS and code
> instances. I'll look into changing the s-Par firmware and will update the
> iochannels structure as well.  
>
> Your reference to x86, does that include x86_64? 

Not sure how the firmware interface is, but I hope you can version tag
it so the OS can know when to do what?

Cheers,
Jes
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: rts5208: fix CHANGE_LINK_STATE value

2015-06-19 Thread Fabio Falzoi
Fix CHANGE_LINK_STATE value when card_exist is true.
This bug was introduced in a9b693cd77d70fb93dad8cbce667a49cd9b87352

Signed-off-by: Fabio Falzoi 
---
 drivers/staging/rts5208/rtsx_chip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rts5208/rtsx_chip.c 
b/drivers/staging/rts5208/rtsx_chip.c
index d6fb6cd..0df3b9d 100644
--- a/drivers/staging/rts5208/rtsx_chip.c
+++ b/drivers/staging/rts5208/rtsx_chip.c
@@ -1337,7 +1337,7 @@ static void rtsx_delink_stage1(struct rtsx_chip *chip, 
int enter_L1,
rtsx_write_register(chip, HOST_SLEEP_STATE, 0x03, 1);
 
if (chip->card_exist)
-   val = 0x03;
+   val = 0x02;
else
val = 0x0A;
 
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: rts5208: fix CHANGE_LINK_STATE value

2015-06-19 Thread Joe Perches
On Fri, 2015-06-19 at 17:12 +0200, Fabio Falzoi wrote:
> Fix CHANGE_LINK_STATE value when card_exist is true.
> This bug was introduced in a9b693cd77d70fb93dad8cbce667a49cd9b87352

Please use just 12 byte of the SHA-1 and add the title:

Something like:

This bug was introduced in commit a9b693cd77d7 ("Staging:
rts5208: helper function to manage delink states")

Maybe add a "Fixes: " line instead.


___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2] Staging: rts5208: fix CHANGE_LINK_STATE value

2015-06-19 Thread Fabio Falzoi
Fix CHANGE_LINK_STATE value when card_exist is true.

Fixes: a9b693cd77d7 ("Staging: rts5208: helper function to manage delink 
states")
Signed-off-by: Fabio Falzoi 
---
 drivers/staging/rts5208/rtsx_chip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rts5208/rtsx_chip.c 
b/drivers/staging/rts5208/rtsx_chip.c
index d6fb6cd..0df3b9d 100644
--- a/drivers/staging/rts5208/rtsx_chip.c
+++ b/drivers/staging/rts5208/rtsx_chip.c
@@ -1337,7 +1337,7 @@ static void rtsx_delink_stage1(struct rtsx_chip *chip, 
int enter_L1,
rtsx_write_register(chip, HOST_SLEEP_STATE, 0x03, 1);
 
if (chip->card_exist)
-   val = 0x03;
+   val = 0x02;
else
val = 0x0A;
 
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 09/17] staging/lirc_serial: Remove TSC-based timing

2015-06-19 Thread Andy Lutomirski
Hi Mauro, etc:

Are you okay with this change landing in the tip tree?

--Andy

On Fri, Jun 12, 2015 at 4:44 PM, Andy Lutomirski  wrote:
> It wasn't compiled in by default.  I suspect that the driver was and
> still is broken, though -- it's calling udelay with a parameter
> that's derived from loops_per_jiffy.
>
> Cc: Jarod Wilson 
> Cc: de...@driverdev.osuosl.org
> Cc: Greg Kroah-Hartman 
> Signed-off-by: Andy Lutomirski 
> ---
>  drivers/staging/media/lirc/lirc_serial.c | 63 
> ++--
>  1 file changed, 4 insertions(+), 59 deletions(-)
>
> diff --git a/drivers/staging/media/lirc/lirc_serial.c 
> b/drivers/staging/media/lirc/lirc_serial.c
> index dc7984455c3a..465796a686c4 100644
> --- a/drivers/staging/media/lirc/lirc_serial.c
> +++ b/drivers/staging/media/lirc/lirc_serial.c
> @@ -327,9 +327,6 @@ static void safe_udelay(unsigned long usecs)
>   * time
>   */
>
> -/* So send_pulse can quickly convert microseconds to clocks */
> -static unsigned long conv_us_to_clocks;
> -
>  static int init_timing_params(unsigned int new_duty_cycle,
> unsigned int new_freq)
>  {
> @@ -344,7 +341,6 @@ static int init_timing_params(unsigned int new_duty_cycle,
> /* How many clocks in a microsecond?, avoiding long long divide */
> work = loops_per_sec;
> work *= 4295;  /* 4295 = 2^32 / 1e6 */
> -   conv_us_to_clocks = work >> 32;
>
> /*
>  * Carrier period in clocks, approach good up to 32GHz clock,
> @@ -357,10 +353,9 @@ static int init_timing_params(unsigned int 
> new_duty_cycle,
> pulse_width = period * duty_cycle / 100;
> space_width = period - pulse_width;
> dprintk("in init_timing_params, freq=%d, duty_cycle=%d, "
> -   "clk/jiffy=%ld, pulse=%ld, space=%ld, "
> -   "conv_us_to_clocks=%ld\n",
> +   "clk/jiffy=%ld, pulse=%ld, space=%ld\n",
> freq, duty_cycle, __this_cpu_read(cpu_info.loops_per_jiffy),
> -   pulse_width, space_width, conv_us_to_clocks);
> +   pulse_width, space_width);
> return 0;
>  }
>  #else /* ! USE_RDTSC */
> @@ -431,63 +426,14 @@ static long send_pulse_irdeo(unsigned long length)
> return ret;
>  }
>
> -#ifdef USE_RDTSC
> -/* Version that uses Pentium rdtsc instruction to measure clocks */
> -
> -/*
> - * This version does sub-microsecond timing using rdtsc instruction,
> - * and does away with the fudged LIRC_SERIAL_TRANSMITTER_LATENCY
> - * Implicitly i586 architecture...  - Steve
> - */
> -
> -static long send_pulse_homebrew_softcarrier(unsigned long length)
> -{
> -   int flag;
> -   unsigned long target, start, now;
> -
> -   /* Get going quick as we can */
> -   rdtscl(start);
> -   on();
> -   /* Convert length from microseconds to clocks */
> -   length *= conv_us_to_clocks;
> -   /* And loop till time is up - flipping at right intervals */
> -   now = start;
> -   target = pulse_width;
> -   flag = 1;
> -   /*
> -* FIXME: This looks like a hard busy wait, without even an 
> occasional,
> -* polite, cpu_relax() call.  There's got to be a better way?
> -*
> -* The i2c code has the result of a lot of bit-banging work, I wonder 
> if
> -* there's something there which could be helpful here.
> -*/
> -   while ((now - start) < length) {
> -   /* Delay till flip time */
> -   do {
> -   rdtscl(now);
> -   } while ((now - start) < target);
> -
> -   /* flip */
> -   if (flag) {
> -   rdtscl(now);
> -   off();
> -   target += space_width;
> -   } else {
> -   rdtscl(now); on();
> -   target += pulse_width;
> -   }
> -   flag = !flag;
> -   }
> -   rdtscl(now);
> -   return ((now - start) - length) / conv_us_to_clocks;
> -}
> -#else /* ! USE_RDTSC */
>  /* Version using udelay() */
>
>  /*
>   * here we use fixed point arithmetic, with 8
>   * fractional bits.  that gets us within 0.1% or so of the right average
>   * frequency, albeit with some jitter in pulse length - Steve
> + *
> + * This should use ndelay instead.
>   */
>
>  /* To match 8 fractional bits used for pulse/space length */
> @@ -520,7 +466,6 @@ static long send_pulse_homebrew_softcarrier(unsigned long 
> length)
> }
> return (actual-length) >> 8;
>  }
> -#endif /* USE_RDTSC */
>
>  static long send_pulse_homebrew(unsigned long length)
>  {
> --
> 2.4.2
>



-- 
Andy Lutomirski
AMA Capital Management, LLC
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] drivers: staging: rtl8712: remove unnecessory else statement

2015-06-19 Thread Greg KH
On Fri, Jun 19, 2015 at 01:52:43PM +0530, Sunil Shahu wrote:
> "else" statement after "if" is unnecessory, hence removed.
> 
> Signed-off-by: Sunil Shahu 
> ---
>  drivers/staging/rtl8712/rtl871x_security.c | 35 
> ++
>  1 file changed, 16 insertions(+), 19 deletions(-)

You sent 2 patches, with identical subjects, yet no indication of which
to take, so I'm going to delete both of them from my queue and wait for
you to send a v2 patch like should be properly done.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2 2/3] staging: unisys: convert pack pragma to __packed

2015-06-19 Thread Dan Carpenter
On Fri, Jun 19, 2015 at 03:02:32PM +, Kershner, David A wrote:
> Thanks for the find. Unfortunately, all the structs defined in iochannel.h
> need to be packed since they are shared across different OS and code
> instances. I'll look into changing the s-Par firmware and will update the
> iochannels structure as well.  
> 
> Your reference to x86, does that include x86_64? 

Yes.  I just it up on google so I don't know if it makes a difference
here.

http://stackoverflow.com/questions/3057452/misaligned-pointer-performance

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: sm750fb: use tabs for indentation

2015-06-19 Thread Juston Li
Replace spaces with tabs for indentation to fix the checkpatch.pl warning
'WARNING: please, no spaces at the start of a line'

checkpatch doesn't catch comments indented by spaces but I fixed comments
adjacent to warnings as well so they would remain aligned.

Signed-off-by: Juston Li 
---
 drivers/staging/sm750fb/ddk750_display.c |  96 
 drivers/staging/sm750fb/ddk750_display.h |   2 +-
 drivers/staging/sm750fb/ddk750_dvi.c |  66 ++---
 drivers/staging/sm750fb/ddk750_help.h|   4 +-
 drivers/staging/sm750fb/ddk750_hwi2c.c   | 252 ++-
 drivers/staging/sm750fb/ddk750_mode.c| 142 +--
 drivers/staging/sm750fb/ddk750_mode.h|  46 ++--
 drivers/staging/sm750fb/ddk750_power.c   | 254 ++--
 drivers/staging/sm750fb/ddk750_power.h   |   8 +-
 drivers/staging/sm750fb/ddk750_reg.h |  18 +-
 drivers/staging/sm750fb/ddk750_sii164.c  | 400 +++
 drivers/staging/sm750fb/ddk750_sii164.h  |  29 ++-
 drivers/staging/sm750fb/sm750.h  |  24 +-
 drivers/staging/sm750fb/sm750_accel.c| 364 ++--
 drivers/staging/sm750fb/sm750_accel.h|   4 +-
 drivers/staging/sm750fb/sm750_help.h |  26 +-
 drivers/staging/sm750fb/sm750_hw.c   |  70 +++---
 drivers/staging/sm750fb/sm750_hw.h   |  28 +--
 18 files changed, 906 insertions(+), 927 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_display.c 
b/drivers/staging/sm750fb/ddk750_display.c
index a3e6720..cae9d91 100644
--- a/drivers/staging/sm750fb/ddk750_display.c
+++ b/drivers/staging/sm750fb/ddk750_display.c
@@ -24,7 +24,7 @@ static void setDisplayControl(int ctrl, int dispState)
/* Timing should be enabled first before enabling the 
plane
 * because changing at the same time does not guarantee 
that
 * the plane will also enabled or disabled.
-*/
+*/
ulDisplayCtrlReg = FIELD_SET(ulDisplayCtrlReg,

PANEL_DISPLAY_CTRL, TIMING, ENABLE);
POKE32(PANEL_DISPLAY_CTRL, ulDisplayCtrlReg);
@@ -145,26 +145,26 @@ static void waitNextVerticalSync(int ctrl, int delay)
return;
}
 
-while (delay-- > 0)
-{
-/* Wait for end of vsync. */
-do
-{
-status = FIELD_GET(PEEK32(SYSTEM_CTRL),
-   SYSTEM_CTRL,
-   PANEL_VSYNC);
-}
-while (status == SYSTEM_CTRL_PANEL_VSYNC_ACTIVE);
-
-/* Wait for start of vsync. */
-do
-{
-status = FIELD_GET(PEEK32(SYSTEM_CTRL),
-   SYSTEM_CTRL,
-   PANEL_VSYNC);
-}
-while (status == SYSTEM_CTRL_PANEL_VSYNC_INACTIVE);
-}
+   while (delay-- > 0)
+   {
+   /* Wait for end of vsync. */
+   do
+   {
+   status = FIELD_GET(PEEK32(SYSTEM_CTRL),
+SYSTEM_CTRL,
+PANEL_VSYNC);
+   }
+   while (status == SYSTEM_CTRL_PANEL_VSYNC_ACTIVE);
+
+   /* Wait for start of vsync. */
+   do
+   {
+   status = FIELD_GET(PEEK32(SYSTEM_CTRL),
+  SYSTEM_CTRL,
+  PANEL_VSYNC);
+   }
+   while (status == SYSTEM_CTRL_PANEL_VSYNC_INACTIVE);
+   }
 
}else{
 
@@ -275,33 +275,33 @@ void ddk750_setLogicalDispOut(disp_output_t output)
 
 int ddk750_initDVIDisp(void)
 {
-/* Initialize DVI. If the dviInit fail and the VendorID or the DeviceID are
-   not zeroed, then set the failure flag. If it is zeroe, it might mean
-   that the system is in Dual CRT Monitor configuration. */
-
-/* De-skew enabled with default 111b value.
-   This will fix some artifacts problem in some mode on board 2.2.
-   Somehow this fix does not affect board 2.1.
- */
-if ((dviInit(1,  /* Select Rising Edge */
-1,  /* Select 24-bit bus */
-0,  /* Select Single Edge clock */
-1,  /* Enable HSync as is */
-1,  /* Enable VSync as is */
-1,  /* Enable De-skew */
-7,  /* Set the de-skew setting to maximum setup */
-1,  /* Enable continuous Sync */
-1,  /* Enable PLL Filter */
-4   /* Use the recommended value for PLL Filter value */
-) != 0) && (dviGetVendorID() != 0x) && (dviGetDeviceID() != 
0x

[PATCH] staging: vt6656: Fixed two lines over 80 characters long

2015-06-19 Thread Arjun Krishna Babu
The presence of comments originally caused the two lines
to be over 80 characters long.

The issue is fixed by moving the comments into a separate line.

Signed-off-by: Arjun Krishna Babu 
---
 drivers/staging/vt6656/rxtx.c | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index 8116791..da075f4 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -45,8 +45,11 @@
 #include "usbpipe.h"
 
 static const u16 vnt_time_stampoff[2][MAX_RATE] = {
-   {384, 288, 226, 209, 54, 43, 37, 31, 28, 25, 24, 23},/* Long Preamble */
-   {384, 192, 130, 113, 54, 43, 37, 31, 28, 25, 24, 23},/* Short Preamble 
*/
+   /* Long Preamble */
+   {384, 288, 226, 209, 54, 43, 37, 31, 28, 25, 24, 23},
+
+   /* Short Preamble */
+   {384, 192, 130, 113, 54, 43, 37, 31, 28, 25, 24, 23},
 };
 
 static const u16 vnt_fb_opt0[2][5] = {
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v2] staging: sm750fb: use tabs for indentation

2015-06-19 Thread Juston Li
Replace spaces with tabs for indentation to fix the checkpatch.pl warning
'WARNING: please, no spaces at the start of a line'

checkpatch doesn't catch comments indented by spaces but I fixed comments
adjacent to warnings as well so they would remain aligned.

Changes since v1:
fix alignment in ddk750_display.c:154
didn't remove a space in ddk750_hwi2c.c:48

Signed-off-by: Juston Li 
---
 drivers/staging/sm750fb/ddk750_display.c |  96 
 drivers/staging/sm750fb/ddk750_display.h |   2 +-
 drivers/staging/sm750fb/ddk750_dvi.c |  66 ++---
 drivers/staging/sm750fb/ddk750_help.h|   4 +-
 drivers/staging/sm750fb/ddk750_hwi2c.c   | 252 ++-
 drivers/staging/sm750fb/ddk750_mode.c| 142 +--
 drivers/staging/sm750fb/ddk750_mode.h|  46 ++--
 drivers/staging/sm750fb/ddk750_power.c   | 254 ++--
 drivers/staging/sm750fb/ddk750_power.h   |   8 +-
 drivers/staging/sm750fb/ddk750_reg.h |  18 +-
 drivers/staging/sm750fb/ddk750_sii164.c  | 400 +++
 drivers/staging/sm750fb/ddk750_sii164.h  |  29 ++-
 drivers/staging/sm750fb/sm750.h  |  24 +-
 drivers/staging/sm750fb/sm750_accel.c| 364 ++--
 drivers/staging/sm750fb/sm750_accel.h|   4 +-
 drivers/staging/sm750fb/sm750_help.h |  26 +-
 drivers/staging/sm750fb/sm750_hw.c   |  70 +++---
 drivers/staging/sm750fb/sm750_hw.h   |  28 +--
 18 files changed, 906 insertions(+), 927 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_display.c 
b/drivers/staging/sm750fb/ddk750_display.c
index a3e6720..7aa22c1 100644
--- a/drivers/staging/sm750fb/ddk750_display.c
+++ b/drivers/staging/sm750fb/ddk750_display.c
@@ -24,7 +24,7 @@ static void setDisplayControl(int ctrl, int dispState)
/* Timing should be enabled first before enabling the 
plane
 * because changing at the same time does not guarantee 
that
 * the plane will also enabled or disabled.
-*/
+*/
ulDisplayCtrlReg = FIELD_SET(ulDisplayCtrlReg,

PANEL_DISPLAY_CTRL, TIMING, ENABLE);
POKE32(PANEL_DISPLAY_CTRL, ulDisplayCtrlReg);
@@ -145,26 +145,26 @@ static void waitNextVerticalSync(int ctrl, int delay)
return;
}
 
-while (delay-- > 0)
-{
-/* Wait for end of vsync. */
-do
-{
-status = FIELD_GET(PEEK32(SYSTEM_CTRL),
-   SYSTEM_CTRL,
-   PANEL_VSYNC);
-}
-while (status == SYSTEM_CTRL_PANEL_VSYNC_ACTIVE);
-
-/* Wait for start of vsync. */
-do
-{
-status = FIELD_GET(PEEK32(SYSTEM_CTRL),
-   SYSTEM_CTRL,
-   PANEL_VSYNC);
-}
-while (status == SYSTEM_CTRL_PANEL_VSYNC_INACTIVE);
-}
+   while (delay-- > 0)
+   {
+   /* Wait for end of vsync. */
+   do
+   {
+   status = FIELD_GET(PEEK32(SYSTEM_CTRL),
+  SYSTEM_CTRL,
+  PANEL_VSYNC);
+   }
+   while (status == SYSTEM_CTRL_PANEL_VSYNC_ACTIVE);
+
+   /* Wait for start of vsync. */
+   do
+   {
+   status = FIELD_GET(PEEK32(SYSTEM_CTRL),
+  SYSTEM_CTRL,
+  PANEL_VSYNC);
+   }
+   while (status == SYSTEM_CTRL_PANEL_VSYNC_INACTIVE);
+   }
 
}else{
 
@@ -275,33 +275,33 @@ void ddk750_setLogicalDispOut(disp_output_t output)
 
 int ddk750_initDVIDisp(void)
 {
-/* Initialize DVI. If the dviInit fail and the VendorID or the DeviceID are
-   not zeroed, then set the failure flag. If it is zeroe, it might mean
-   that the system is in Dual CRT Monitor configuration. */
-
-/* De-skew enabled with default 111b value.
-   This will fix some artifacts problem in some mode on board 2.2.
-   Somehow this fix does not affect board 2.1.
- */
-if ((dviInit(1,  /* Select Rising Edge */
-1,  /* Select 24-bit bus */
-0,  /* Select Single Edge clock */
-1,  /* Enable HSync as is */
-1,  /* Enable VSync as is */
-1,  /* Enable De-skew */
-7,  /* Set the de-skew setting to maximum setup */
-1,  /* Enable continuous Sync */
-1,  /* Enable PLL Filter */
-4   /* Use th

Re: [PATCH v2] staging: sm750fb: use tabs for indentation

2015-06-19 Thread Greg KH
On Fri, Jun 19, 2015 at 10:13:11PM -0700, Juston Li wrote:
> Replace spaces with tabs for indentation to fix the checkpatch.pl warning
> 'WARNING: please, no spaces at the start of a line'
> 
> checkpatch doesn't catch comments indented by spaces but I fixed comments
> adjacent to warnings as well so they would remain aligned.
> 
> Changes since v1:
> fix alignment in ddk750_display.c:154
> didn't remove a space in ddk750_hwi2c.c:48

The version info here should go below the --- line, so it doesn't show
up in the changelog itself.

third time's a charm?
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: sm750fb: Fix C99 Comments

2015-06-19 Thread Amitoj Kaur Chawla
Used C89 instead of C99 Comments and removed C99 comments performing
prints only.
Problem found using checkpatch.pl

ERROR: do not use C99 // comments

Signed-off-by: Amitoj Kaur Chawla 
---
 drivers/staging/sm750fb/ddk750_chip.c | 10 ++
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_chip.c 
b/drivers/staging/sm750fb/ddk750_chip.c
index 3cb860c..1683b3d 100644
--- a/drivers/staging/sm750fb/ddk750_chip.c
+++ b/drivers/staging/sm750fb/ddk750_chip.c
@@ -17,7 +17,7 @@ logical_chip_type_t getChipType(void)
char physicalRev;
logical_chip_type_t chip;
 
-   physicalID = devId750;//either 0x718 or 0x750
+   physicalID = devId750; /* either 0x718 or 0x750 */
physicalRev = revId750;
 
if (physicalID == 0x718)
@@ -257,7 +257,7 @@ int ddk750_initHw(initchip_param_t *pInitParam)
 
unsigned int ulReg;
 #if 0
-   //move the code to map regiter function.
+   /* move the code to map regiter function. */
if (getChipType() == SM718) {
/* turn on big endian bit*/
ulReg = PEEK32(0x74);
@@ -488,7 +488,6 @@ unsigned int calcPllValue(unsigned int request_orig, 
pll_value_t *pll)
}
}
 
-   //printk("Finally:  
pll->n[%lu],m[%lu],od[%lu],pod[%lu]\n",pll->N,pll->M,pll->OD,pll->POD);
return ret;
 }
 
@@ -580,14 +579,9 @@ pll_value_t *pPLL   /* Structure to hold the value 
to be set in PLL */
}
 
 /* Restore input frequency from Khz to hz unit */
-//pPLL->inputFreq *= 1000;
ulRequestClk *= 1000;
pPLL->inputFreq = DEFAULT_INPUT_CLOCK; /* Default reference clock */
 
-/* Output debug information */
-   //DDKDEBUGPRINT((DISPLAY_LEVEL, "calcPllValue: Requested Frequency = 
%d\n", ulRequestClk));
-   //DDKDEBUGPRINT((DISPLAY_LEVEL, "calcPllValue: Input CLK = %dHz, M=%d, 
N=%d, OD=%d, POD=%d\n", pPLL->inputFreq, pPLL->M, pPLL->N, pPLL->OD, 
pPLL->POD));
-
 /* Return actual frequency that the PLL can set */
ret = calcPLL(pPLL);
return ret;
-- 
1.9.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v2] staging: sm750fb: use tabs for indentation

2015-06-19 Thread Juston Li
On Fri, Jun 19, 2015 at 10:21 PM, Greg KH  wrote:
>
> On Fri, Jun 19, 2015 at 10:13:11PM -0700, Juston Li wrote:
> > Replace spaces with tabs for indentation to fix the checkpatch.pl warning
> > 'WARNING: please, no spaces at the start of a line'
> >
> > checkpatch doesn't catch comments indented by spaces but I fixed comments
> > adjacent to warnings as well so they would remain aligned.
> >
> > Changes since v1:
> > fix alignment in ddk750_display.c:154
> > didn't remove a space in ddk750_hwi2c.c:48
>
> The version info here should go below the --- line, so it doesn't show
> up in the changelog itself.
>
> third time's a charm?

Thanks for the tip, resent as v3.

*cross fingers*

Regards
Juston
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH v3] staging: sm750fb: use tabs for indentation

2015-06-19 Thread Juston Li
Replace spaces with tabs for indentation to fix the checkpatch.pl warning
'WARNING: please, no spaces at the start of a line'

checkpatch doesn't catch comments indented by spaces but I fixed comments
adjacent to warnings as well so they would remain aligned.

Signed-off-by: Juston Li 
---
Changes since v2:
move version info out of changelog
Changes since v1:
fix alignment in ddk750_display.c:154
didn't remove a space in ddk750_hwi2c.c:48

 drivers/staging/sm750fb/ddk750_display.c |  96 
 drivers/staging/sm750fb/ddk750_display.h |   2 +-
 drivers/staging/sm750fb/ddk750_dvi.c |  66 ++---
 drivers/staging/sm750fb/ddk750_help.h|   4 +-
 drivers/staging/sm750fb/ddk750_hwi2c.c   | 252 ++-
 drivers/staging/sm750fb/ddk750_mode.c| 142 +--
 drivers/staging/sm750fb/ddk750_mode.h|  46 ++--
 drivers/staging/sm750fb/ddk750_power.c   | 254 ++--
 drivers/staging/sm750fb/ddk750_power.h   |   8 +-
 drivers/staging/sm750fb/ddk750_reg.h |  18 +-
 drivers/staging/sm750fb/ddk750_sii164.c  | 400 +++
 drivers/staging/sm750fb/ddk750_sii164.h  |  29 ++-
 drivers/staging/sm750fb/sm750.h  |  24 +-
 drivers/staging/sm750fb/sm750_accel.c| 364 ++--
 drivers/staging/sm750fb/sm750_accel.h|   4 +-
 drivers/staging/sm750fb/sm750_help.h |  26 +-
 drivers/staging/sm750fb/sm750_hw.c   |  70 +++---
 drivers/staging/sm750fb/sm750_hw.h   |  28 +--
 18 files changed, 906 insertions(+), 927 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_display.c 
b/drivers/staging/sm750fb/ddk750_display.c
index a3e6720..7aa22c1 100644
--- a/drivers/staging/sm750fb/ddk750_display.c
+++ b/drivers/staging/sm750fb/ddk750_display.c
@@ -24,7 +24,7 @@ static void setDisplayControl(int ctrl, int dispState)
/* Timing should be enabled first before enabling the 
plane
 * because changing at the same time does not guarantee 
that
 * the plane will also enabled or disabled.
-*/
+*/
ulDisplayCtrlReg = FIELD_SET(ulDisplayCtrlReg,

PANEL_DISPLAY_CTRL, TIMING, ENABLE);
POKE32(PANEL_DISPLAY_CTRL, ulDisplayCtrlReg);
@@ -145,26 +145,26 @@ static void waitNextVerticalSync(int ctrl, int delay)
return;
}
 
-while (delay-- > 0)
-{
-/* Wait for end of vsync. */
-do
-{
-status = FIELD_GET(PEEK32(SYSTEM_CTRL),
-   SYSTEM_CTRL,
-   PANEL_VSYNC);
-}
-while (status == SYSTEM_CTRL_PANEL_VSYNC_ACTIVE);
-
-/* Wait for start of vsync. */
-do
-{
-status = FIELD_GET(PEEK32(SYSTEM_CTRL),
-   SYSTEM_CTRL,
-   PANEL_VSYNC);
-}
-while (status == SYSTEM_CTRL_PANEL_VSYNC_INACTIVE);
-}
+   while (delay-- > 0)
+   {
+   /* Wait for end of vsync. */
+   do
+   {
+   status = FIELD_GET(PEEK32(SYSTEM_CTRL),
+  SYSTEM_CTRL,
+  PANEL_VSYNC);
+   }
+   while (status == SYSTEM_CTRL_PANEL_VSYNC_ACTIVE);
+
+   /* Wait for start of vsync. */
+   do
+   {
+   status = FIELD_GET(PEEK32(SYSTEM_CTRL),
+  SYSTEM_CTRL,
+  PANEL_VSYNC);
+   }
+   while (status == SYSTEM_CTRL_PANEL_VSYNC_INACTIVE);
+   }
 
}else{
 
@@ -275,33 +275,33 @@ void ddk750_setLogicalDispOut(disp_output_t output)
 
 int ddk750_initDVIDisp(void)
 {
-/* Initialize DVI. If the dviInit fail and the VendorID or the DeviceID are
-   not zeroed, then set the failure flag. If it is zeroe, it might mean
-   that the system is in Dual CRT Monitor configuration. */
-
-/* De-skew enabled with default 111b value.
-   This will fix some artifacts problem in some mode on board 2.2.
-   Somehow this fix does not affect board 2.1.
- */
-if ((dviInit(1,  /* Select Rising Edge */
-1,  /* Select 24-bit bus */
-0,  /* Select Single Edge clock */
-1,  /* Enable HSync as is */
-1,  /* Enable VSync as is */
-1,  /* Enable De-skew */
-7,  /* Set the de-skew setting to maximum setup */
-1,  /* Enable continuous Sync */
-1,  /

Re: [PATCH] Staging: sm750fb: Fix C99 Comments

2015-06-19 Thread Juston Li
On Fri, Jun 19, 2015 at 10:25 PM, Amitoj Kaur Chawla
 wrote:
> Used C89 instead of C99 Comments and removed C99 comments performing
> prints only.
> Problem found using checkpatch.pl
>
> ERROR: do not use C99 // comments
>
> Signed-off-by: Amitoj Kaur Chawla 

These changes have already been added in the staging-next tree included in
commit 'staging: sm750fb: fix c99 comments'

You should base future changes against gregkh staging-testing branch.

Regards
Juston
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel