[PATCH] Checkpatch fix: lines longer than 80 columns

2015-04-26 Thread Guillaume Brogi
This patch fixes lines longer than 80 columns in mac.c.
5 lines longer than 80 columns remain for the sake of readability.

Signed-off-by: Guillaume Brogi 
---
 drivers/staging/vt6655/mac.c | 49 +---
 1 file changed, 32 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/vt6655/mac.c b/drivers/staging/vt6655/mac.c
index 8048b32..aed530f 100644
--- a/drivers/staging/vt6655/mac.c
+++ b/drivers/staging/vt6655/mac.c
@@ -70,7 +70,8 @@
  * Return Value: true if all test bits On; otherwise false
  *
  */
-bool MACbIsRegBitsOn(void __iomem *dwIoBase, unsigned char byRegOfs, unsigned 
char byTestBits)
+bool MACbIsRegBitsOn(void __iomem *dwIoBase, unsigned char byRegOfs,
+unsigned char byTestBits)
 {
unsigned char byData;
 
@@ -93,7 +94,8 @@ bool MACbIsRegBitsOn(void __iomem *dwIoBase, unsigned char 
byRegOfs, unsigned ch
  * Return Value: true if all test bits Off; otherwise false
  *
  */
-bool MACbIsRegBitsOff(void __iomem *dwIoBase, unsigned char byRegOfs, unsigned 
char byTestBits)
+bool MACbIsRegBitsOff(void __iomem *dwIoBase, unsigned char byRegOfs,
+ unsigned char byTestBits)
 {
unsigned char byData;
 
@@ -218,7 +220,8 @@ void MACvSaveContext(void __iomem *dwIoBase, unsigned char 
*pbyCxtBuf)
 
/* read page1 register */
for (ii = 0; ii < MAC_MAX_CONTEXT_SIZE_PAGE1; ii++)
-   VNSvInPortB((dwIoBase + ii), (pbyCxtBuf + 
MAC_MAX_CONTEXT_SIZE_PAGE0 + ii));
+   VNSvInPortB((dwIoBase + ii),
+   (pbyCxtBuf + MAC_MAX_CONTEXT_SIZE_PAGE0 + ii));
 
MACvSelectPage0(dwIoBase);
 }
@@ -244,7 +247,8 @@ void MACvRestoreContext(void __iomem *dwIoBase, unsigned 
char *pbyCxtBuf)
MACvSelectPage1(dwIoBase);
/* restore page1 */
for (ii = 0; ii < MAC_MAX_CONTEXT_SIZE_PAGE1; ii++)
-   VNSvOutPortB((dwIoBase + ii), *(pbyCxtBuf + 
MAC_MAX_CONTEXT_SIZE_PAGE0 + ii));
+   VNSvOutPortB((dwIoBase + ii),
+*(pbyCxtBuf + MAC_MAX_CONTEXT_SIZE_PAGE0 + ii));
 
MACvSelectPage0(dwIoBase);
 
@@ -263,13 +267,18 @@ void MACvRestoreContext(void __iomem *dwIoBase, unsigned 
char *pbyCxtBuf)
VNSvOutPortB(dwIoBase + ii, *(pbyCxtBuf + ii));
 
/* restore CURR_RX_DESC_ADDR, CURR_TX_DESC_ADDR */
-   VNSvOutPortD(dwIoBase + MAC_REG_TXDMAPTR0, *(unsigned long *)(pbyCxtBuf 
+ MAC_REG_TXDMAPTR0));
-   VNSvOutPortD(dwIoBase + MAC_REG_AC0DMAPTR, *(unsigned long *)(pbyCxtBuf 
+ MAC_REG_AC0DMAPTR));
-   VNSvOutPortD(dwIoBase + MAC_REG_BCNDMAPTR, *(unsigned long *)(pbyCxtBuf 
+ MAC_REG_BCNDMAPTR));
-
-   VNSvOutPortD(dwIoBase + MAC_REG_RXDMAPTR0, *(unsigned long *)(pbyCxtBuf 
+ MAC_REG_RXDMAPTR0));
-
-   VNSvOutPortD(dwIoBase + MAC_REG_RXDMAPTR1, *(unsigned long *)(pbyCxtBuf 
+ MAC_REG_RXDMAPTR1));
+   VNSvOutPortD(dwIoBase + MAC_REG_TXDMAPTR0,
+*(unsigned long *)(pbyCxtBuf + MAC_REG_TXDMAPTR0));
+   VNSvOutPortD(dwIoBase + MAC_REG_AC0DMAPTR,
+*(unsigned long *)(pbyCxtBuf + MAC_REG_AC0DMAPTR));
+   VNSvOutPortD(dwIoBase + MAC_REG_BCNDMAPTR,
+*(unsigned long *)(pbyCxtBuf + MAC_REG_BCNDMAPTR));
+
+   VNSvOutPortD(dwIoBase + MAC_REG_RXDMAPTR0,
+*(unsigned long *)(pbyCxtBuf + MAC_REG_RXDMAPTR0));
+
+   VNSvOutPortD(dwIoBase + MAC_REG_RXDMAPTR1,
+*(unsigned long *)(pbyCxtBuf + MAC_REG_RXDMAPTR1));
 }
 
 /*
@@ -641,7 +650,8 @@ void MACvSetCurrRx1DescAddr(void __iomem *dwIoBase, 
unsigned long dwCurrDescAddr
  * Return Value: none
  *
  */
-void MACvSetCurrTx0DescAddrEx(void __iomem *dwIoBase, unsigned long 
dwCurrDescAddr)
+void MACvSetCurrTx0DescAddrEx(void __iomem *dwIoBase,
+ unsigned long dwCurrDescAddr)
 {
unsigned short ww;
unsigned char byData;
@@ -679,7 +689,8 @@ void MACvSetCurrTx0DescAddrEx(void __iomem *dwIoBase, 
unsigned long dwCurrDescAd
  *
  */
 /* TxDMA1 = AC0DMA */
-void MACvSetCurrAC0DescAddrEx(void __iomem *dwIoBase, unsigned long 
dwCurrDescAddr)
+void MACvSetCurrAC0DescAddrEx(void __iomem *dwIoBase,
+ unsigned long dwCurrDescAddr)
 {
unsigned short ww;
unsigned char byData;
@@ -703,7 +714,8 @@ void MACvSetCurrAC0DescAddrEx(void __iomem *dwIoBase, 
unsigned long dwCurrDescAd
VNSvOutPortB(dwIoBase + MAC_REG_AC0DMACTL, DMACTL_RUN);
 }
 
-void MACvSetCurrTXDescAddr(int iTxType, void __iomem *dwIoBase, unsigned long 
dwCurrDescAddr)
+void MACvSetCurrTXDescAddr(int iTxType, void __iomem *dwIoBase,
+  unsigned long dwCurrDescAddr)
 {
if (iTxType == TYPE_AC0DMA)
MACvSetCurrAC0DescAddrEx(dwIoBase, dwCurrDescAddr);
@@ -767,7 +779,8 @@ void MACvOneShotTimer1MicroSec(void __iomem *dwIoBase, 
unsigned int uDelayTime)
VNSvOutPortB(dwIoBase + MAC_REG_TMCTL1, (TMCTL_TMD | TMCTL_TE));
 }
 
-voi

[PATCH] Staging: comedi: ni_stc.h: Fixed missing blank lines after declarations

2015-04-26 Thread Nicolae-Alexandru Ivan
Signed-off-by: Nicolae-Alexandru Ivan 
---
 drivers/staging/comedi/drivers/ni_stc.h | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/staging/comedi/drivers/ni_stc.h 
b/drivers/staging/comedi/drivers/ni_stc.h
index bd69c3f..75926c1 100644
--- a/drivers/staging/comedi/drivers/ni_stc.h
+++ b/drivers/staging/comedi/drivers/ni_stc.h
@@ -326,6 +326,7 @@ static inline unsigned RTSI_Output_Bit(unsigned channel, 
int is_mseries)
 {
unsigned max_channel;
unsigned base_bit_shift;
+
if (is_mseries) {
base_bit_shift = 8;
max_channel = 7;
@@ -1142,6 +1143,7 @@ static inline unsigned MSeries_AI_Config_Bank_Bits(enum 
ni_reg_type reg_type,
   unsigned channel)
 {
unsigned bits = channel & 0x30;
+
if (reg_type == ni_reg_622x) {
if (channel & 0x40)
bits |= 0x400;
@@ -1191,6 +1193,7 @@ enum MSeries_PLL_Control_Bits {
 static inline unsigned MSeries_PLL_Divisor_Bits(unsigned divisor)
 {
static const unsigned max_divisor = 0x10;
+
if (divisor < 1 || divisor > max_divisor) {
pr_err("%s: bug, invalid divisor=%i\n", __func__, divisor);
return 0;
@@ -1201,6 +1204,7 @@ static inline unsigned MSeries_PLL_Divisor_Bits(unsigned 
divisor)
 static inline unsigned MSeries_PLL_Multiplier_Bits(unsigned multiplier)
 {
static const unsigned max_multiplier = 0x100;
+
if (multiplier < 1 || multiplier > max_multiplier) {
pr_err("%s: bug, invalid multiplier=%i\n", __func__,
   multiplier);
-- 
1.9.1

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


Re: 答复: [PATCH] staging: sm750:Fixthe Makefile option error

2015-04-26 Thread 陈华才
Hi, Sudip and Teddy,

I have found the root cause of Logo problem:
1, enable hw_accel, staging driver cannot show logo.
2, disable hw_accel, staging driver can show logo.
3, both enable/disable hw_accel, my driver (1.0.8) can show logo.
Deep in code: 
In staging driver, drivers/staging/sm750fb/sm750.c, lynxfb_ops_imageblit(), if 
image->depth != 1, it returns and do nothing. 
In my driver (1.0.8), if image->depth != 1, it fallback to cfb_imageblit().

I will send a patch to fix this.

Huacai
 
-- Original --
From:  "Sudip Mukherjee";
Date:  Fri, Apr 24, 2015 04:25 PM
To:  "陈华才"; 
Cc:  "Teddy Wang 王力强"; "Binbin 
Zhou"; "Greg Kroah-Hartman"; 
"devel"; "Fuxin Zhang"; 
Subject:  Re:  答复: [PATCH] staging: sm750:Fixthe Makefile option error

 
On Fri, Apr 24, 2015 at 03:33:58PM +0800, 陈华才 wrote:
> Hi, Sudip,
> 
> Upstream driver still can't show logo, we are debugging.

Hi Huacai,
I checked with the upstream driver only.
I checked with next-20150423 and it showed me the penguin logo on upper
left hand corner of my screen when CONFIG_FB_SM750=y.
only extra thing was that your patch of the Makefile was applied.
maybe you can consider gifting me one your notepads so that I can
also see the problem :)

regards
sudip

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


[PATCH] staging: sm750: Fix lynxfb_ops_imageblit() if image->depth != 1

2015-04-26 Thread Huacai Chen
If image->depth != 1, lynxfb_ops_imageblit() should fallback to call
cfb_imageblit(), not return directly. Otherwise it can't display the
boot logo.

Cc: Teddy Wang 
Cc: Sudip Mukherjee 
Signed-off-by: Huacai Chen 
---
 drivers/staging/sm750fb/sm750.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
index 3c7ea95..fab8dce 100644
--- a/drivers/staging/sm750fb/sm750.c
+++ b/drivers/staging/sm750fb/sm750.c
@@ -279,7 +279,9 @@ static void lynxfb_ops_imageblit(struct fb_info *info,
}
goto _do_work;
}
+   cfb_imageblit(info,image);
return;
+
 _do_work:
/*
 * If not use spin_lock, system will die if user load driver
-- 
1.7.7.3


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