[PATCH] Staging: bcm: CmHost: remove temp bracing from switch/cases.

2014-03-20 Thread Gary Rookard
Remove the temp bracing afixed to case labels.

Properly indent switch/case breaks.

Signed-off-by: Gary Alan Rookard 

---
On branch staging-next
 drivers/staging/bcm/CmHost.c | 50 +++-
 1 file changed, 7 insertions(+), 43 deletions(-)

diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
index 632f81a..4564c63 100644
--- a/drivers/staging/bcm/CmHost.c
+++ b/drivers/staging/bcm/CmHost.c
@@ -460,42 +460,30 @@ static VOID CopyToAdapter(register struct 
bcm_mini_adapter *Adapter, /* u8CSSpecification);
switch (psfLocalSet->u8CSSpecification) {
case eCSPacketIPV4:
-   {
Adapter->PackInfo[uiSearchRuleIndex].bIPCSSupport = IPV4_CS;
break;
-   }
case eCSPacketIPV6:
-   {
Adapter->PackInfo[uiSearchRuleIndex].bIPCSSupport = IPV6_CS;
break;
-   }
case eCS802_3PacketEthernet:
case eCS802_1QPacketVLAN:
-   {
Adapter->PackInfo[uiSearchRuleIndex].bEthCSSupport = 
ETH_CS_802_3;
break;
-   }
case eCSPacketIPV4Over802_1QVLAN:
case eCSPacketIPV4Over802_3Ethernet:
-   {
Adapter->PackInfo[uiSearchRuleIndex].bIPCSSupport = IPV4_CS;
Adapter->PackInfo[uiSearchRuleIndex].bEthCSSupport = 
ETH_CS_802_3;
break;
-   }
case eCSPacketIPV6Over802_1QVLAN:
case eCSPacketIPV6Over802_3Ethernet:
-   {
Adapter->PackInfo[uiSearchRuleIndex].bIPCSSupport = IPV6_CS;
Adapter->PackInfo[uiSearchRuleIndex].bEthCSSupport = 
ETH_CS_802_3;
break;
-   }
default:
-   {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, 
DBG_LVL_ALL, "Error in value of CS Classification.. setting default to IP 
CS\n");
Adapter->PackInfo[uiSearchRuleIndex].bIPCSSupport = IPV4_CS;
break;
}
-   }
 
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, 
"CopyToAdapter : Queue No : %X ETH CS Support :  %X  , IP CS Support : %X\n",
uiSearchRuleIndex,
@@ -542,32 +530,23 @@ static VOID CopyToAdapter(register struct 
bcm_mini_adapter *Adapter, /* u8ClassfierDSCAction) {
case 0: /* DSC Add Classifier */
-   {
eClassifierAction = eAddClassifier;
-   }
-   break;
+   break;
case 1: /* DSC Replace Classifier */
-   {
eClassifierAction = eReplaceClassifier;
-   }
-   break;
+   break;
case 2: /* DSC Delete Classifier */
-   {
eClassifierAction = eDeleteClassifier;
-   }
-   break;
+   break;
default:
-   {
eClassifierAction = eInvalidClassifierAction;
}
-   }
}
 
u16PacketClassificationRuleIndex = 
ntohs(psfCSType->cCPacketClassificationRule.u16PacketClassificationRuleIndex);
 
switch (eClassifierAction) {
case eAddClassifier:
-   {
/* Get a Free Classifier Index From Classifier table 
for this SF to add the Classifier */
/* Contained in this message */
nClassifierIndex = SearchClsid(Adapter, ulSFID, 
u16PacketClassificationRuleIndex);
@@ -587,10 +566,8 @@ static VOID CopyToAdapter(register struct bcm_mini_adapter 
*Adapter, /* u8PhsDSCAction) {
case eDeleteAllPHSRules:
-   {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, 
DBG_LVL_ALL, "Deleting All PHS Rules For VCID: 0x%X\n", uVCID);
 
/* Delete All the PHS rules for this Service flow */
PhsDeleteSFRules(&Adapter->stBCMPhsContext, uVCID);
break;
-   }
case eDeletePHSRule:
-   {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, 
DBG_LVL_ALL, "PHS DSC Action = Delete PHS Rule\n");
 
if (psfCSType->cPhsRule.u8PHSI)
PhsDeletePHSRule(&Adapter->stBCMPhsContext, 
uVCID, psfCSType->cCPacketClassificationRule.u8AssociatedPHSI);
 
break;
-   }
default:
-   {
if (ucDsxType == DSC_ACK) {
/* BCM_DEBUG_PRINT(CONN_MSG,("Invalid PHS DSC 
Action For DSC\n",psfCSType->cPhsRule.u8PHSI)); */
break; /*

Re: [PATCH] Staging: bcm: DDRInit: moved #defines from DDRInit.c to DDRInit.h

2014-03-19 Thread Gary Rookard



On Thu, 20 Mar 2014, Greg KH wrote:


On Wed, Mar 19, 2014 at 10:29:42PM -0400, Gary Rookard wrote:



On Thu, 20 Mar 2014, Greg KH wrote:


On Wed, Mar 19, 2014 at 05:30:53PM -0400, Gary Rookard wrote:

I moved the #defines from implementation file DDRInit.c to
the proper specification file DDRInit.h.

Signed-off-by: Gary Alan Rookard 

---
On branch staging-next
 drivers/staging/bcm/DDRInit.c | 15 ---
 drivers/staging/bcm/DDRInit.h | 15 +++
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index f1d7cb8..60d300f 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -2,11 +2,8 @@



-#define DDR_DUMP_INTERNAL_DEVICE_MEMORY 0xBFC02B00
-#define MIPS_CLOCK_REG 0x0f000820

 /* DDR INIT-133Mhz */
-#define T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 12  /* index for 0x0F007000 */
 static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = {  /* DPLL Clock 
Setting */


It seems to make mroe sense here, why put it in a .c file if it's only
being referenced in one place?


+#define DDR_DUMP_INTERNAL_DEVICE_MEMORY 0xBFC02B00
+#define MIPS_CLOCK_REG 0x0f000820

+#define T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 12  /* index for 0x0F007000 */
+#define T3_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 10  /* index for 0x0F007000 */
+#define T3_SKIP_CLOCK_PROGRAM_DUMP_100MHZ 13  /* index for 0x0F007000 */
+#define T3B_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 11  /* index for 0x0F007000 */
+#define T3B_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 9  /* index for 0x0F007000 */
+#define T3B_SKIP_CLOCK_PROGRAM_DUMP_100MHZ 9  /* index for 0x0F007000 */
+#define T3LP_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 9  /* index for 0x0F007000 */
+#define T3LP_SKIP_CLOCK_PROGRAM_DUMP_100MHZ 11  /* index for 0x0F007000 */
+#define T3LP_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 9  /* index for 0x0F007000 */
+#define T3LPB_SKIP_CLOCK_PROGRAM_DUMP_160MHZ 7  /* index for 0x0F007000 */
+#define T3LPB_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 7  /* index for 0x0F007000 */
+#define T3LPB_SKIP_CLOCK_PROGRAM_DUMP_100MHZ 8  /* index for 0x0F007000 */
+#define T3LPB_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 7  /* index for 0x0F007000 */


That's not very "pretty", if you do this, it should at least align up
properly.

thanks,

greg k-h



--
Well, for reasons of uncluttering the code by putting
things where they belong, it's a best practice. (only the lazy
don't in my estimation.)
DDRInt.h already exists its not a new file creation.

Gots to keep them seprate :)


No, drivers don't need .h files, you should never have a .h file that is
only used by one .c file, that's pretty pointless in the kernel, just
mush it all together...

greg k-h


--
Agreed, either that sliped fact my mind or ...

My points still valid in user space ( I'm tyring to
migrate from slowly) I've worked on projects so over
run with pre-processor crap it's become instinctive.
Still  lazy to blame.

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


Re: [PATCH] Staging: bcm: DDRInit: moved #defines from DDRInit.c to DDRInit.h

2014-03-19 Thread Gary Rookard



On Thu, 20 Mar 2014, Greg KH wrote:


On Wed, Mar 19, 2014 at 05:30:53PM -0400, Gary Rookard wrote:

I moved the #defines from implementation file DDRInit.c to
the proper specification file DDRInit.h.

Signed-off-by: Gary Alan Rookard 

---
On branch staging-next
 drivers/staging/bcm/DDRInit.c | 15 ---
 drivers/staging/bcm/DDRInit.h | 15 +++
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index f1d7cb8..60d300f 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -2,11 +2,8 @@



-#define DDR_DUMP_INTERNAL_DEVICE_MEMORY 0xBFC02B00
-#define MIPS_CLOCK_REG 0x0f000820

 /* DDR INIT-133Mhz */
-#define T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 12  /* index for 0x0F007000 */
 static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = {  /* DPLL Clock 
Setting */


It seems to make mroe sense here, why put it in a .c file if it's only
being referenced in one place?


+#define DDR_DUMP_INTERNAL_DEVICE_MEMORY 0xBFC02B00
+#define MIPS_CLOCK_REG 0x0f000820

+#define T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 12  /* index for 0x0F007000 */
+#define T3_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 10  /* index for 0x0F007000 */
+#define T3_SKIP_CLOCK_PROGRAM_DUMP_100MHZ 13  /* index for 0x0F007000 */
+#define T3B_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 11  /* index for 0x0F007000 */
+#define T3B_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 9  /* index for 0x0F007000 */
+#define T3B_SKIP_CLOCK_PROGRAM_DUMP_100MHZ 9  /* index for 0x0F007000 */
+#define T3LP_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 9  /* index for 0x0F007000 */
+#define T3LP_SKIP_CLOCK_PROGRAM_DUMP_100MHZ 11  /* index for 0x0F007000 */
+#define T3LP_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 9  /* index for 0x0F007000 */
+#define T3LPB_SKIP_CLOCK_PROGRAM_DUMP_160MHZ 7  /* index for 0x0F007000 */
+#define T3LPB_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 7  /* index for 0x0F007000 */
+#define T3LPB_SKIP_CLOCK_PROGRAM_DUMP_100MHZ 8  /* index for 0x0F007000 */
+#define T3LPB_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 7  /* index for 0x0F007000 */


That's not very "pretty", if you do this, it should at least align up
properly.

thanks,

greg k-h



--
Well, for reasons of uncluttering the code by putting
things where they belong, it's a best practice. (only the lazy
don't in my estimation.) 
DDRInt.h already exists its not a new file creation.


Gots to keep them seprate :)

Will make them kissable.

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


[PATCH] Staging: bcm: DDRInit: moved #defines from DDRInit.c to DDRInit.h

2014-03-19 Thread Gary Rookard
I moved the #defines from implementation file DDRInit.c to
the proper specification file DDRInit.h.

Signed-off-by: Gary Alan Rookard 

---
On branch staging-next
 drivers/staging/bcm/DDRInit.c | 15 ---
 drivers/staging/bcm/DDRInit.h | 15 +++
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index f1d7cb8..60d300f 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -2,11 +2,8 @@
 
 
 
-#define DDR_DUMP_INTERNAL_DEVICE_MEMORY 0xBFC02B00
-#define MIPS_CLOCK_REG 0x0f000820
 
 /* DDR INIT-133Mhz */
-#define T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 12  /* index for 0x0F007000 */
 static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = {  /* DPLL Clock 
Setting */
{0x0F000800, 0x7212},
{0x0f000820, 0x07F13FFF},
@@ -64,7 +61,6 @@ static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = {  /* 
DPLL Clock Setting
{0x0F007018, 0x0101}
 };
 /* 80Mhz */
-#define T3_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 10  /* index for 0x0F007000 */
 static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = {  /* DPLL Clock 
Setting */
{0x0f000810, 0x0F95},
{0x0f000820, 0x07f1},
@@ -116,7 +112,6 @@ static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = {  
/* DPLL Clock Setting
{0x0F007018, 0x0101}
 };
 /* 100Mhz */
-#define T3_SKIP_CLOCK_PROGRAM_DUMP_100MHZ 13  /* index for 0x0F007000 */
 static struct bcm_ddr_setting asT3_DDRSetting100MHz[] = {  /* DPLL Clock 
Setting */
{0x0F000800, 0x7008},
{0x0f000810, 0x0F95},
@@ -188,7 +183,6 @@ static struct bcm_ddr_setting asDPLL_266MHZ[] = {
{0x0f000870, 0x0002}
 };
 
-#define T3B_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 11  /* index for 0x0F007000 */
 static struct bcm_ddr_setting asT3B_DDRSetting133MHz[] = {  /* DPLL Clock 
Setting */
{0x0f000810, 0x0F95},
{0x0f000810, 0x0F95},
@@ -246,7 +240,6 @@ static struct bcm_ddr_setting asT3B_DDRSetting133MHz[] = {  
/* DPLL Clock Settin
{0x0F007018, 0x0101},
};
 
-#define T3B_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 9  /* index for 0x0F007000 */
 static struct bcm_ddr_setting asT3B_DDRSetting80MHz[] = {  /* DPLL Clock 
Setting */
{0x0f000810, 0x0F95},
{0x0f000820, 0x07F13FFF},
@@ -300,7 +293,6 @@ static struct bcm_ddr_setting asT3B_DDRSetting80MHz[] = {  
/* DPLL Clock Setting
 };
 
 /* 100Mhz */
-#define T3B_SKIP_CLOCK_PROGRAM_DUMP_100MHZ 9  /* index for 0x0F007000 */
 static struct bcm_ddr_setting asT3B_DDRSetting100MHz[] = {  /* DPLL Clock 
Setting */
{0x0f000810, 0x0F95},
{0x0f000820, 0x07F1369B},
@@ -355,7 +347,6 @@ static struct bcm_ddr_setting asT3B_DDRSetting100MHz[] = {  
/* DPLL Clock Settin
 };
 
 
-#define T3LP_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 9  /* index for 0x0F007000 */
 static struct bcm_ddr_setting asT3LP_DDRSetting133MHz[] = {  /* DPLL Clock 
Setting */
{0x0f000820, 0x03F1365B},
{0x0f000810, 0x2F95},
@@ -415,7 +406,6 @@ static struct bcm_ddr_setting asT3LP_DDRSetting133MHz[] = { 
 /* DPLL Clock Setti
{0x0F007018, 0x0101}
 };
 
-#define T3LP_SKIP_CLOCK_PROGRAM_DUMP_100MHZ 11  /* index for 0x0F007000 */
 static struct bcm_ddr_setting asT3LP_DDRSetting100MHz[] = {  /* DPLL Clock 
Setting */
{0x0f000810, 0x2F95},
{0x0f000820, 0x03F1369B},
@@ -475,7 +465,6 @@ static struct bcm_ddr_setting asT3LP_DDRSetting100MHz[] = { 
 /* DPLL Clock Setti
{0x0F007018, 0x0101}
 };
 
-#define T3LP_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 9  /* index for 0x0F007000 */
 static struct bcm_ddr_setting asT3LP_DDRSetting80MHz[] = {  /* DPLL Clock 
Setting */
{0x0f000820, 0x07F13FFF},
{0x0f000810, 0x2F95},
@@ -535,7 +524,6 @@ static struct bcm_ddr_setting asT3LP_DDRSetting80MHz[] = {  
/* DPLL Clock Settin
 
 /* T3 LP-B (UMA-B) */
 
-#define T3LPB_SKIP_CLOCK_PROGRAM_DUMP_160MHZ 7  /* index for 0x0F007000 */
 static struct bcm_ddr_setting asT3LPB_DDRSetting160MHz[] = {  /* DPLL Clock 
Setting */
{0x0f000820, 0x03F137DB},
{0x0f000810, 0x01842795},
@@ -592,7 +580,6 @@ static struct bcm_ddr_setting asT3LPB_DDRSetting160MHz[] = 
{  /* DPLL Clock Sett
 };
 
 
-#define T3LPB_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 7  /* index for 0x0F007000 */
 static struct bcm_ddr_setting asT3LPB_DDRSetting133MHz[] = {  /* DPLL Clock 
Setting */
{0x0f000820, 0x03F1365B},
{0x0f000810, 0x2F95},
@@ -653,7 +640,6 @@ static struct bcm_ddr_setting asT3LPB_DDRSetting133MHz[] = 
{  /* DPLL Clock Sett
{0x0F007018, 0x0101}
 };
 
-#define T3LPB_SKIP_CLOCK_PROGRAM_DUMP_100MHZ 8  /* index for 0x0F007000 */
 static struct bcm_ddr_setting asT3LPB_DDRSetting100MHz[] = {  /* DPLL Clock 
Setting */
{0x0f000810, 0x2F95},
{0x0f000820, 0x03F1369B},
@@ -714,7 +700,6 @@ static struct bcm_ddr_setting asT3LPB_DDRSetting100MHz[] = 
{  /* DPLL Clock Sett
{0x0F007018, 0x0101}
 };
 
-#define T3LP

Re: [PATCH] Staging: bcm: CmHost: moved and removed declarations and tmp bracing.

2014-03-18 Thread Gary Rookard



On Tue, 18 Mar 2014, Greg KH wrote:


On Mon, Mar 17, 2014 at 08:21:34PM -0400, Gary Rookard wrote:

Firstly, some background is needed to confirm the validity of
this patch as error fixing. It seems the developer when writing
this driver from scratch, used what are known to me as error
suppressors in the form of extra tmp bracing added to the case labels.
They aid during construction time, but are not intended to remain.

In this scenario there are declarations occupying space only
reserved for statements. If these tmp braces were to be removed
before the declarations in question were reassigned to there
proper place in the funtion, compile time errors would result.

So, having that said, I moved the declarations,
UINT uiSearchRuleIndex = 0; and ULONG ulSFID;,
and also deleted the duplicates thereof from
the switch/case statement.

Removed temporary bracing from case labels.

Removed new lines as needed.

Properly indented case breaks.

Signed-off-by: Gary Rookard 

---
On branch staging-next
 drivers/staging/bcm/CmHost.c | 38 --
 1 file changed, 8 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
index cc82588..8d46b38 100644
--- a/drivers/staging/bcm/CmHost.c
+++ b/drivers/staging/bcm/CmHost.c
@@ -1635,7 +1635,8 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* 

For the 3rd (or is it 4th?) time, please put a new line after the
variable definition and before the comment.



--
Yes, I'm a little dyslexic.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: bcm: CmHost: moved and removed declarations and tmp bracing.

2014-03-18 Thread Gary Rookard
Firstly, some background is needed to confirm the validity of
this patch as error fixing. It seems the developer when writing
this driver from scratch, used what are known to me as error
suppressors in the form of extra tmp bracing added to the case labels.
They aid during construction time, but are not intended to remain.

In this scenario there are declarations occupying space only
reserved for statements. If these tmp braces were to be removed
before the declarations in question were reassigned to there
proper place in the funtion, compile time errors would result.

So, having that said, I moved the declarations,
UINT uiSearchRuleIndex = 0; and ULONG ulSFID;,
and also deleted the duplicates thereof from
the switch/case statement.

Removed temporary bracing from case labels.

Removed new lines as needed.

Properly indented case breaks.

Added /* FALLTHROUGH */ comments to switch/case.

Signed-off-by: Gary Rookard 

---
 drivers/staging/bcm/CmHost.c | 39 ++-
 1 file changed, 10 insertions(+), 29 deletions(-)

diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
index cc82588..632f81a 100644
--- a/drivers/staging/bcm/CmHost.c
+++ b/drivers/staging/bcm/CmHost.c
@@ -1635,6 +1635,8 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* u16TID);
switch (pstAddIndication->u8Type) {
case DSA_REQ:
-   {
pLeader->PLength = sizeof(struct bcm_add_indication_alt);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, 
DBG_LVL_ALL, "Sending DSA Response\n");
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, 
DBG_LVL_ALL, "SENDING DSA RESPONSE TO MAC %d", pLeader->PLength);
@@ -1669,22 +1670,16 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* u16VCID));
CopyBufferToControlPacket(Adapter, 
(PVOID)Adapter->caDsxReqResp);
kfree(pstAddIndication);
-   }
-   break;
+   break;
case DSA_RSP:
-   {
pLeader->PLength = sizeof(struct bcm_add_indication_alt);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, 
DBG_LVL_ALL, "SENDING DSA ACK TO MAC %d",
pLeader->PLength);
*((struct bcm_add_indication_alt 
*)&(Adapter->caDsxReqResp[LEADER_SIZE]))
= *pstAddIndication;
((struct bcm_add_indication_alt 
*)&(Adapter->caDsxReqResp[LEADER_SIZE]))->u8Type = DSA_ACK;
-
-   } /* no break here..we should go down. */
+   /* FALLTHROUGH */
case DSA_ACK:
-   {
-   UINT uiSearchRuleIndex = 0;
-
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, 
DBG_LVL_ALL, "VCID:0x%X",
ntohs(pstAddIndication->u16VCID));
uiSearchRuleIndex = SearchFreeSfid(Adapter);
@@ -1767,10 +1762,8 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* PLength = sizeof(struct bcm_change_indication);
pstChangeIndication = (struct bcm_change_indication 
*)pstAddIndication;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, 
DBG_LVL_ALL, "SENDING DSC RESPONSE TO MAC %d", pLeader->PLength);
@@ -1780,20 +1773,15 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* caDsxReqResp);
kfree(pstAddIndication);
-   }
-   break;
+   break;
case DSC_RSP:
-   {
pLeader->PLength = sizeof(struct bcm_change_indication);
pstChangeIndication = (struct bcm_change_indication 
*)pstAddIndication;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, 
DBG_LVL_ALL, "SENDING DSC ACK TO MAC %d", pLeader->PLength);
*((struct bcm_change_indication 
*)&(Adapter->caDsxReqResp[LEADER_SIZE])) = *pstChangeIndication;
((struct bcm_change_indication 
*)&(Adapter->caDsxReqResp[LEADER_SIZE]))->u8Type = DSC_ACK;
-   }
+   /* FALLTHROUGH */
case DSC_ACK:
-   {
-   UINT uiSearchRuleIndex = 0;
-
pstChangeIndication = (struct bcm_change_indication 
*)pstAddIndication;
uiSearchRuleIndex = SearchSfid(Adapter, 
ntohl(pstChangeIndication->sfActiveSet.u32SFID));
if (uiSearchRuleIndex > NO_OF_QUEUES-1)
@@ -1847,13 +1835,8 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* PLength = sizeof(struct bcm_del_indication);
*((struct bcm_del_indication 
*)&(Adapter->caDsxReqResp[LEADER_SIZE])) = *((struct bcm_del_indication 
*)pstAddIndication);
 
@@ -1870,12 +1853,10 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* caDsxReqResp[LEADER_SIZE]))->u8Type = DSD_RSP;
CopyBufferToControlPacket(Adapte

[PATCH] Staging: bcm: CmHost: moved and removed declarations and tmp bracing.

2014-03-17 Thread Gary Rookard
Firstly, some background is needed to confirm the validity of
this patch as error fixing. It seems the developer when writing
this driver from scratch, used what are known to me as error
suppressors in the form of extra tmp bracing added to the case labels.
They aid during construction time, but are not intended to remain.

In this scenario there are declarations occupying space only
reserved for statements. If these tmp braces were to be removed
before the declarations in question were reassigned to there
proper place in the funtion, compile time errors would result.

So, having that said, I moved the declarations,
UINT uiSearchRuleIndex = 0; and ULONG ulSFID;,
and also deleted the duplicates thereof from
the switch/case statement.

Removed temporary bracing from case labels.

Removed new lines as needed.

Properly indented case breaks.

Signed-off-by: Gary Rookard 

---
On branch staging-next
 drivers/staging/bcm/CmHost.c | 38 --
 1 file changed, 8 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
index cc82588..8d46b38 100644
--- a/drivers/staging/bcm/CmHost.c
+++ b/drivers/staging/bcm/CmHost.c
@@ -1635,7 +1635,8 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* u16TID);
switch (pstAddIndication->u8Type) {
case DSA_REQ:
-   {
pLeader->PLength = sizeof(struct bcm_add_indication_alt);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, 
DBG_LVL_ALL, "Sending DSA Response\n");
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, 
DBG_LVL_ALL, "SENDING DSA RESPONSE TO MAC %d", pLeader->PLength);
@@ -1669,22 +1669,16 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* u16VCID));
CopyBufferToControlPacket(Adapter, 
(PVOID)Adapter->caDsxReqResp);
kfree(pstAddIndication);
-   }
-   break;
+   break;
case DSA_RSP:
-   {
pLeader->PLength = sizeof(struct bcm_add_indication_alt);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, 
DBG_LVL_ALL, "SENDING DSA ACK TO MAC %d",
pLeader->PLength);
*((struct bcm_add_indication_alt 
*)&(Adapter->caDsxReqResp[LEADER_SIZE]))
= *pstAddIndication;
((struct bcm_add_indication_alt 
*)&(Adapter->caDsxReqResp[LEADER_SIZE]))->u8Type = DSA_ACK;
-
-   } /* no break here..we should go down. */
+   /* no break here..we should go down. */
case DSA_ACK:
-   {
-   UINT uiSearchRuleIndex = 0;
-
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, 
DBG_LVL_ALL, "VCID:0x%X",
ntohs(pstAddIndication->u16VCID));
uiSearchRuleIndex = SearchFreeSfid(Adapter);
@@ -1767,10 +1761,8 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* PLength = sizeof(struct bcm_change_indication);
pstChangeIndication = (struct bcm_change_indication 
*)pstAddIndication;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, 
DBG_LVL_ALL, "SENDING DSC RESPONSE TO MAC %d", pLeader->PLength);
@@ -1780,20 +1772,14 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* caDsxReqResp);
kfree(pstAddIndication);
-   }
-   break;
+   break;
case DSC_RSP:
-   {
pLeader->PLength = sizeof(struct bcm_change_indication);
pstChangeIndication = (struct bcm_change_indication 
*)pstAddIndication;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, 
DBG_LVL_ALL, "SENDING DSC ACK TO MAC %d", pLeader->PLength);
*((struct bcm_change_indication 
*)&(Adapter->caDsxReqResp[LEADER_SIZE])) = *pstChangeIndication;
((struct bcm_change_indication 
*)&(Adapter->caDsxReqResp[LEADER_SIZE]))->u8Type = DSC_ACK;
-   }
case DSC_ACK:
-   {
-   UINT uiSearchRuleIndex = 0;
-
pstChangeIndication = (struct bcm_change_indication 
*)pstAddIndication;
uiSearchRuleIndex = SearchSfid(Adapter, 
ntohl(pstChangeIndication->sfActiveSet.u32SFID));
if (uiSearchRuleIndex > NO_OF_QUEUES-1)
@@ -1847,13 +1833,8 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* PLength = sizeof(struct bcm_del_indication);
*((struct bcm_del_indication 
*)&(Adapter->caDsxReqResp[LEADER_SIZE])) = *((struct bcm_del_indication 
*)pstAddIndication);
 
@@ -1870,12 +1851,9 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* caDsxReqResp[LEADER_SIZE]))->u8Type = DSD_RSP;
CopyBufferToControlPacket(Adapter, 
(PVOID)Adapter->caDsxReqResp);
-   

Re: [PATCH] Staging: bcm: CmHost: moved and removed declarations and tmp bracing.

2014-03-17 Thread Gary Rookard



On Mon, 17 Mar 2014, Greg KH wrote:


On Mon, Mar 17, 2014 at 06:01:24PM -0400, Gary Rookard wrote:

Firstly, some background is needed to confirm the validity of
this patch as error fixing. It seems the developer when writing
this driver from scratch, used what are known to me as error
suppressors in the form of extra tmp bracing added to the case labels.
They aid during construction time, but are not intended to remain.

In this scenario there are declarations occupying space only
reserved for statements. If these tmp braces were to be removed
before the declarations in question were reassigned to there
proper place in the funtion, compile time errors would result.

So, having that said, I moved the declarations,
UINT uiSearchRuleIndex = 0; and ULONG ulSFID;,
and also deleted the duplicates thereof from
the switch/case statement.

Removed temporary bracing from case labels.

Removed new lines as needed.

Signed-off-by: Gary Rookard 

---
On branch staging-next
 drivers/staging/bcm/CmHost.c | 27 +++
 1 file changed, 3 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
index cc82588..b3002d7 100644
--- a/drivers/staging/bcm/CmHost.c
+++ b/drivers/staging/bcm/CmHost.c
@@ -1635,7 +1635,8 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* 

You forgot to add a line after the variable and before the comment here
:(


 * Otherwise the message contains a target address from where we need to
 * read out the rest of the service flow param structure
@@ -1658,7 +1659,6 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* u16TID);
switch (pstAddIndication->u8Type) {
case DSA_REQ:
-   {
pLeader->PLength = sizeof(struct bcm_add_indication_alt);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, 
"Sending DSA Response\n");
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, 
"SENDING DSA RESPONSE TO MAC %d", pLeader->PLength);
@@ -1669,10 +1669,8 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* u16VCID));
CopyBufferToControlPacket(Adapter, 
(PVOID)Adapter->caDsxReqResp);
kfree(pstAddIndication);
-   }
break;


Can you properly indent the break; lines as well?

thanks,

greg k-h


--
Most certainly.


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


[PATCH] Staging: bcm: CmHost: moved and removed declarations and tmp bracing.

2014-03-17 Thread Gary Rookard
Firstly, some background is needed to confirm the validity of
this patch as error fixing. It seems the developer when writing
this driver from scratch, used what are known to me as error 
suppressors in the form of extra tmp bracing added to the case labels.
They aid during construction time, but are not intended to remain.

In this scenario there are declarations occupying space only
reserved for statements. If these tmp braces were to be removed
before the declarations in question were reassigned to there
proper place in the funtion, compile time errors would result.

So, having that said, I moved the declarations,
UINT uiSearchRuleIndex = 0; and ULONG ulSFID;,
and also deleted the duplicates thereof from 
the switch/case statement.

Removed temporary bracing from case labels.

Removed new lines as needed.

Signed-off-by: Gary Rookard 

---
On branch staging-next
 drivers/staging/bcm/CmHost.c | 27 +++
 1 file changed, 3 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
index cc82588..b3002d7 100644
--- a/drivers/staging/bcm/CmHost.c
+++ b/drivers/staging/bcm/CmHost.c
@@ -1635,7 +1635,8 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* u16TID);
switch (pstAddIndication->u8Type) {
case DSA_REQ:
-   {
pLeader->PLength = sizeof(struct bcm_add_indication_alt);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, 
DBG_LVL_ALL, "Sending DSA Response\n");
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, 
DBG_LVL_ALL, "SENDING DSA RESPONSE TO MAC %d", pLeader->PLength);
@@ -1669,10 +1669,8 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* u16VCID));
CopyBufferToControlPacket(Adapter, 
(PVOID)Adapter->caDsxReqResp);
kfree(pstAddIndication);
-   }
break;
case DSA_RSP:
-   {
pLeader->PLength = sizeof(struct bcm_add_indication_alt);
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, 
DBG_LVL_ALL, "SENDING DSA ACK TO MAC %d",
pLeader->PLength);
@@ -1680,11 +1678,8 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* caDsxReqResp[LEADER_SIZE]))->u8Type = DSA_ACK;
 
-   } /* no break here..we should go down. */
+   /* no break here..we should go down. */
case DSA_ACK:
-   {
-   UINT uiSearchRuleIndex = 0;
-
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, 
DBG_LVL_ALL, "VCID:0x%X",
ntohs(pstAddIndication->u16VCID));
uiSearchRuleIndex = SearchFreeSfid(Adapter);
@@ -1767,10 +1762,8 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* PLength = sizeof(struct bcm_change_indication);
pstChangeIndication = (struct bcm_change_indication 
*)pstAddIndication;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, 
DBG_LVL_ALL, "SENDING DSC RESPONSE TO MAC %d", pLeader->PLength);
@@ -1780,20 +1773,14 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* caDsxReqResp);
kfree(pstAddIndication);
-   }
break;
case DSC_RSP:
-   {
pLeader->PLength = sizeof(struct bcm_change_indication);
pstChangeIndication = (struct bcm_change_indication 
*)pstAddIndication;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, 
DBG_LVL_ALL, "SENDING DSC ACK TO MAC %d", pLeader->PLength);
*((struct bcm_change_indication 
*)&(Adapter->caDsxReqResp[LEADER_SIZE])) = *pstChangeIndication;
((struct bcm_change_indication 
*)&(Adapter->caDsxReqResp[LEADER_SIZE]))->u8Type = DSC_ACK;
-   }
case DSC_ACK:
-   {
-   UINT uiSearchRuleIndex = 0;
-
pstChangeIndication = (struct bcm_change_indication 
*)pstAddIndication;
uiSearchRuleIndex = SearchSfid(Adapter, 
ntohl(pstChangeIndication->sfActiveSet.u32SFID));
if (uiSearchRuleIndex > NO_OF_QUEUES-1)
@@ -1847,13 +1834,8 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* PLength = sizeof(struct bcm_del_indication);
*((struct bcm_del_indication 
*)&(Adapter->caDsxReqResp[LEADER_SIZE])) = *((struct bcm_del_indication 
*)pstAddIndication);
 
@@ -1870,11 +1852,8 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* caDsxReqResp[LEADER_SIZE]))->u8Type = DSD_RSP;
CopyBufferToControlPacket(Adapter, 
(PVOID)Adapter->caDsxReqResp);
-   }
case DSD_RSP:
-   {
/* Do nothing as SF has already got Deleted */
-   }
break;
case DSD_ACK:
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG,

Re: [PATCH 3/3] Staging: lustre: fld: moved EXPORT_SYMBOL() for a fix.

2014-03-17 Thread Gary Rookard



On Mon, 17 Mar 2014, Greg KH wrote:


On Thu, Mar 13, 2014 at 08:58:09PM -0400, Gary Rookard wrote:

I moved EXPORT_SYMBOL(fld_client_proc_fini); for a EXPORT_SYMBOL
should be immediately below its function warning fix.

Signed-off-by: Gary Alan Rookard 

---
Correct patch, first two breaks build.


Patch 3/3?  Where are the previous 2?

And if I didn't apply the first 2, why would I need this one?

Please resend whatever patch you wish to have applied, I've flushed all
of your pending ones from my queue.

totally confused,

greg k-h


--
The problem stems from me doing my normal work alongside what
I'm trying to do here, sorry.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: bcm:CmHost: removed extra parenthesis.

2014-03-17 Thread Gary Rookard



On Mon, 17 Mar 2014, Greg KH wrote:


On Sun, Mar 16, 2014 at 03:59:53PM -0400, Gary Rookard wrote:

I removed some useless extra parenthesis.

Signed-off-by: Gary Alan Rookard 

---
On branch staging-next
 drivers/staging/bcm/CmHost.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
index 9252ef1..41cb3de 100644
--- a/drivers/staging/bcm/CmHost.c
+++ b/drivers/staging/bcm/CmHost.c
@@ -1689,7 +1689,7 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* u8Direction);
-   if ((uiSearchRuleIndex < NO_OF_QUEUES)) {
+   if (uiSearchRuleIndex < NO_OF_QUEUES) {
Adapter->PackInfo[uiSearchRuleIndex].ucDirection =
pstAddIndication->u8Direction;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, DBG_LVL_ALL, 
"bValid:0x%X ",
@@ -1796,7 +1796,7 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /*  NO_OF_QUEUES-1)
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "SF doesn't 
exist for which DSC_ACK is received");

-   if ((uiSearchRuleIndex < NO_OF_QUEUES)) {
+   if (uiSearchRuleIndex < NO_OF_QUEUES) {
Adapter->PackInfo[uiSearchRuleIndex].ucDirection = 
pstChangeIndication->u8Direction;
if (pstChangeIndication->sfActiveSet.bValid == TRUE)
Adapter->PackInfo[uiSearchRuleIndex].bActiveSet 
= TRUE;


This change was done by someone else before you, sorry :(



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


Re: [PATCH] Staging: bcm: CmHost: moved and removed declarations in switch/case.

2014-03-17 Thread Gary Rookard



On Mon, 17 Mar 2014, Greg KH wrote:


On Sun, Mar 16, 2014 at 01:09:49AM -0400, Gary Rookard wrote:

I moved the declarations UINT uiSearchRuleIndex = 0; and ULONG ulSFID;
from out of a switch/case statement. And also, removed useless duplicate
UINT uiSearchRuleIndex = 0; and a variant UINT uiSearchRuleIndex;.

Signed-off-by: Gary Alan Rookard 

---
On branch staging-next
 drivers/staging/bcm/CmHost.c | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
index cc91b5e..2d1f94d 100644
--- a/drivers/staging/bcm/CmHost.c
+++ b/drivers/staging/bcm/CmHost.c
@@ -1637,7 +1637,8 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* 

No newline before the comment?


 * Otherwise the message contains a target address from where we need to
 * read out the rest of the service flow param structure
@@ -1685,7 +1686,6 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* 

You could now drop the { } and the newline, right?


Yes, redoing it now to include. Should be there shortly.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: bcm: CmHost: added breaks and /* FALLTHROUGH */ to switch/case.

2014-03-17 Thread Gary Rookard



On Mon, 17 Mar 2014, Greg KH wrote:


On Sun, Mar 16, 2014 at 03:31:18PM -0400, Gary Rookard wrote:

I added a couple of breaks, and a /* FALLTHROUGH */ comment to switch/case
assuming that is the actual desired effect needed by the case label.

Signed-off-by: Gary Alan Rookard 

---
On branch staging-next
 drivers/staging/bcm/CmHost.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
index 4cb59d7..9252ef1 100644
--- a/drivers/staging/bcm/CmHost.c
+++ b/drivers/staging/bcm/CmHost.c
@@ -1678,8 +1678,7 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* caDsxReqResp[LEADER_SIZE]))
= *pstAddIndication;
((struct bcm_add_indication_alt 
*)&(Adapter->caDsxReqResp[LEADER_SIZE]))->u8Type = DSA_ACK;
-
-   } /* no break here..we should go down. */
+   }   /* FALLTHROUGH */
case DSA_ACK:
{

@@ -1787,6 +1786,7 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* PLength);
*((struct bcm_change_indication 
*)&(Adapter->caDsxReqResp[LEADER_SIZE])) = *pstChangeIndication;
((struct bcm_change_indication 
*)&(Adapter->caDsxReqResp[LEADER_SIZE]))->u8Type = DSC_ACK;
+   break;
}
case DSC_ACK:
{
@@ -1865,6 +1865,7 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* caDsxReqResp[LEADER_SIZE]))->u8Type = DSD_RSP;
CopyBufferToControlPacket(Adapter, 
(PVOID)Adapter->caDsxReqResp);
+   break;


Are you _sure_ these two changes are ok?  Do you have a device to test?
If not, I can't really take this patch as it does change the logic
involved here :(

thanks,

greg k-h


--
No device, based on assumption, and code study. Possible logic
change maybe but not likely. Your decision either way is fine
with me.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: bcm: CmHost: moved and removed declarations

2014-03-17 Thread Gary Rookard
Firstly, some background is needed to confirm the validity of
this patch as error fixing. It seems the developer when writing
this driver from scratch, used what are known to me as error 
suppressors in the form of extra tmp bracing added to the case labels.
They aid during construction time, but are not intended to remain.

In this scenario there are declarations occupying space only
reserved for statements. If these tmp braces were to be removed
before the declarations in question were reassigned to there
proper place in the funtion, compile time errors would result.

So, having that said, I moved the declarations,
UINT uiSearchRuleIndex = 0; and ULONG ulSFID;,
and also deleted the duplicates thereof from 
the switch/case statement.

Signed-off-by: Gary Alan Rookard 

---
On branch staging-next
 drivers/staging/bcm/CmHost.c | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
index cc91b5e..2d1f94d 100644
--- a/drivers/staging/bcm/CmHost.c
+++ b/drivers/staging/bcm/CmHost.c
@@ -1637,7 +1637,8 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* u16VCID));
@@ -1794,7 +1794,6 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* sfActiveSet.u32SFID));
@@ -1853,8 +1852,6 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* PLength = sizeof(struct bcm_del_indication);
*((struct bcm_del_indication 
*)&(Adapter->caDsxReqResp[LEADER_SIZE])) = *((struct bcm_del_indication 
*)pstAddIndication);
-- 
1.9.0

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


Re: [PATCH] Staging: bcm: CmHost: unline split quoted strings.

2014-03-17 Thread Gary Rookard



On Mon, 17 Mar 2014, Mark Einon wrote:


On Sun, Mar 16, 2014 at 10:16:09PM -0400, Gary Rookard wrote:



On Sun, 16 Mar 2014, Gary Rookard wrote:




On Sun, 16 Mar 2014, Mark Einon wrote:


On Sun, Mar 16, 2014 at 02:19:51PM -0400, Gary Rookard wrote:

I unline split some quoted strings.


Hi,

Why? What issue does it fix?


--
Hi,

It fixes a checkpatch error/warning "quoted string split across
lines" or something phrased very simular. Is there
a problem with.


--
Hi again,

Well firstly I do know that there is a trade off going on with the patch
that way, but for me, the general rule of thumb is that not sometimes
but most of the time you want your strings avalable for grep. And with
them split across lines it is hard -> impossible to accomplish. Thus
line length becomes meaningless or should I say not quit as bad as
it sounds. If you look they are sill shorter then alot of the code
in that
region of the file.
--


Hi Gary,

Ok. Fixing the split line issue is good - there's no problems with what you're
trying to do there.

However:

* The commit message should explain both what you're doing, and why you're
doing it - this makes reviewing the patch and referencing in future far easier.
For a checkpatch fix, you would normally expect checkpatch to be mentioned and
the issues that are being addressed - cut and pasting the checkpatch output
would work in this case, as it's not too verbose.
(Also applies to your other patch).

* You've fixed one checkpatch issue, but introduced another - meaning that
* another patch is probably needed. Why not make the code more readable while
* you're at it?

Cheers,

Mark


--
Hi,

Agreed, my commit messages are sorely lacking in
appropriate content. Will fix these up, and in the
future try to be more mindful about.

Thanks,
Gary












Signed-off-by: Gary Alan Rookard 

---
On branch staging-next
drivers/staging/bcm/CmHost.c | 12 
1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
index 2d1f94d..4cb59d7 100644
--- a/drivers/staging/bcm/CmHost.c
+++ b/drivers/staging/bcm/CmHost.c
@@ -975,8 +975,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer)

psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddressLength);

BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL,
-   DBG_LVL_ALL, "u8EthernetSourceMACAddress[6]: "
-   "%pM", psfCSType->cCPacketClassificationRule.
+   DBG_LVL_ALL, "u8EthernetSourceMACAddress[6]: 
%pM",
psfCSType->cCPacketClassificationRule.
u8EthernetSourceMACAddress);


You've also gone way over the 80 char limit for the line, for no
real reason.
if anything, I would consider making
psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress
more readable.
Similarly for the changes below.

Cheers,

Mark



BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL,
DBG_LVL_ALL, "u8EthertypeLength: 0x%02X ",
@@ -1092,8 +1091,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer)

psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRangeLength);

BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL,
-   DBG_LVL_ALL, "u8ProtocolSourcePortRange[4]: "
-   "0x%*ph ", 4, psfCSType->
+   DBG_LVL_ALL, "u8ProtocolSourcePortRange[4]: 0x%*ph 
", 4,
psfCSType->
cCPacketClassificationRule.
u8ProtocolSourcePortRange);

@@ -1101,8 +1099,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer)

psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRangeLength);

BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL,
-   DBG_LVL_ALL, "u8ProtocolDestPortRange[4]: "
-   "0x%*ph ", 4, psfCSType->
+   DBG_LVL_ALL, "u8ProtocolDestPortRange[4]: 0x%*ph 
", 4,
psfCSType->
cCPacketClassificationRule.
u8ProtocolDestPortRange);

@@ -1118,8 +1115,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer)

psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddressLength);

BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL,
-   DBG_LVL_ALL, "u8EthernetSourceMACAddress[6]: "
-   "%pM", psfCSType->cCPacketClassifi

Re: [PATCH] Staging: bcm: CmHost: unline split quoted strings.

2014-03-16 Thread Gary Rookard



On Sun, 16 Mar 2014, Gary Rookard wrote:




On Sun, 16 Mar 2014, Mark Einon wrote:


On Sun, Mar 16, 2014 at 02:19:51PM -0400, Gary Rookard wrote:

I unline split some quoted strings.


Hi,

Why? What issue does it fix?


--
Hi,

It fixes a checkpatch error/warning "quoted string split across lines" or 
something phrased very simular. Is there

a problem with.


--
Hi again,

Well firstly I do know that there is a trade off going on with the patch
that way, but for me, the general rule of thumb is that not sometimes
but most of the time you want your strings avalable for grep. And with
them split across lines it is hard -> impossible to accomplish. Thus
line length becomes meaningless or should I say not quit as bad as it 
sounds. If you look they are sill shorter then alot of the code in that

region of the file.
--



Signed-off-by: Gary Alan Rookard 

---
On branch staging-next
 drivers/staging/bcm/CmHost.c | 12 
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
index 2d1f94d..4cb59d7 100644
--- a/drivers/staging/bcm/CmHost.c
+++ b/drivers/staging/bcm/CmHost.c
@@ -975,8 +975,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer)

psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddressLength);

BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL,
-DBG_LVL_ALL, "u8EthernetSourceMACAddress[6]: 
"

-   "%pM", psfCSType->cCPacketClassificationRule.
+DBG_LVL_ALL, "u8EthernetSourceMACAddress[6]: 
%pM", psfCSType->cCPacketClassificationRule.

u8EthernetSourceMACAddress);


You've also gone way over the 80 char limit for the line, for no real 
reason.

if anything, I would consider making
psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress more 
readable.

Similarly for the changes below.

Cheers,

Mark



 		BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, 
DBG_LVL_ALL, "u8EthertypeLength: 0x%02X ",

@@ -1092,8 +1091,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer)

psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRangeLength);

BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL,
-   DBG_LVL_ALL, "u8ProtocolSourcePortRange[4]: "
-   "0x%*ph ", 4, psfCSType->
+DBG_LVL_ALL, "u8ProtocolSourcePortRange[4]: 
0x%*ph ", 4, psfCSType->

cCPacketClassificationRule.
u8ProtocolSourcePortRange);

@@ -1101,8 +1099,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer)

psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRangeLength);

BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL,
-   DBG_LVL_ALL, "u8ProtocolDestPortRange[4]: "
-   "0x%*ph ", 4, psfCSType->
+DBG_LVL_ALL, "u8ProtocolDestPortRange[4]: 
0x%*ph ", 4, psfCSType->

cCPacketClassificationRule.
u8ProtocolDestPortRange);

@@ -1118,8 +1115,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer)

psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddressLength);

BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL,
-DBG_LVL_ALL, "u8EthernetSourceMACAddress[6]: 
"

-   "%pM", psfCSType->cCPacketClassificationRule.
+DBG_LVL_ALL, "u8EthernetSourceMACAddress[6]: 
%pM", psfCSType->cCPacketClassificationRule.

u8EthernetSourceMACAddress);

 		BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, 
DBG_LVL_ALL, "u8EthertypeLength: 0x%02X ", 
psfCSType->cCPacketClassificationRule.u8EthertypeLength);

--
1.9.0

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





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


Re: [PATCH] Staging: bcm: CmHost: unline split quoted strings.

2014-03-16 Thread Gary Rookard



On Sun, 16 Mar 2014, Mark Einon wrote:


On Sun, Mar 16, 2014 at 02:19:51PM -0400, Gary Rookard wrote:

I unline split some quoted strings.


Hi,

Why? What issue does it fix?


--
Hi,

It fixes a checkpatch error/warning "quoted string split 
across lines" or something phrased very simular. Is there

a problem with.



Signed-off-by: Gary Alan Rookard 

---
On branch staging-next
 drivers/staging/bcm/CmHost.c | 12 
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
index 2d1f94d..4cb59d7 100644
--- a/drivers/staging/bcm/CmHost.c
+++ b/drivers/staging/bcm/CmHost.c
@@ -975,8 +975,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer)

psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddressLength);

BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL,
-   DBG_LVL_ALL, "u8EthernetSourceMACAddress[6]: "
-   "%pM", psfCSType->cCPacketClassificationRule.
+   DBG_LVL_ALL, "u8EthernetSourceMACAddress[6]: %pM", 
psfCSType->cCPacketClassificationRule.
u8EthernetSourceMACAddress);


You've also gone way over the 80 char limit for the line, for no real reason.
if anything, I would consider making
psfCSType->cCPacketClassificationRule.u8EthernetSourceMACAddress more readable.
Similarly for the changes below.

Cheers,

Mark



BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, 
"u8EthertypeLength: 0x%02X ",
@@ -1092,8 +1091,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer)

psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRangeLength);

BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL,
-   DBG_LVL_ALL, "u8ProtocolSourcePortRange[4]: "
-   "0x%*ph ", 4, psfCSType->
+   DBG_LVL_ALL, "u8ProtocolSourcePortRange[4]: 0x%*ph 
", 4, psfCSType->
cCPacketClassificationRule.
u8ProtocolSourcePortRange);

@@ -1101,8 +1099,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer)

psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRangeLength);

BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL,
-   DBG_LVL_ALL, "u8ProtocolDestPortRange[4]: "
-   "0x%*ph ", 4, psfCSType->
+   DBG_LVL_ALL, "u8ProtocolDestPortRange[4]: 0x%*ph 
", 4, psfCSType->
cCPacketClassificationRule.
u8ProtocolDestPortRange);

@@ -1118,8 +1115,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer)

psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddressLength);

BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL,
-   DBG_LVL_ALL, "u8EthernetSourceMACAddress[6]: "
-   "%pM", psfCSType->cCPacketClassificationRule.
+   DBG_LVL_ALL, "u8EthernetSourceMACAddress[6]: %pM", 
psfCSType->cCPacketClassificationRule.
u8EthernetSourceMACAddress);

BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, DBG_LVL_ALL, 
"u8EthertypeLength: 0x%02X ", 
psfCSType->cCPacketClassificationRule.u8EthertypeLength);
--
1.9.0

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



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


Re: [PATCH] Staging: bcm: CmHost: moved and removed declarations in switch/case.

2014-03-16 Thread Gary Rookard

Hi Mark,

Yes, in fact it does if not for the shear fact that a declaration is
not a statement. This file as well as the rest of bcm is in working draft
state a real wart hog so to speak, and contained w/in it are 
developer tricks to mask over would be compiler errors that would crop
up during the construction of. In this scenario the bracing added to the 
case lables (witch I also plan to remove) are masking over that very fact,
that it is illegal to put a declaration where only a statement can be put, 
so...


Thanks,
-Gary Rookard

On Sun, 16 Mar 2014, Mark Einon wrote:


On Sun, Mar 16, 2014 at 01:09:49AM -0400, Gary Rookard wrote:

I moved the declarations UINT uiSearchRuleIndex = 0; and ULONG ulSFID;
from out of a switch/case statement. And also, removed useless duplicate
UINT uiSearchRuleIndex = 0; and a variant UINT uiSearchRuleIndex;.


Hi,

This looks like code churn - does it fix anything?

It's also on the rx path for the device, I'm not familiar with the device
details but it could be called with high frequency - so only initialising these
variables on the paths where they are used would be a good thing.

Cheers,

Mark



Signed-off-by: Gary Alan Rookard 

---
On branch staging-next
 drivers/staging/bcm/CmHost.c | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
index cc91b5e..2d1f94d 100644
--- a/drivers/staging/bcm/CmHost.c
+++ b/drivers/staging/bcm/CmHost.c
@@ -1637,7 +1637,8 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* u16VCID));
@@ -1794,7 +1794,6 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* sfActiveSet.u32SFID));
@@ -1853,8 +1852,6 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* PLength = sizeof(struct bcm_del_indication);
*((struct bcm_del_indication 
*)&(Adapter->caDsxReqResp[LEADER_SIZE])) = *((struct bcm_del_indication 
*)pstAddIndication);
--
1.9.0

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



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


[PATCH] Staging: bcm: CmHost: removed extra parenthesis.

2014-03-16 Thread Gary Rookard
I removed some useless extra parenthesis.

Signed-off-by: Gary Alan Rookard 

---
On branch staging-next
 drivers/staging/bcm/CmHost.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
index 9252ef1..41cb3de 100644
--- a/drivers/staging/bcm/CmHost.c
+++ b/drivers/staging/bcm/CmHost.c
@@ -1689,7 +1689,7 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* u8Direction);
-   if ((uiSearchRuleIndex < NO_OF_QUEUES)) {
+   if (uiSearchRuleIndex < NO_OF_QUEUES) {
Adapter->PackInfo[uiSearchRuleIndex].ucDirection =
pstAddIndication->u8Direction;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, 
DBG_LVL_ALL, "bValid:0x%X ",
@@ -1796,7 +1796,7 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /*  NO_OF_QUEUES-1)
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "SF 
doesn't exist for which DSC_ACK is received");
 
-   if ((uiSearchRuleIndex < NO_OF_QUEUES)) {
+   if (uiSearchRuleIndex < NO_OF_QUEUES) {
Adapter->PackInfo[uiSearchRuleIndex].ucDirection = 
pstChangeIndication->u8Direction;
if (pstChangeIndication->sfActiveSet.bValid == TRUE)
Adapter->PackInfo[uiSearchRuleIndex].bActiveSet 
= TRUE;
-- 
1.9.0

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


[PATCH] Staging: bcm:CmHost: removed extra parenthesis.

2014-03-16 Thread Gary Rookard
I removed some useless extra parenthesis.

Signed-off-by: Gary Alan Rookard 

---
On branch staging-next
 drivers/staging/bcm/CmHost.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
index 9252ef1..41cb3de 100644
--- a/drivers/staging/bcm/CmHost.c
+++ b/drivers/staging/bcm/CmHost.c
@@ -1689,7 +1689,7 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* u8Direction);
-   if ((uiSearchRuleIndex < NO_OF_QUEUES)) {
+   if (uiSearchRuleIndex < NO_OF_QUEUES) {
Adapter->PackInfo[uiSearchRuleIndex].ucDirection =
pstAddIndication->u8Direction;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, CONN_MSG, 
DBG_LVL_ALL, "bValid:0x%X ",
@@ -1796,7 +1796,7 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /*  NO_OF_QUEUES-1)
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "SF 
doesn't exist for which DSC_ACK is received");
 
-   if ((uiSearchRuleIndex < NO_OF_QUEUES)) {
+   if (uiSearchRuleIndex < NO_OF_QUEUES) {
Adapter->PackInfo[uiSearchRuleIndex].ucDirection = 
pstChangeIndication->u8Direction;
if (pstChangeIndication->sfActiveSet.bValid == TRUE)
Adapter->PackInfo[uiSearchRuleIndex].bActiveSet 
= TRUE;
-- 
1.9.0

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


[PATCH] Staging: bcm: CmHost: added breaks and /* FALLTHROUGH */ to switch/case.

2014-03-16 Thread Gary Rookard
I added a couple of breaks, and a /* FALLTHROUGH */ comment to switch/case
assuming that is the actual desired effect needed by the case label.

Signed-off-by: Gary Alan Rookard 

---
On branch staging-next
 drivers/staging/bcm/CmHost.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
index 4cb59d7..9252ef1 100644
--- a/drivers/staging/bcm/CmHost.c
+++ b/drivers/staging/bcm/CmHost.c
@@ -1678,8 +1678,7 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* caDsxReqResp[LEADER_SIZE]))
= *pstAddIndication;
((struct bcm_add_indication_alt 
*)&(Adapter->caDsxReqResp[LEADER_SIZE]))->u8Type = DSA_ACK;
-
-   } /* no break here..we should go down. */
+   }   /* FALLTHROUGH */
case DSA_ACK:
{
 
@@ -1787,6 +1786,7 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* PLength);
*((struct bcm_change_indication 
*)&(Adapter->caDsxReqResp[LEADER_SIZE])) = *pstChangeIndication;
((struct bcm_change_indication 
*)&(Adapter->caDsxReqResp[LEADER_SIZE]))->u8Type = DSC_ACK;
+   break;
}
case DSC_ACK:
{
@@ -1865,6 +1865,7 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* caDsxReqResp[LEADER_SIZE]))->u8Type = DSD_RSP;
CopyBufferToControlPacket(Adapter, 
(PVOID)Adapter->caDsxReqResp);
+   break;
}
case DSD_RSP:
{
-- 
1.9.0

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


[PATCH] Staging: bcm: CmHost: unline split quoted strings.

2014-03-16 Thread Gary Rookard
I unline split some quoted strings.

Signed-off-by: Gary Alan Rookard 

---
On branch staging-next
 drivers/staging/bcm/CmHost.c | 12 
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
index 2d1f94d..4cb59d7 100644
--- a/drivers/staging/bcm/CmHost.c
+++ b/drivers/staging/bcm/CmHost.c
@@ -975,8 +975,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer)

psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddressLength);
 
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL,
-   DBG_LVL_ALL, "u8EthernetSourceMACAddress[6]: "
-   "%pM", psfCSType->cCPacketClassificationRule.
+   DBG_LVL_ALL, "u8EthernetSourceMACAddress[6]: 
%pM", psfCSType->cCPacketClassificationRule.
u8EthernetSourceMACAddress);
 
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, 
DBG_LVL_ALL, "u8EthertypeLength: 0x%02X ",
@@ -1092,8 +1091,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer)

psfCSType->cCPacketClassificationRule.u8ProtocolSourcePortRangeLength);
 
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL,
-   DBG_LVL_ALL, "u8ProtocolSourcePortRange[4]: "
-   "0x%*ph ", 4, psfCSType->
+   DBG_LVL_ALL, "u8ProtocolSourcePortRange[4]: 
0x%*ph ", 4, psfCSType->
cCPacketClassificationRule.
u8ProtocolSourcePortRange);
 
@@ -1101,8 +1099,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer)

psfCSType->cCPacketClassificationRule.u8ProtocolDestPortRangeLength);
 
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL,
-   DBG_LVL_ALL, "u8ProtocolDestPortRange[4]: "
-   "0x%*ph ", 4, psfCSType->
+   DBG_LVL_ALL, "u8ProtocolDestPortRange[4]: 
0x%*ph ", 4, psfCSType->
cCPacketClassificationRule.
u8ProtocolDestPortRange);
 
@@ -1118,8 +1115,7 @@ static VOID DumpCmControlPacket(PVOID pvBuffer)

psfCSType->cCPacketClassificationRule.u8EthernetDestMacAddressLength);
 
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL,
-   DBG_LVL_ALL, "u8EthernetSourceMACAddress[6]: "
-   "%pM", psfCSType->cCPacketClassificationRule.
+   DBG_LVL_ALL, "u8EthernetSourceMACAddress[6]: 
%pM", psfCSType->cCPacketClassificationRule.
u8EthernetSourceMACAddress);
 
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_CONTROL, 
DBG_LVL_ALL, "u8EthertypeLength: 0x%02X ", 
psfCSType->cCPacketClassificationRule.u8EthertypeLength);
-- 
1.9.0

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


[PATCH] Staging: bcm: CmHost: moved and removed declarations in switch/case.

2014-03-15 Thread Gary Rookard
I moved the declarations UINT uiSearchRuleIndex = 0; and ULONG ulSFID; 
from out of a switch/case statement. And also, removed useless duplicate
UINT uiSearchRuleIndex = 0; and a variant UINT uiSearchRuleIndex;. 

Signed-off-by: Gary Alan Rookard 

---
On branch staging-next
 drivers/staging/bcm/CmHost.c | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/bcm/CmHost.c b/drivers/staging/bcm/CmHost.c
index cc91b5e..2d1f94d 100644
--- a/drivers/staging/bcm/CmHost.c
+++ b/drivers/staging/bcm/CmHost.c
@@ -1637,7 +1637,8 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* u16VCID));
@@ -1794,7 +1794,6 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* sfActiveSet.u32SFID));
@@ -1853,8 +1852,6 @@ bool CmControlResponseMessage(struct bcm_mini_adapter 
*Adapter,  /* PLength = sizeof(struct bcm_del_indication);
*((struct bcm_del_indication 
*)&(Adapter->caDsxReqResp[LEADER_SIZE])) = *((struct bcm_del_indication 
*)pstAddIndication);
-- 
1.9.0

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


Re: git not pulling origin staging-next cleanly.

2014-03-15 Thread Gary Rookard



On Sat, 15 Mar 2014, Greg KH wrote:


On Sat, Mar 15, 2014 at 02:13:45AM -0400, Gary Rookard wrote:



On Sat, 15 Mar 2014, Greg KH wrote:


On Fri, Mar 14, 2014 at 09:51:30PM -0400, Gary Rookard wrote:



On Sat, 15 Mar 2014, Greg KH wrote:


On Wed, Mar 12, 2014 at 04:10:36PM -0400, Gary Rookard wrote:

Hi,
Could this problem be local machine (git-1.9.0-1) or dare I say it,
a tmp server-side melt-down of sorts?
I've tried everything nothing seams to work.


What have you typed, exactly, and what has git responded with?


--
Ok, this is it from the very top, the commands are same as every other
time I've done it.

[gary@arch-tuxx Kernel-Hacks]$ git clone 
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Cloning into 'staging'...
remote: Counting objects: 3449057, done.
remote: Compressing objects: 100% (519453/519453), done.
remote: Total 3449057 (delta 2903733), reused 3445005 (delta 2900373)
Receiving objects: 100% (3449057/3449057), 722.83 MiB | 3.36 MiB/s, done.
Resolving deltas: 100% (2903733/2903733), done.
Checking connectivity... done.
Checking out files: 100% (45941/45941), done.
[gary@arch-tuxx Kernel-Hacks]$ cd staging
[gary@arch-tuxx staging]$ git status
On branch master
Your branch is up-to-date with 'origin/master'.

nothing to commit, working directory clean
[gary@arch-tuxx staging]$ git pull origin staging-next


Why would you want to do that?

You really want to merge staging-next on top of master?  Why?

That's not how to just check out a single branch.

And yes, I know there's a conflict between that branch and Linus's tree
at the moment, I'll fix it up next week, well before it goes to Linus...

thanks,

greg k-h


--
Well Ok, I'm going back to git fetch -> git checkout staging-next
Honestly I didn't think it would make much difference from my veiw.


You are asking for two different things, pull will merge the branch you
are asking for into the branch/tree you are currently on.

fetch and then checkout is just switching to that branch, no merge
happening.

greg k-h


--
Thanks, for straightening me out on that.
-Gary Rookard
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: git not pulling origin staging-next cleanly.

2014-03-14 Thread Gary Rookard



On Sat, 15 Mar 2014, Greg KH wrote:


On Fri, Mar 14, 2014 at 09:51:30PM -0400, Gary Rookard wrote:



On Sat, 15 Mar 2014, Greg KH wrote:


On Wed, Mar 12, 2014 at 04:10:36PM -0400, Gary Rookard wrote:

Hi,
Could this problem be local machine (git-1.9.0-1) or dare I say it,
a tmp server-side melt-down of sorts?
I've tried everything nothing seams to work.


What have you typed, exactly, and what has git responded with?


--
Ok, this is it from the very top, the commands are same as every other
time I've done it.

[gary@arch-tuxx Kernel-Hacks]$ git clone 
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Cloning into 'staging'...
remote: Counting objects: 3449057, done.
remote: Compressing objects: 100% (519453/519453), done.
remote: Total 3449057 (delta 2903733), reused 3445005 (delta 2900373)
Receiving objects: 100% (3449057/3449057), 722.83 MiB | 3.36 MiB/s, done.
Resolving deltas: 100% (2903733/2903733), done.
Checking connectivity... done.
Checking out files: 100% (45941/45941), done.
[gary@arch-tuxx Kernel-Hacks]$ cd staging
[gary@arch-tuxx staging]$ git status
On branch master
Your branch is up-to-date with 'origin/master'.

nothing to commit, working directory clean
[gary@arch-tuxx staging]$ git pull origin staging-next


Why would you want to do that?

You really want to merge staging-next on top of master?  Why?

That's not how to just check out a single branch.

And yes, I know there's a conflict between that branch and Linus's tree
at the moment, I'll fix it up next week, well before it goes to Linus...

thanks,

greg k-h


--
Well Ok, I'm going back to git fetch -> git checkout staging-next
Honestly I didn't think it would make much difference from my veiw.

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


Re: git not pulling origin staging-next cleanly.

2014-03-14 Thread Gary Rookard



On Sat, 15 Mar 2014, Greg KH wrote:


On Wed, Mar 12, 2014 at 04:10:36PM -0400, Gary Rookard wrote:

Hi,
Could this problem be local machine (git-1.9.0-1) or dare I say it,
a tmp server-side melt-down of sorts?
I've tried everything nothing seams to work.


What have you typed, exactly, and what has git responded with?


--
Ok, this is it from the very top, the commands are same as every other
time I've done it.

[gary@arch-tuxx Kernel-Hacks]$ git clone 
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Cloning into 'staging'...
remote: Counting objects: 3449057, done.
remote: Compressing objects: 100% (519453/519453), done.
remote: Total 3449057 (delta 2903733), reused 3445005 (delta 2900373)
Receiving objects: 100% (3449057/3449057), 722.83 MiB | 3.36 MiB/s, done.
Resolving deltas: 100% (2903733/2903733), done.
Checking connectivity... done.
Checking out files: 100% (45941/45941), done.
[gary@arch-tuxx Kernel-Hacks]$ cd staging
[gary@arch-tuxx staging]$ git status
On branch master
Your branch is up-to-date with 'origin/master'.

nothing to commit, working directory clean
[gary@arch-tuxx staging]$ git pull origin staging-next

From git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

 * branchstaging-next -> FETCH_HEAD
Removing drivers/staging/sm7xxfb/sm7xxfb.c
Removing drivers/staging/sm7xxfb/sm7xx.h
Removing drivers/staging/sm7xxfb/TODO
Removing drivers/staging/sm7xxfb/Makefile
Removing drivers/staging/sm7xxfb/Kconfig
Removing drivers/staging/sb105x/sb_ser_core.h
Removing drivers/staging/sb105x/sb_pci_mp.h
Removing drivers/staging/sb105x/sb_pci_mp.c
Removing drivers/staging/sb105x/sb_mp_register.h
Removing drivers/staging/sb105x/Makefile
Removing drivers/staging/sb105x/Kconfig
Removing drivers/staging/rtl8192u/r819xU_HTType.h
Removing drivers/staging/rtl8192u/r819xU_HTGen.h
Removing drivers/staging/rtl8192u/ieee80211/scatterwalk.h
Removing drivers/staging/rtl8192u/ieee80211/scatterwalk.c
Removing drivers/staging/rtl8192u/ieee80211/rtl_crypto.h
Removing drivers/staging/rtl8192u/ieee80211/proc.c
Removing drivers/staging/rtl8192u/ieee80211/michael_mic.c
Removing drivers/staging/rtl8192u/ieee80211/internal.h
Removing drivers/staging/rtl8192u/ieee80211/digest.c
Removing drivers/staging/rtl8192u/ieee80211/crypto_compat.h
Removing drivers/staging/rtl8192u/ieee80211/compress.c
Removing drivers/staging/rtl8192u/ieee80211/cipher.c
Removing drivers/staging/rtl8192u/ieee80211/autoload.c
Removing drivers/staging/rtl8192u/ieee80211/arc4.c
Removing drivers/staging/rtl8192u/ieee80211/aes.c
Removing drivers/staging/rtl8192u/ieee80211/EndianFree.h
Removing drivers/staging/rtl8188eu/include/nic_spec.h
Removing drivers/staging/rtl8188eu/include/ip.h
Removing drivers/staging/rtl8188eu/include/ioctl_cfg80211.h
Removing drivers/staging/rtl8188eu/include/if_ether.h
Removing drivers/staging/rtl8188eu/include/h2clbk.h
Removing drivers/staging/rtl8188eu/include/ethernet.h
Removing drivers/staging/rtl8188eu/hal/odm_interface.c
Removing drivers/staging/imx-drm/imx-fbdev.c
Removing drivers/staging/imx-drm/imx-fb.c
Removing drivers/staging/echo/TODO
Removing drivers/staging/dgap/downld.c
Removing drivers/staging/dgap/digi.h
Removing drivers/staging/dgap/dgap_types.h
Removing drivers/staging/dgap/dgap_tty.h
Removing drivers/staging/dgap/dgap_tty.c
Removing drivers/staging/dgap/dgap_trace.h
Removing drivers/staging/dgap/dgap_trace.c
Removing drivers/staging/dgap/dgap_sysfs.h
Removing drivers/staging/dgap/dgap_sysfs.c
Removing drivers/staging/dgap/dgap_pci.h
Removing drivers/staging/dgap/dgap_parse.h
Removing drivers/staging/dgap/dgap_parse.c
Removing drivers/staging/dgap/dgap_kcompat.h
Removing drivers/staging/dgap/dgap_fep5.h
Removing drivers/staging/dgap/dgap_fep5.c
Removing drivers/staging/dgap/dgap_driver.h
Removing drivers/staging/dgap/dgap_driver.c
Removing drivers/staging/dgap/dgap_downld.h
Removing drivers/staging/dgap/dgap_conf.h
Removing drivers/staging/cxt1e1/ossiRelease.c
Auto-merging drivers/staging/cxt1e1/linux.c
CONFLICT (content): Merge conflict in drivers/staging/cxt1e1/linux.c
Auto-merging MAINTAINERS
Automatic merge failed; fix conflicts and then commit the result.
[gary@arch-tuxx staging]$ git status
On branch master
Your branch is up-to-date with 'origin/master'.

You have unmerged paths.
  (fix conflicts and run "git commit")

Changes to be committed:

modified:   Documentation/devicetree/bindings/arm/atmel-adc.txt
new file:   Documentation/devicetree/bindings/graph.txt
new file: 
Documentation/devicetree/bindings/iio/adc/vf610-adc.txt
new file: 
Documentation/devicetree/bindings/iio/adc/xilinx-xadc.txt
modified: 
Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt
new file: 
Documentation/devicetree/bindings/staging/imx-drm/hdmi.txt
modified: 
Documentation/devicetree/bindings/staging/imx-drm/ldb.txt

modified:   MAINTAINERS
modified:   

[PATCH 3/3] Staging: lustre: fld: moved EXPORT_SYMBOL() for a fix.

2014-03-13 Thread Gary Rookard
I moved EXPORT_SYMBOL(fld_client_proc_fini); for a EXPORT_SYMBOL
should be immediately below its function warning fix.

Signed-off-by: Gary Alan Rookard 

---
Correct patch, first two breaks build.
On branch staging-next
 drivers/staging/lustre/lustre/fld/fld_request.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/fld/fld_request.c 
b/drivers/staging/lustre/lustre/fld/fld_request.c
index 0d2a9ab..39e5501 100644
--- a/drivers/staging/lustre/lustre/fld/fld_request.c
+++ b/drivers/staging/lustre/lustre/fld/fld_request.c
@@ -325,9 +325,8 @@ void fld_client_proc_fini(struct lu_client_fld *fld)
 {
return;
 }
-EXPORT_SYMBOL(fld_client_proc_fini);
 #endif
-
+EXPORT_SYMBOL(fld_client_proc_fini);
 static inline int hash_is_sane(int hash)
 {
return hash >= 0 && hash < ARRAY_SIZE(fld_hash);
-- 
1.9.0

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


[PATCH] Staging: lustre: fld: removed parentheses from return statement.

2014-03-13 Thread Gary Rookard
I removed the useless parentheses from a return statement for a 
warning fix. Return not a function.

Signed-off-by: Gary Alan Rookard 

---
On branch staging-next
 drivers/staging/lustre/lustre/fld/fld_request.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/fld/fld_request.c 
b/drivers/staging/lustre/lustre/fld/fld_request.c
index 4474537..0d2a9ab 100644
--- a/drivers/staging/lustre/lustre/fld/fld_request.c
+++ b/drivers/staging/lustre/lustre/fld/fld_request.c
@@ -330,7 +330,7 @@ EXPORT_SYMBOL(fld_client_proc_fini);
 
 static inline int hash_is_sane(int hash)
 {
-   return (hash >= 0 && hash < ARRAY_SIZE(fld_hash));
+   return hash >= 0 && hash < ARRAY_SIZE(fld_hash);
 }
 
 int fld_client_init(struct lu_client_fld *fld,
-- 
1.9.0

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


[PATCH] Staging: lustre: fld: removed parentheses from return statement.

2014-03-13 Thread Gary Rookard
I removed the useless parentheses from a return statement for a 
warning fix. Return not a function.

Signed-off-by: Gary Alan Rookard 

---
On branch staging-next
 drivers/staging/lustre/lustre/fld/fld_request.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/fld/fld_request.c 
b/drivers/staging/lustre/lustre/fld/fld_request.c
index 4474537..0d2a9ab 100644
--- a/drivers/staging/lustre/lustre/fld/fld_request.c
+++ b/drivers/staging/lustre/lustre/fld/fld_request.c
@@ -330,7 +330,7 @@ EXPORT_SYMBOL(fld_client_proc_fini);
 
 static inline int hash_is_sane(int hash)
 {
-   return (hash >= 0 && hash < ARRAY_SIZE(fld_hash));
+   return hash >= 0 && hash < ARRAY_SIZE(fld_hash);
 }
 
 int fld_client_init(struct lu_client_fld *fld,
-- 
1.9.0

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


[PATCH] Staging: lustre: fld: moved EXPORT_SYMBOL() for a fix.

2014-03-12 Thread Gary Rookard
I moved EXPORT_SYMBOL(fld_client_proc_fini); for a EXPORT_SYMBOL
should be immediately below its function warning fix.

Signed-off-by: Gary Alan Rookard 
---
On branch staging-next
 drivers/staging/lustre/lustre/fld/fld_request.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/fld/fld_request.c 
b/drivers/staging/lustre/lustre/fld/fld_request.c
index 896f9fe..4474537 100644
--- a/drivers/staging/lustre/lustre/fld/fld_request.c
+++ b/drivers/staging/lustre/lustre/fld/fld_request.c
@@ -325,9 +325,8 @@ void fld_client_proc_fini(struct lu_client_fld *fld)
 {
return;
 }
-#endif
-
 EXPORT_SYMBOL(fld_client_proc_fini);
+#endif
 
 static inline int hash_is_sane(int hash)
 {
-- 
1.9.0

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


[PATCH] Staging: lustre: fld: moved EXPORT_SYMBOL() for a fix.

2014-03-12 Thread Gary Rookard
I moved EXPORT_SYMBOL(fld_client_proc_fini); for a warning fix.

Signed-off-by: Gary Alan Rookard 
---
On branch staging-next
 drivers/staging/lustre/lustre/fld/fld_request.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/fld/fld_request.c 
b/drivers/staging/lustre/lustre/fld/fld_request.c
index 896f9fe..4474537 100644
--- a/drivers/staging/lustre/lustre/fld/fld_request.c
+++ b/drivers/staging/lustre/lustre/fld/fld_request.c
@@ -325,9 +325,8 @@ void fld_client_proc_fini(struct lu_client_fld *fld)
 {
return;
 }
-#endif
-
 EXPORT_SYMBOL(fld_client_proc_fini);
+#endif
 
 static inline int hash_is_sane(int hash)
 {
-- 
1.9.0

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


git not pulling origin staging-next cleanly.

2014-03-12 Thread Gary Rookard

Hi,
Could this problem be local machine (git-1.9.0-1) or dare I say it,
a tmp server-side melt-down of sorts?
I've tried everything nothing seams to work.

Thanks for your time,
-Gary Rookard
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] Staging: lustre: fld: fix split strings.

2014-03-10 Thread Gary Rookard
unsplit strings from two lines to one. Changes resulted
in line over 80 characters warning. Leaving the latter
of the two warnings for possible string grepping reasons.

Signed-off-by: Gary Alan Rookard 
---
On branch staging-next
 drivers/staging/lustre/lustre/fld/fld_request.c | 15 ++-
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/lustre/lustre/fld/fld_request.c 
b/drivers/staging/lustre/lustre/fld/fld_request.c
index 896f9fe..1f8abba 100644
--- a/drivers/staging/lustre/lustre/fld/fld_request.c
+++ b/drivers/staging/lustre/lustre/fld/fld_request.c
@@ -138,9 +138,8 @@ fld_rrb_scan(struct lu_client_fld *fld, seqno_t seq)
return target;
}
 
-   CERROR("%s: Can't find target by hash %d (seq "LPX64"). "
-  "Targets (%d):\n", fld->lcf_name, hash, seq,
-  fld->lcf_count);
+   CERROR("%s: Can't find target by hash %d (seq "LPX64"). Targets 
(%d):\n",
+   fld->lcf_name, hash, seq, fld->lcf_count);
 
list_for_each_entry(target, &fld->lcf_targets, ft_chain) {
const char *srv_name = target->ft_srv != NULL  ?
@@ -209,9 +208,8 @@ int fld_client_add_target(struct lu_client_fld *fld,
LASSERT(tar->ft_srv != NULL || tar->ft_exp != NULL);
 
if (fld->lcf_flags != LUSTRE_FLD_INIT) {
-   CERROR("%s: Attempt to add target %s (idx "LPU64") "
-  "on fly - skip it\n", fld->lcf_name, name,
-  tar->ft_idx);
+   CERROR("%s: Attempt to add target %s (idx "LPU64") on fly - 
skip it\n",
+   fld->lcf_name, name, tar->ft_idx);
return 0;
} else {
CDEBUG(D_INFO, "%s: Adding target %s (idx "
@@ -476,9 +474,8 @@ int fld_client_lookup(struct lu_client_fld *fld, seqno_t 
seq, mdsno_t *mds,
target = fld_client_get_target(fld, seq);
LASSERT(target != NULL);
 
-   CDEBUG(D_INFO, "%s: Lookup fld entry (seq: "LPX64") on "
-  "target %s (idx "LPU64")\n", fld->lcf_name, seq,
-  fld_target_name(target), target->ft_idx);
+   CDEBUG(D_INFO, "%s: Lookup fld entry (seq: "LPX64") on target %s (idx 
"LPU64")\n",
+   fld->lcf_name, seq, fld_target_name(target), 
target->ft_idx);
 
res.lsr_start = seq;
fld_range_set_type(&res, flags);
-- 
1.9.0

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


[PATCH] Staging: lustre: fld: fix spacing issue.

2014-03-10 Thread Gary Rookard
fixed up a spacing issue.

Signed-off-by: Gary Alan Rookard 

---
On branch staging-next
 drivers/staging/lustre/lustre/fld/fld_cache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/fld/fld_cache.c 
b/drivers/staging/lustre/lustre/fld/fld_cache.c
index 9469e23..a06a642 100644
--- a/drivers/staging/lustre/lustre/fld/fld_cache.c
+++ b/drivers/staging/lustre/lustre/fld/fld_cache.c
@@ -355,7 +355,7 @@ static void fld_cache_overlap_handle(struct fld_cache 
*cache,
fld_cache_entry_add(cache, f_new, &f_curr->fce_list);
} else
CERROR("NEW range ="DRANGE" curr = "DRANGE"\n",
-  PRANGE(range),PRANGE(&f_curr->fce_range));
+  PRANGE(range), PRANGE(&f_curr->fce_range));
 }
 
 struct fld_cache_entry
-- 
1.9.0

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


[PATCH] Staging: lustre: fld: fix split string.

2014-03-10 Thread Gary Rookard
unsplit string from two lines to one.

Signed-off-by: Gary Alan Rookard 
---
On branch staging-next
 drivers/staging/lustre/lustre/fld/fld_cache.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lustre/fld/fld_cache.c 
b/drivers/staging/lustre/lustre/fld/fld_cache.c
index 6c37930..9469e23 100644
--- a/drivers/staging/lustre/lustre/fld/fld_cache.c
+++ b/drivers/staging/lustre/lustre/fld/fld_cache.c
@@ -236,8 +236,8 @@ static int fld_cache_shrink(struct fld_cache *cache)
num++;
}
 
-   CDEBUG(D_INFO, "%s: FLD cache - Shrunk by "
-  "%d entries\n", cache->fci_name, num);
+   CDEBUG(D_INFO, "%s: FLD cache - Shrunk by %d entries\n",
+   cache->fci_name, num);
 
return 0;
 }
-- 
1.9.0

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


[PATCH] Staging: lustre: fid: fix split strings.

2014-03-10 Thread Gary Rookard
unsplit strings from two lines to one.

Signed-off-by: Gary Alan Rookard 
---
On branch staging-next
 drivers/staging/lustre/lustre/fid/fid_request.c | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/lustre/lustre/fid/fid_request.c 
b/drivers/staging/lustre/lustre/fid/fid_request.c
index 79fc2fe..69e6a32 100644
--- a/drivers/staging/lustre/lustre/fid/fid_request.c
+++ b/drivers/staging/lustre/lustre/fid/fid_request.c
@@ -196,8 +196,8 @@ static int seq_client_alloc_seq(const struct lu_env *env,
if (range_is_exhausted(&seq->lcs_space)) {
rc = seq_client_alloc_meta(env, seq);
if (rc) {
-   CERROR("%s: Can't allocate new meta-sequence,"
-  "rc %d\n", seq->lcs_name, rc);
+   CERROR("%s: Can't allocate new meta-sequence, rc %d\n",
+   seq->lcs_name, rc);
return rc;
} else {
CDEBUG(D_INFO, "%s: New range - "DRANGE"\n",
@@ -266,15 +266,15 @@ int seq_client_get_seq(const struct lu_env *env,
 
rc = seq_client_alloc_seq(env, seq, seqnr);
if (rc) {
-   CERROR("%s: Can't allocate new sequence, "
-  "rc %d\n", seq->lcs_name, rc);
+   CERROR("%s: Can't allocate new sequence, rc %d\n",
+   seq->lcs_name, rc);
seq_fid_alloc_fini(seq);
mutex_unlock(&seq->lcs_mutex);
return rc;
}
 
-   CDEBUG(D_INFO, "%s: allocate sequence "
-  "[0x%16.16"LPF64"x]\n", seq->lcs_name, *seqnr);
+   CDEBUG(D_INFO, "%s: allocate sequence [0x%16.16"LPF64"x]\n",
+   seq->lcs_name, *seqnr);
 
/* Since the caller require the whole seq,
 * so marked this seq to be used */
@@ -329,15 +329,15 @@ int seq_client_alloc_fid(const struct lu_env *env,
 
rc = seq_client_alloc_seq(env, seq, &seqnr);
if (rc) {
-   CERROR("%s: Can't allocate new sequence, "
-  "rc %d\n", seq->lcs_name, rc);
+   CERROR("%s: Can't allocate new sequence, rc %d\n",
+   seq->lcs_name, rc);
seq_fid_alloc_fini(seq);
mutex_unlock(&seq->lcs_mutex);
return rc;
}
 
-   CDEBUG(D_INFO, "%s: Switch to sequence "
-  "[0x%16.16"LPF64"x]\n", seq->lcs_name, seqnr);
+   CDEBUG(D_INFO, "%s: Switch to sequence [0x%16.16"LPF64"x]\n",
+   seq->lcs_name, seqnr);
 
seq->lcs_fid.f_oid = LUSTRE_FID_INIT_OID;
seq->lcs_fid.f_seq = seqnr;
@@ -428,8 +428,8 @@ static int seq_client_proc_init(struct lu_client_seq *seq)
rc = lprocfs_add_vars(seq->lcs_proc_dir,
  seq_client_proc_list, seq);
if (rc) {
-   CERROR("%s: Can't init sequence manager "
-  "proc, rc %d\n", seq->lcs_name, rc);
+   CERROR("%s: Can't init sequence manager proc, rc %d\n",
+   seq->lcs_name, rc);
GOTO(out_cleanup, rc);
}
 
-- 
1.9.0

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


[PATCH] Staging: bcm: DDRInit: fix up indentation issues.

2014-02-16 Thread Gary Rookard
fixed up a couple of indentation issues.

Signed-off-by: Gary Alan Rookard 
---
On branch staging-next
 drivers/staging/bcm/DDRInit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index b4d5e64..f1d7cb8 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -1094,8 +1094,8 @@ int download_ddr_settings(struct bcm_mini_adapter 
*Adapter)
RegCount -= T3LP_SKIP_CLOCK_PROGRAM_DUMP_133MHZ;
psDDRSetting += T3LP_SKIP_CLOCK_PROGRAM_DUMP_133MHZ;
break;
-   default:
-   return -EINVAL;
+   default:
+   return -EINVAL;
}
break;
 
-- 
1.9.0

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


[PATCH] Staging: rtl8821ae: fix up some spacing issues.

2014-01-25 Thread Gary Rookard
I fixed up some operator spacing issues, and other
minor spacing issues.

Signed-off-by: Gary Alan Rookard 
---
On branch staging-next
 drivers/staging/rtl8821ae/base.c | 138 +++
 1 file changed, 69 insertions(+), 69 deletions(-)

diff --git a/drivers/staging/rtl8821ae/base.c b/drivers/staging/rtl8821ae/base.c
index b5a50d0..7097752 100644
--- a/drivers/staging/rtl8821ae/base.c
+++ b/drivers/staging/rtl8821ae/base.c
@@ -64,73 +64,73 @@
  *
  */
 static struct ieee80211_channel rtl_channeltable_2g[] = {
-   {.center_freq = 2412,.hw_value = 1,},
-   {.center_freq = 2417,.hw_value = 2,},
-   {.center_freq = 2422,.hw_value = 3,},
-   {.center_freq = 2427,.hw_value = 4,},
-   {.center_freq = 2432,.hw_value = 5,},
-   {.center_freq = 2437,.hw_value = 6,},
-   {.center_freq = 2442,.hw_value = 7,},
-   {.center_freq = 2447,.hw_value = 8,},
-   {.center_freq = 2452,.hw_value = 9,},
-   {.center_freq = 2457,.hw_value = 10,},
-   {.center_freq = 2462,.hw_value = 11,},
-   {.center_freq = 2467,.hw_value = 12,},
-   {.center_freq = 2472,.hw_value = 13,},
-   {.center_freq = 2484,.hw_value = 14,},
+   {.center_freq = 2412, .hw_value = 1,},
+   {.center_freq = 2417, .hw_value = 2,},
+   {.center_freq = 2422, .hw_value = 3,},
+   {.center_freq = 2427, .hw_value = 4,},
+   {.center_freq = 2432, .hw_value = 5,},
+   {.center_freq = 2437, .hw_value = 6,},
+   {.center_freq = 2442, .hw_value = 7,},
+   {.center_freq = 2447, .hw_value = 8,},
+   {.center_freq = 2452, .hw_value = 9,},
+   {.center_freq = 2457, .hw_value = 10,},
+   {.center_freq = 2462, .hw_value = 11,},
+   {.center_freq = 2467, .hw_value = 12,},
+   {.center_freq = 2472, .hw_value = 13,},
+   {.center_freq = 2484, .hw_value = 14,},
 };
 
 static struct ieee80211_channel rtl_channeltable_5g[] = {
-   {.center_freq = 5180,.hw_value = 36,},
-   {.center_freq = 5200,.hw_value = 40,},
-   {.center_freq = 5220,.hw_value = 44,},
-   {.center_freq = 5240,.hw_value = 48,},
-   {.center_freq = 5260,.hw_value = 52,},
-   {.center_freq = 5280,.hw_value = 56,},
-   {.center_freq = 5300,.hw_value = 60,},
-   {.center_freq = 5320,.hw_value = 64,},
-   {.center_freq = 5500,.hw_value = 100,},
-   {.center_freq = 5520,.hw_value = 104,},
-   {.center_freq = 5540,.hw_value = 108,},
-   {.center_freq = 5560,.hw_value = 112,},
-   {.center_freq = 5580,.hw_value = 116,},
-   {.center_freq = 5600,.hw_value = 120,},
-   {.center_freq = 5620,.hw_value = 124,},
-   {.center_freq = 5640,.hw_value = 128,},
-   {.center_freq = 5660,.hw_value = 132,},
-   {.center_freq = 5680,.hw_value = 136,},
-   {.center_freq = 5700,.hw_value = 140,},
-   {.center_freq = 5745,.hw_value = 149,},
-   {.center_freq = 5765,.hw_value = 153,},
-   {.center_freq = 5785,.hw_value = 157,},
-   {.center_freq = 5805,.hw_value = 161,},
-   {.center_freq = 5825,.hw_value = 165,},
+   {.center_freq = 5180, .hw_value = 36,},
+   {.center_freq = 5200, .hw_value = 40,},
+   {.center_freq = 5220, .hw_value = 44,},
+   {.center_freq = 5240, .hw_value = 48,},
+   {.center_freq = 5260, .hw_value = 52,},
+   {.center_freq = 5280, .hw_value = 56,},
+   {.center_freq = 5300, .hw_value = 60,},
+   {.center_freq = 5320, .hw_value = 64,},
+   {.center_freq = 5500, .hw_value = 100,},
+   {.center_freq = 5520, .hw_value = 104,},
+   {.center_freq = 5540, .hw_value = 108,},
+   {.center_freq = 5560, .hw_value = 112,},
+   {.center_freq = 5580, .hw_value = 116,},
+   {.center_freq = 5600, .hw_value = 120,},
+   {.center_freq = 5620, .hw_value = 124,},
+   {.center_freq = 5640, .hw_value = 128,},
+   {.center_freq = 5660, .hw_value = 132,},
+   {.center_freq = 5680, .hw_value = 136,},
+   {.center_freq = 5700, .hw_value = 140,},
+   {.center_freq = 5745, .hw_value = 149,},
+   {.center_freq = 5765, .hw_value = 153,},
+   {.center_freq = 5785, .hw_value = 157,},
+   {.center_freq = 5805, .hw_value = 161,},
+   {.center_freq = 5825, .hw_value = 165,},
 };
 
 static struct ieee80211_rate rtl_ratetable_2g[] = {
-   {.bitrate = 10,.hw_value = 0x00,},
-   {.bitrate = 20,.hw_value = 0x01,},
-   {.bitrate = 55,.hw_value = 0x02,},
-   {.bitrate = 110,.hw_value = 0x03,},
-   {.bitrate = 60,.hw_value = 0x04,},
-   {.bitrate = 90,.hw_value = 0x05,},
-   {.bitrate = 120,.hw_value = 0x06,},
-   {.bitrate = 180,.hw_value = 0x07,},
-   {.bitrate = 240,.hw_value = 0x08,},
-   {.bitrate = 360,.hw_value = 0x09,},
-   {.bitrate = 480,.hw_value = 0x0a,},
-   {.bitrate = 540,.hw_value = 0x0b,},
+   {.bitrate = 10, .hw_value = 0x00,},
+   {.bitrate = 20, .hw_value = 0x01,},
+   {.bitrate = 55, .hw_value = 0x02

[PATCH] Staging: bcm: DDRInit: fix up spacing issues.

2014-01-18 Thread Gary Rookard
I fixed up some operator spacing issues.

Signed-off-by: Gary Alan Rookard 
---
On branch staging-next
 drivers/staging/bcm/DDRInit.c | 28 ++--
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index ed285b2..b4d5e64 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -3,7 +3,7 @@
 
 
 #define DDR_DUMP_INTERNAL_DEVICE_MEMORY 0xBFC02B00
-#define MIPS_CLOCK_REG 0x0f000820
+#define MIPS_CLOCK_REG 0x0f000820
 
 /* DDR INIT-133Mhz */
 #define T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 12  /* index for 0x0F007000 */
@@ -818,13 +818,13 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
if ((Adapter->chip_id !=  BCS220_2) &&
(Adapter->chip_id !=  BCS220_2BC) &&
(Adapter->chip_id != BCS220_3)) {
-   retval = rdmalt(Adapter,(UINT)0x0f000830, &uiResetValue, 
sizeof(uiResetValue));
+   retval = rdmalt(Adapter, (UINT)0x0f000830, &uiResetValue, 
sizeof(uiResetValue));
if (retval < 0) {
BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, DBG_LVL_ALL, 
"%s:%d RDM failed\n", __func__, __LINE__);
return retval;
}
uiResetValue |= 0x44;
-   retval = wrmalt(Adapter,(UINT)0x0f000830, &uiResetValue, 
sizeof(uiResetValue));
+   retval = wrmalt(Adapter, (UINT)0x0f000830, &uiResetValue, 
sizeof(uiResetValue));
if (retval < 0) {
BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, DBG_LVL_ALL, 
"%s:%d RDM failed\n", __func__, __LINE__);
return retval;
@@ -871,7 +871,7 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
case 0xbece0121:
case 0xbece0130:
case 0xbece0300:
-   BCM_DEBUG_PRINT(Adapter,DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, "DDR 
Setting: %x\n", Adapter->DDRSetting);
+   BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, 
"DDR Setting: %x\n", Adapter->DDRSetting);
switch (Adapter->DDRSetting) {
case DDR_80_MHZ:
psDDRSetting = asT3_DDRSetting80MHz;
@@ -933,7 +933,7 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
}
 
value = 0;
-   BCM_DEBUG_PRINT(Adapter,DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, 
"Register Count is =%lu\n", RegCount);
+   BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, 
"Register Count is =%lu\n", RegCount);
while (RegCount && !retval) {
if (uiClockSetting && psDDRSetting->ulRegAddress == 
MIPS_CLOCK_REG)
value = uiClockSetting;
@@ -990,12 +990,12 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
 * we will change this when we will have internal PMU.
 */
if (Adapter->PmuMode == HYBRID_MODE_7C) {
-   retval = rdmalt(Adapter,(UINT)0x0f000c00, 
&uiResetValue, sizeof(uiResetValue));
+   retval = rdmalt(Adapter, (UINT)0x0f000c00, 
&uiResetValue, sizeof(uiResetValue));
if (retval < 0) {
BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, 
DBG_LVL_ALL, "%s:%d RDM failed\n", __func__, __LINE__);
return retval;
}
-   retval = rdmalt(Adapter,(UINT)0x0f000c00, 
&uiResetValue, sizeof(uiResetValue));
+   retval = rdmalt(Adapter, (UINT)0x0f000c00, 
&uiResetValue, sizeof(uiResetValue));
if (retval < 0) {
BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, 
DBG_LVL_ALL, "%s:%d RDM failed\n", __func__, __LINE__);
return retval;
@@ -1006,12 +1006,12 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, 
DBG_LVL_ALL, "%s:%d RDM failed\n", __func__, __LINE__);
return retval;
}
-   retval = rdmalt(Adapter,(UINT)0x0f000c00, 
&uiResetValue, sizeof(uiResetValue));
+   retval = rdmalt(Adapter, (UINT)0x0f000c00, 
&uiResetValue, sizeof(uiResetValue));
if (retval < 0) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, RDM, 
DBG_LVL_ALL, "%s:%d RDM failed\n", __func__, __LINE__);
return retval;
}
-   retval = rdmalt(Adapter,(UINT)0x0f000c00, 
&uiResetValue, sizeof(uiResetValue));
+   retval = rdmalt(Adapter, (UINT)0x0f000c00, 
&uiResetValue, sizeof(uiResetValue));
if (retval < 0) {
BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, 
DBG_LVL_ALL, "%s:%d RDM failed\n", __func__, __LINE__);
return retval;
@@ -1024,12 +1024,12 @@ 

[PATCH] Staging: bcm: DDRInit: fix up some bracing issues.

2013-12-28 Thread Gary Rookard
I fixed some brace coding style issues.

Signed-off-by: Gary Alan Rookard 

---
On branch staging-next
 drivers/staging/bcm/DDRInit.c | 107 --
 1 file changed, 30 insertions(+), 77 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index 0f03d7e..ed285b2 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -780,11 +780,9 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
UINT uiClockSetting = 0;
int retval = STATUS_SUCCESS;
 
-   switch (Adapter->chip_id)
-   {
+   switch (Adapter->chip_id) {
case 0xbece3200:
-   switch (Adapter->DDRSetting)
-   {
+   switch (Adapter->DDRSetting) {
case DDR_80_MHZ:
psDDRSetting = asT3LP_DDRSetting80MHz;
RegCount = (sizeof(asT3LP_DDRSetting80MHz)/
@@ -800,17 +798,13 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
RegCount = (sizeof(asT3LP_DDRSetting133MHz)/
sizeof(struct bcm_ddr_setting));
if (Adapter->bMipsConfig == MIPS_200_MHZ)
-   {
uiClockSetting = 0x03F13652;
-   }
else
-   {
uiClockSetting = 0x03F1365B;
-   }
break;
default:
return -EINVAL;
-   }
+   }
 
break;
case T3LPB:
@@ -823,22 +817,20 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
 */
if ((Adapter->chip_id !=  BCS220_2) &&
(Adapter->chip_id !=  BCS220_2BC) &&
-   (Adapter->chip_id != BCS220_3))
-   {
+   (Adapter->chip_id != BCS220_3)) {
retval = rdmalt(Adapter,(UINT)0x0f000830, &uiResetValue, 
sizeof(uiResetValue));
if (retval < 0) {
BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, DBG_LVL_ALL, 
"%s:%d RDM failed\n", __func__, __LINE__);
return retval;
-   }
+   }
uiResetValue |= 0x44;
retval = wrmalt(Adapter,(UINT)0x0f000830, &uiResetValue, 
sizeof(uiResetValue));
if (retval < 0) {
BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, DBG_LVL_ALL, 
"%s:%d RDM failed\n", __func__, __LINE__);
return retval;
-   }
}
-   switch (Adapter->DDRSetting)
-   {
+   }
+   switch (Adapter->DDRSetting) {
 
 
 
@@ -858,13 +850,9 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
sizeof(struct bcm_ddr_setting));
 
if (Adapter->bMipsConfig == MIPS_200_MHZ)
-   {
uiClockSetting = 0x03F13652;
-   }
else
-   {
uiClockSetting = 0x03F1365B;
-   }
break;
 
case DDR_160_MHZ:
@@ -872,14 +860,10 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
RegCount = 
sizeof(asT3LPB_DDRSetting160MHz)/sizeof(struct bcm_ddr_setting);
 
if (Adapter->bMipsConfig == MIPS_200_MHZ)
-   {
uiClockSetting = 0x03F137D2;
-   }
else
-   {
uiClockSetting = 0x03F137DB;
-   }
-   }
+   }
break;
 
case 0xbece0110:
@@ -888,8 +872,7 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
case 0xbece0130:
case 0xbece0300:
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, "DDR 
Setting: %x\n", Adapter->DDRSetting);
-   switch (Adapter->DDRSetting)
-   {
+   switch (Adapter->DDRSetting) {
case DDR_80_MHZ:
psDDRSetting = asT3_DDRSetting80MHz;
RegCount = (sizeof(asT3_DDRSetting80MHz)/
@@ -910,8 +893,7 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
}
case 0xbece0310:
{
-   switch (Adapter->DDRSetting)
-   {
+   switch (Adapter->DDRSetting) {
case DDR_80_MHZ:
psDDRSetting = asT3B_DDRSetting80MHz;
RegCount = (sizeof(asT3B_DDRSetting80MHz)/
@@ -924,28 +906,21 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
   

[PATCH] Staging: bcm: DDRInit: fixed up some commenting issues.

2013-12-18 Thread Gary Rookard
I have deleated some unintelligible comments, and made a
few minor white space corrections.

Signed-off-by: Gary Alan Rookard
---
On branch staging-next
 drivers/staging/bcm/DDRInit.c | 149 +-
 1 file changed, 74 insertions(+), 75 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index d1aaa53..0f03d7e 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -5,9 +5,9 @@
 #define DDR_DUMP_INTERNAL_DEVICE_MEMORY 0xBFC02B00
 #define MIPS_CLOCK_REG 0x0f000820
 
-/* DDR INIT-133Mhz */
+/* DDR INIT-133Mhz */
 #define T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 12  /* index for 0x0F007000 */
-static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = {/* DPLL Clock Setting 
*/
+static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = {  /* DPLL Clock 
Setting */
{0x0F000800, 0x7212},
{0x0f000820, 0x07F13FFF},
{0x0f000810, 0x0F95},
@@ -29,17 +29,17 @@ static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = {/* 
DPLL Clock Setting *
{0x0F007010, 0x0100},
{0x0F007014, 0x01000100},
{0x0F007018, 0x0100},
-   {0x0F00701c, 0x01020001},/* POP - 0x00020001 Normal 0x01020001 */
-   {0x0F007020, 0x04030107}, /* Normal - 0x04030107 POP - 0x05030107 */
+   {0x0F00701c, 0x01020001},
+   {0x0F007020, 0x04030107},
{0x0F007024, 0x0207},
{0x0F007028, 0x02020202},
-   {0x0F00702c, 0x0206060a},/* ROB- 0x0205050a,//0x0206060a */
+   {0x0F00702c, 0x0206060a},
{0x0F007030, 0x0500},
{0x0F007034, 0x0003},
-   {0x0F007038, 0x110a0200},/* ROB - 0x110a0200,//0x180a0200,// 0x1f0a0200 
*/
-   {0x0F00703C, 0x02101010},/* ROB - 0x02101010,//0x02101018}, */
-   {0x0F007040, 0x45751200},/* ROB - 0x45751200,//0x450f1200}, */
-   {0x0F007044, 0x110a0d00},/* ROB - 0x110a0d00//0x111f0d00 */
+   {0x0F007038, 0x110a0200},
+   {0x0F00703C, 0x02101010},
+   {0x0F007040, 0x45751200},
+   {0x0F007044, 0x110a0d00},
{0x0F007048, 0x081b0306},
{0x0F00704c, 0x},
{0x0F007050, 0x001c},
@@ -65,7 +65,7 @@ static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = {/* 
DPLL Clock Setting *
 };
 /* 80Mhz */
 #define T3_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 10  /* index for 0x0F007000 */
-static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = {/* DPLL Clock Setting 
*/
+static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = {  /* DPLL Clock 
Setting */
{0x0f000810, 0x0F95},
{0x0f000820, 0x07f1},
{0x0f000860, 0x},
@@ -117,14 +117,13 @@ static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = 
{/* DPLL Clock Setting */
 };
 /* 100Mhz */
 #define T3_SKIP_CLOCK_PROGRAM_DUMP_100MHZ 13  /* index for 0x0F007000 */
-static struct bcm_ddr_setting asT3_DDRSetting100MHz[] = {/* DPLL Clock Setting 
*/
+static struct bcm_ddr_setting asT3_DDRSetting100MHz[] = {  /* DPLL Clock 
Setting */
{0x0F000800, 0x7008},
{0x0f000810, 0x0F95},
{0x0f000820, 0x07F13E3F},
{0x0f000860, 0x},
{0x0f000880, 0x03DD},
/* Changed source for X-bar and MIPS clock to APLL */
-   /* 0x0f000840,0x0FFF1800, */
{0x0f000840, 0x0FFF1B00},
{0x0f000870, 0x0002},
{0x0F00a044, 0x1fff},
@@ -142,8 +141,8 @@ static struct bcm_ddr_setting asT3_DDRSetting100MHz[] = {/* 
DPLL Clock Setting *
{0x0F007010, 0x0100},
{0x0F007014, 0x01000100},
{0x0F007018, 0x0100},
-   {0x0F00701c, 0x01020001}, /* POP - 0x0002 Normal 0x0102 */
-   {0x0F007020, 0x04020107},/* Normal - 0x04030107 POP - 0x05030107 */
+   {0x0F00701c, 0x01020001},
+   {0x0F007020, 0x04020107},
{0x0F007024, 0x0007},
{0x0F007028, 0x01020201},
{0x0F00702c, 0x0204040A},
@@ -153,7 +152,7 @@ static struct bcm_ddr_setting asT3_DDRSetting100MHz[] = {/* 
DPLL Clock Setting *
{0x0F00703C, 0x02030320},
{0x0F007040, 0x6E7F1200},
{0x0F007044, 0x01190A00},
-   {0x0F007048, 0x06120305},/* 0x02690204 // 0x06120305 */
+   {0x0F007048, 0x06120305},
{0x0F00704c, 0x},
{0x0F007050, 0x001C},
{0x0F007054, 0x},
@@ -190,7 +189,7 @@ static struct bcm_ddr_setting asDPLL_266MHZ[] = {
 };
 
 #define T3B_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 11  /* index for 0x0F007000 */
-static struct bcm_ddr_setting asT3B_DDRSetting133MHz[] = {/* DPLL Clock 
Setting */
+static struct bcm_ddr_setting asT3B_DDRSetting133MHz[] = {  /* DPLL Clock 
Setting */
{0x0f000810, 0x0F95},
{0x0f000810, 0x0F95},
{0x0f000810, 0x0F95},
@@ -214,17 +213,17 @@ static struct bcm_ddr_setting asT3B_DDRSetting133MHz[] = 
{/* DPLL Clock Setting
{0x0F007010, 0x0100},
{0x0F007014, 0x01000100},
{0x0F007018, 0x0100},
-   {0x0F00701c, 0x01020001},/* POP - 0x00020001 Normal 0x01020001 */
-

[PATCH] Staging: bcm: DDRInit: fixed issues w/ commenting.

2013-12-17 Thread Gary Rookard
removed C99 comments to follow the linux kernel coding style 
thus fixing checkpatch errors respectfully.

Signed-off-by: Gary Alan Rookard 
---
On branch staging-next
 drivers/staging/bcm/DDRInit.c | 271 +-
 1 file changed, 136 insertions(+), 135 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index 939fe73..d1aaa53 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -5,15 +5,15 @@
 #define DDR_DUMP_INTERNAL_DEVICE_MEMORY 0xBFC02B00
 #define MIPS_CLOCK_REG 0x0f000820
 
-//DDR INIT-133Mhz
-#define T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 12  //index for 0x0F007000
-static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = {//  # DPLL Clock 
Setting
+/* DDR INIT-133Mhz */
+#define T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 12  /* index for 0x0F007000 */
+static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = {/* DPLL Clock Setting 
*/
{0x0F000800, 0x7212},
{0x0f000820, 0x07F13FFF},
{0x0f000810, 0x0F95},
{0x0f000860, 0x},
{0x0f000880, 0x03DD},
-   // Changed source for X-bar and MIPS clock to APLL
+   /* Changed source for X-bar and MIPS clock to APLL */
{0x0f000840, 0x0FFF1B00},
{0x0f000870, 0x0002},
{0x0F00a044, 0x1fff},
@@ -21,7 +21,7 @@ static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = {//   
   # DPLL Clock Se
{0x0F00a084, 0x1Cff},
{0x0F00a080, 0x1C00},
{0x0F00a04C, 0x000C},
-   //Memcontroller Default values
+   /* Memcontroller Default values */
{0x0F007000, 0x00010001},
{0x0F007004, 0x01010100},
{0x0F007008, 0x0101},
@@ -29,17 +29,17 @@ static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = {// 
 # DPLL Clock Se
{0x0F007010, 0x0100},
{0x0F007014, 0x01000100},
{0x0F007018, 0x0100},
-   {0x0F00701c, 0x01020001},// POP - 0x00020001 Normal 0x01020001
-   {0x0F007020, 0x04030107}, //Normal - 0x04030107 POP - 0x05030107
+   {0x0F00701c, 0x01020001},/* POP - 0x00020001 Normal 0x01020001 */
+   {0x0F007020, 0x04030107}, /* Normal - 0x04030107 POP - 0x05030107 */
{0x0F007024, 0x0207},
{0x0F007028, 0x02020202},
-   {0x0F00702c, 0x0206060a},//ROB- 0x0205050a,//0x0206060a
+   {0x0F00702c, 0x0206060a},/* ROB- 0x0205050a,//0x0206060a */
{0x0F007030, 0x0500},
{0x0F007034, 0x0003},
-   {0x0F007038, 0x110a0200},//ROB - 0x110a0200,//0x180a0200,// 0x1f0a0200
-   {0x0F00703C, 0x02101010},//ROB - 0x02101010,//0x02101018},
-   {0x0F007040, 0x45751200},//ROB - 0x45751200,//0x450f1200},
-   {0x0F007044, 0x110a0d00},//ROB - 0x110a0d00//0x111f0d00
+   {0x0F007038, 0x110a0200},/* ROB - 0x110a0200,//0x180a0200,// 0x1f0a0200 
*/
+   {0x0F00703C, 0x02101010},/* ROB - 0x02101010,//0x02101018}, */
+   {0x0F007040, 0x45751200},/* ROB - 0x45751200,//0x450f1200}, */
+   {0x0F007044, 0x110a0d00},/* ROB - 0x110a0d00//0x111f0d00 */
{0x0F007048, 0x081b0306},
{0x0F00704c, 0x},
{0x0F007050, 0x001c},
@@ -56,16 +56,16 @@ static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = {// 
 # DPLL Clock Se
{0x0F00707C, 0x},
{0x0F007080, 0x},
{0x0F007084, 0x},
-   //# Enable BW improvement within memory controller
+   /* Enable BW improvement within memory controller */
{0x0F007094, 0x0104},
-   //# Enable 2 ports within X-bar
+   /* Enable 2 ports within X-bar */
{0x0F00A000, 0x0016},
-   //# Enable start bit within memory controller
+   /* Enable start bit within memory controller */
{0x0F007018, 0x0101}
 };
-//80Mhz
-#define T3_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 10  //index for 0x0F007000
-static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = {//   # DPLL Clock 
Setting
+/* 80Mhz */
+#define T3_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 10  /* index for 0x0F007000 */
+static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = {/* DPLL Clock Setting 
*/
{0x0f000810, 0x0F95},
{0x0f000820, 0x07f1},
{0x0f000860, 0x},
@@ -76,7 +76,7 @@ static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = {//   
# DPLL Clock Settin
{0x0F00a080, 0x1C00},
{0x0F00a000, 0x0016},
{0x0F00a04C, 0x000C},
-   //Memcontroller Default values
+   /* Memcontroller Default values */
{0x0F007000, 0x00010001},
{0x0F007004, 0x0100},
{0x0F007008, 0x0101},
@@ -112,19 +112,19 @@ static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = 
{//   # DPLL Clock Settin
{0x0F007080, 0x},
{0x0F007084, 0x},
{0x0F007094, 0x0104},
-   //# Enable start bit within memory controller
+   /* Enable start bit within memory controller */
{0x0F007018, 0x0101}
 };
-//100Mhz
-#define T3_SKIP_

[PATCH] Staging: bcm: DDRInit: fixed bracing issues.

2013-12-16 Thread Gary Rookard
removed braces from single statement conditonals.
if, else, while opening brace placement was moved to last 
on first line of each, and closing brace moved to first on
new line to follow the linux kernel coding style thus removing
checkpatch errors respectfully.

Signed-off-by: Gary Alan Rookard 
---
On branch staging-next
 drivers/staging/bcm/DDRInit.c | 112 --
 1 file changed, 31 insertions(+), 81 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index 41132b5..16a2d3d 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -739,11 +739,9 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
UINT uiClockSetting = 0;
int retval = STATUS_SUCCESS;
 
-   switch (Adapter->chip_id)
-   {
+   switch (Adapter->chip_id) {
case 0xbece3200:
-   switch (Adapter->DDRSetting)
-   {
+   switch (Adapter->DDRSetting) {
case DDR_80_MHZ:
psDDRSetting = asT3LP_DDRSetting80MHz;
RegCount = (sizeof(asT3LP_DDRSetting80MHz)/
@@ -759,17 +757,13 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
RegCount = (sizeof(asT3LP_DDRSetting133MHz)/
sizeof(struct bcm_ddr_setting));
if (Adapter->bMipsConfig == MIPS_200_MHZ)
-   {
uiClockSetting = 0x03F13652;
-   }
else
-   {
uiClockSetting = 0x03F1365B;
-   }
break;
default:
return -EINVAL;
-   }
+   }
 
break;
case T3LPB:
@@ -782,22 +776,20 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
 */
if ((Adapter->chip_id !=  BCS220_2) &&
(Adapter->chip_id !=  BCS220_2BC) &&
-   (Adapter->chip_id != BCS220_3))
-   {
+   (Adapter->chip_id != BCS220_3)) {
retval = rdmalt(Adapter,(UINT)0x0f000830, &uiResetValue, 
sizeof(uiResetValue));
if (retval < 0) {
BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, DBG_LVL_ALL, 
"%s:%d RDM failed\n", __func__, __LINE__);
return retval;
-   }
+   }
uiResetValue |= 0x44;
retval = wrmalt(Adapter,(UINT)0x0f000830, &uiResetValue, 
sizeof(uiResetValue));
if (retval < 0) {
BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, DBG_LVL_ALL, 
"%s:%d RDM failed\n", __func__, __LINE__);
return retval;
-   }
}
-   switch (Adapter->DDRSetting)
-   {
+   }
+   switch (Adapter->DDRSetting) {
 
 
 
@@ -817,13 +809,9 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
sizeof(struct bcm_ddr_setting));
 
if (Adapter->bMipsConfig == MIPS_200_MHZ)
-   {
uiClockSetting = 0x03F13652;
-   }
else
-   {
uiClockSetting = 0x03F1365B;
-   }
break;
 
case DDR_160_MHZ:
@@ -831,14 +819,10 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
RegCount = 
sizeof(asT3LPB_DDRSetting160MHz)/sizeof(struct bcm_ddr_setting);
 
if (Adapter->bMipsConfig == MIPS_200_MHZ)
-   {
uiClockSetting = 0x03F137D2;
-   }
else
-   {
uiClockSetting = 0x03F137DB;
-   }
-   }
+   }
break;
 
case 0xbece0110:
@@ -847,8 +831,7 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
case 0xbece0130:
case 0xbece0300:
BCM_DEBUG_PRINT(Adapter,DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, "DDR 
Setting: %x\n", Adapter->DDRSetting);
-   switch (Adapter->DDRSetting)
-   {
+   switch (Adapter->DDRSetting) {
case DDR_80_MHZ:
psDDRSetting = asT3_DDRSetting80MHz;
RegCount = (sizeof(asT3_DDRSetting80MHz)/
@@ -868,9 +851,7 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
return -EINVAL;
}
case 0xbece0310:
-   {
-   switch (Adapter->DDRSetting)
-   {
+   switch (Ada

[PATCH] Staging: bcm: DDRInit: fixed comment issues.

2013-12-13 Thread Gary Rookard
replaced C99 style with C89 standard style comments
to follow the linux kernel coding style thus fixing
checkpatch errors respectfully.
also, in some instances changed comments from inline
to side-bar style.

Signed-off-by: Gary Alan Rookard 
---
On branch staging-next
 drivers/staging/bcm/DDRInit.c | 315 ++
 1 file changed, 137 insertions(+), 178 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index 939fe73..41132b5 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -5,41 +5,39 @@
 #define DDR_DUMP_INTERNAL_DEVICE_MEMORY 0xBFC02B00
 #define MIPS_CLOCK_REG 0x0f000820
 
-//DDR INIT-133Mhz
-#define T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 12  //index for 0x0F007000
-static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = {//  # DPLL Clock 
Setting
+/* DDR INIT-133Mhz */
+#define T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 12  /* index for 0x0F007000 */
+static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = { /* DPLL Clock 
Setting */
{0x0F000800, 0x7212},
{0x0f000820, 0x07F13FFF},
{0x0f000810, 0x0F95},
{0x0f000860, 0x},
{0x0f000880, 0x03DD},
-   // Changed source for X-bar and MIPS clock to APLL
-   {0x0f000840, 0x0FFF1B00},
+   {0x0f000840, 0x0FFF1B00},  /* Changed source for X-bar and MIPS clock 
to APLL */
{0x0f000870, 0x0002},
{0x0F00a044, 0x1fff},
{0x0F00a040, 0x1f00},
{0x0F00a084, 0x1Cff},
{0x0F00a080, 0x1C00},
{0x0F00a04C, 0x000C},
-   //Memcontroller Default values
-   {0x0F007000, 0x00010001},
+   {0x0F007000, 0x00010001},  /* Memcontroller Default values */
{0x0F007004, 0x01010100},
{0x0F007008, 0x0101},
{0x0F00700c, 0x},
{0x0F007010, 0x0100},
{0x0F007014, 0x01000100},
{0x0F007018, 0x0100},
-   {0x0F00701c, 0x01020001},// POP - 0x00020001 Normal 0x01020001
-   {0x0F007020, 0x04030107}, //Normal - 0x04030107 POP - 0x05030107
+   {0x0F00701c, 0x01020001},  /* POP - 0x00020001 Normal - 0x01020001 */
+   {0x0F007020, 0x04030107},  /* Normal - 0x04030107 POP - 0x05030107 */
{0x0F007024, 0x0207},
{0x0F007028, 0x02020202},
-   {0x0F00702c, 0x0206060a},//ROB- 0x0205050a,//0x0206060a
+   {0x0F00702c, 0x0206060a},  /* ROB - 0x0205050a,0x0206060a */
{0x0F007030, 0x0500},
{0x0F007034, 0x0003},
-   {0x0F007038, 0x110a0200},//ROB - 0x110a0200,//0x180a0200,// 0x1f0a0200
-   {0x0F00703C, 0x02101010},//ROB - 0x02101010,//0x02101018},
-   {0x0F007040, 0x45751200},//ROB - 0x45751200,//0x450f1200},
-   {0x0F007044, 0x110a0d00},//ROB - 0x110a0d00//0x111f0d00
+   {0x0F007038, 0x110a0200},  /* ROB - 0x110a0200,0x180a0200, 0x1f0a0200 */
+   {0x0F00703C, 0x02101010},  /* ROB - 0x02101010,0x02101018}, */
+   {0x0F007040, 0x45751200},  /* ROB - 0x45751200,0x450f1200}, */
+   {0x0F007044, 0x110a0d00},  /* ROB - 0x110a0d00//0x111f0d00 */
{0x0F007048, 0x081b0306},
{0x0F00704c, 0x},
{0x0F007050, 0x001c},
@@ -56,16 +54,13 @@ static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = {// 
 # DPLL Clock Se
{0x0F00707C, 0x},
{0x0F007080, 0x},
{0x0F007084, 0x},
-   //# Enable BW improvement within memory controller
-   {0x0F007094, 0x0104},
-   //# Enable 2 ports within X-bar
-   {0x0F00A000, 0x0016},
-   //# Enable start bit within memory controller
-   {0x0F007018, 0x0101}
+   {0x0F007094, 0x0104},  /* Enable BW improvement within memory 
controller */
+   {0x0F00A000, 0x0016},  /* Enable 2 ports within X-bar */
+   {0x0F007018, 0x0101}   /* Enable start bit within memory controller 
*/
 };
-//80Mhz
-#define T3_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 10  //index for 0x0F007000
-static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = {//   # DPLL Clock 
Setting
+/* 80Mhz-T3 */
+#define T3_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 10  /* index for 0x0F007000 */
+static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = {  /* DPLL Clock 
Setting */
{0x0f000810, 0x0F95},
{0x0f000820, 0x07f1},
{0x0f000860, 0x},
@@ -76,8 +71,7 @@ static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = {//   
# DPLL Clock Settin
{0x0F00a080, 0x1C00},
{0x0F00a000, 0x0016},
{0x0F00a04C, 0x000C},
-   //Memcontroller Default values
-   {0x0F007000, 0x00010001},
+   {0x0F007000, 0x00010001},  /* Memcontroller Default values */
{0x0F007004, 0x0100},
{0x0F007008, 0x0101},
{0x0F00700c, 0x},
@@ -112,38 +106,34 @@ static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = 
{//   # DPLL Clock Settin
{0x0F007080, 0x},
{0x0F007084, 0x},
{0x0F007094, 0x0104},

[PATCH 7/7] Staging: bcm: DDRInit: fixed a space coding style issue

2013-12-10 Thread Gary Rookard
Fixed a coding style issue.

Signed-off-by: Gary Alan Rookard 
---
On branch staging-next
 drivers/staging/bcm/DDRInit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index 100ddf9..43de518 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -3,7 +3,7 @@
 
 
 #define DDR_DUMP_INTERNAL_DEVICE_MEMORY 0xBFC02B00
-#define MIPS_CLOCK_REG 0x0f000820
+#define MIPS_CLOCK_REG 0x0f000820
 
 /* DDR INIT-133Mhz */
 #define T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 12  /*index for 0x0F007000 */
-- 
1.8.4

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


[PATCH 5/7] Staging: bcm: DDRInit: fixed comment coding style issues

2013-12-10 Thread Gary Rookard
Fixed coding style issues.

Signed-off-by: Gary Alan Rookard 
---
On branch staging-next
 drivers/staging/bcm/DDRInit.c | 337 +++---
 1 file changed, 148 insertions(+), 189 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index 8408640..53f7191 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -5,41 +5,39 @@
 #define DDR_DUMP_INTERNAL_DEVICE_MEMORY 0xBFC02B00
 #define MIPS_CLOCK_REG 0x0f000820
 
-//DDR INIT-133Mhz
-#define T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 12  //index for 0x0F007000
-static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = {//  # DPLL Clock 
Setting
+/* DDR INIT-133Mhz */
+#define T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 12  /*index for 0x0F007000 */
+static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = {  /* DPLL Clock 
Setting */
{0x0F000800, 0x7212},
{0x0f000820, 0x07F13FFF},
{0x0f000810, 0x0F95},
{0x0f000860, 0x},
{0x0f000880, 0x03DD},
-   // Changed source for X-bar and MIPS clock to APLL
-   {0x0f000840, 0x0FFF1B00},
+   {0x0f000840, 0x0FFF1B00},  /* Changed source for X-bar and MIPS clock 
to APLL */
{0x0f000870, 0x0002},
{0x0F00a044, 0x1fff},
{0x0F00a040, 0x1f00},
{0x0F00a084, 0x1Cff},
{0x0F00a080, 0x1C00},
{0x0F00a04C, 0x000C},
-   //Memcontroller Default values
-   {0x0F007000, 0x00010001},
+   {0x0F007000, 0x00010001},  /* Memcontroller Default values */
{0x0F007004, 0x01010100},
{0x0F007008, 0x0101},
{0x0F00700c, 0x},
{0x0F007010, 0x0100},
{0x0F007014, 0x01000100},
{0x0F007018, 0x0100},
-   {0x0F00701c, 0x01020001},// POP - 0x00020001 Normal 0x01020001
-   {0x0F007020, 0x04030107}, //Normal - 0x04030107 POP - 0x05030107
+   {0x0F00701c, 0x01020001},  /* POP - 0x00020001 Normal - 0x01020001 */
+   {0x0F007020, 0x04030107},  /* Normal - 0x04030107 POP - 0x05030107 */
{0x0F007024, 0x0207},
{0x0F007028, 0x02020202},
-   {0x0F00702c, 0x0206060a},//ROB- 0x0205050a,//0x0206060a
+   {0x0F00702c, 0x0206060a},  /* ROB - 0x0205050a,0x0206060a */
{0x0F007030, 0x0500},
{0x0F007034, 0x0003},
-   {0x0F007038, 0x110a0200},//ROB - 0x110a0200,//0x180a0200,// 0x1f0a0200
-   {0x0F00703C, 0x02101010},//ROB - 0x02101010,//0x02101018},
-   {0x0F007040, 0x45751200},//ROB - 0x45751200,//0x450f1200},
-   {0x0F007044, 0x110a0d00},//ROB - 0x110a0d00//0x111f0d00
+   {0x0F007038, 0x110a0200},  /* ROB - 0x110a0200,0x180a0200, 0x1f0a0200 */
+   {0x0F00703C, 0x02101010},  /* ROB - 0x02101010,0x02101018 */
+   {0x0F007040, 0x45751200},  /* ROB - 0x45751200,0x450f1200 */
+   {0x0F007044, 0x110a0d00},  /* ROB - 0x110a0d00 0x111f0d00 */
{0x0F007048, 0x081b0306},
{0x0F00704c, 0x},
{0x0F007050, 0x001c},
@@ -56,16 +54,13 @@ static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = {// 
 # DPLL Clock Se
{0x0F00707C, 0x},
{0x0F007080, 0x},
{0x0F007084, 0x},
-   //# Enable BW improvement within memory controller
-   {0x0F007094, 0x0104},
-   //# Enable 2 ports within X-bar
-   {0x0F00A000, 0x0016},
-   //# Enable start bit within memory controller
-   {0x0F007018, 0x0101}
+   {0x0F007094, 0x0104},  /* Enable BW improvement within memory 
controller */
+   {0x0F00A000, 0x0016},  /* Enable 2 ports within X-bar */
+   {0x0F007018, 0x0101}   /* Enable start bit within memory controller 
*/
 };
-//80Mhz
-#define T3_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 10  //index for 0x0F007000
-static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = {//   # DPLL Clock 
Setting
+/* 80Mhz-T3 */
+#define T3_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 10  /* index for 0x0F007000 */
+static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = {  /* DPLL Clock 
Setting */
{0x0f000810, 0x0F95},
{0x0f000820, 0x07f1},
{0x0f000860, 0x},
@@ -76,8 +71,7 @@ static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = {//   
# DPLL Clock Settin
{0x0F00a080, 0x1C00},
{0x0F00a000, 0x0016},
{0x0F00a04C, 0x000C},
-   //Memcontroller Default values
-   {0x0F007000, 0x00010001},
+   {0x0F007000, 0x00010001},  /* Memcontroller Default values */
{0x0F007004, 0x0100},
{0x0F007008, 0x0101},
{0x0F00700c, 0x},
@@ -112,38 +106,34 @@ static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = 
{//   # DPLL Clock Settin
{0x0F007080, 0x},
{0x0F007084, 0x},
{0x0F007094, 0x0104},
-   //# Enable start bit within memory controller
-   {0x0F007018, 0x0101}
+   {0x0F007018, 0x0101}   /* Enable start bit within memory controller 
*/
 };
-//100Mhz
-#def

[PATCH 6/7] Staging: bcm: DDRInit: fixed semicolon coding style issues

2013-12-10 Thread Gary Rookard
Fixed coding style issues.

Signed-off-by: Gary Alan Rookard 
---
On branch staging-next
 drivers/staging/bcm/DDRInit.c | 30 +++---
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index 53f7191..100ddf9 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -1037,20 +1037,20 @@ int download_ddr_settings(struct bcm_mini_adapter 
*Adapter)
case DDR_80_MHZ:
psDDRSetting = asT3LP_DDRSetting80MHz;
RegCount = ARRAY_SIZE(asT3LP_DDRSetting80MHz);
-   RegCount -= T3LP_SKIP_CLOCK_PROGRAM_DUMP_80MHZ ;
+   RegCount -= T3LP_SKIP_CLOCK_PROGRAM_DUMP_80MHZ;
psDDRSetting += T3LP_SKIP_CLOCK_PROGRAM_DUMP_80MHZ;
break;
case DDR_100_MHZ:
psDDRSetting = asT3LP_DDRSetting100MHz;
RegCount = ARRAY_SIZE(asT3LP_DDRSetting100MHz);
-   RegCount -= T3LP_SKIP_CLOCK_PROGRAM_DUMP_100MHZ ;
+   RegCount -= T3LP_SKIP_CLOCK_PROGRAM_DUMP_100MHZ;
psDDRSetting += T3LP_SKIP_CLOCK_PROGRAM_DUMP_100MHZ;
break;
case DDR_133_MHZ:
bOverrideSelfRefresh = TRUE;
psDDRSetting = asT3LP_DDRSetting133MHz;
RegCount = ARRAY_SIZE(asT3LP_DDRSetting133MHz);
-   RegCount -= T3LP_SKIP_CLOCK_PROGRAM_DUMP_133MHZ ;
+   RegCount -= T3LP_SKIP_CLOCK_PROGRAM_DUMP_133MHZ;
psDDRSetting += T3LP_SKIP_CLOCK_PROGRAM_DUMP_133MHZ;
break;
default:
@@ -1067,20 +1067,20 @@ int download_ddr_settings(struct bcm_mini_adapter 
*Adapter)
case DDR_80_MHZ:
psDDRSetting = asT3LPB_DDRSetting80MHz;
RegCount = ARRAY_SIZE(asT3LPB_DDRSetting80MHz);
-   RegCount -= T3LPB_SKIP_CLOCK_PROGRAM_DUMP_80MHZ ;
+   RegCount -= T3LPB_SKIP_CLOCK_PROGRAM_DUMP_80MHZ;
psDDRSetting += T3LPB_SKIP_CLOCK_PROGRAM_DUMP_80MHZ;
break;
case DDR_100_MHZ:
psDDRSetting = asT3LPB_DDRSetting100MHz;
RegCount = ARRAY_SIZE(asT3LPB_DDRSetting100MHz);
-   RegCount -= T3LPB_SKIP_CLOCK_PROGRAM_DUMP_100MHZ ;
+   RegCount -= T3LPB_SKIP_CLOCK_PROGRAM_DUMP_100MHZ;
psDDRSetting += T3LPB_SKIP_CLOCK_PROGRAM_DUMP_100MHZ;
break;
case DDR_133_MHZ:
bOverrideSelfRefresh = TRUE;
psDDRSetting = asT3LPB_DDRSetting133MHz;
RegCount = ARRAY_SIZE(asT3LPB_DDRSetting133MHz);
-   RegCount -= T3LPB_SKIP_CLOCK_PROGRAM_DUMP_133MHZ ;
+   RegCount -= T3LPB_SKIP_CLOCK_PROGRAM_DUMP_133MHZ;
psDDRSetting += T3LPB_SKIP_CLOCK_PROGRAM_DUMP_133MHZ;
break;
 
@@ -1101,20 +1101,20 @@ int download_ddr_settings(struct bcm_mini_adapter 
*Adapter)
case DDR_80_MHZ:
psDDRSetting = asT3_DDRSetting80MHz;
RegCount = ARRAY_SIZE(asT3_DDRSetting80MHz);
-   RegCount -= T3_SKIP_CLOCK_PROGRAM_DUMP_80MHZ ;
+   RegCount -= T3_SKIP_CLOCK_PROGRAM_DUMP_80MHZ;
psDDRSetting += T3_SKIP_CLOCK_PROGRAM_DUMP_80MHZ;
break;
case DDR_100_MHZ:
psDDRSetting = asT3_DDRSetting100MHz;
RegCount = ARRAY_SIZE(asT3_DDRSetting100MHz);
-   RegCount -= T3_SKIP_CLOCK_PROGRAM_DUMP_100MHZ ;
+   RegCount -= T3_SKIP_CLOCK_PROGRAM_DUMP_100MHZ;
psDDRSetting += T3_SKIP_CLOCK_PROGRAM_DUMP_100MHZ;
break;
case DDR_133_MHZ:
psDDRSetting = asT3_DDRSetting133MHz;
RegCount = ARRAY_SIZE(asT3_DDRSetting133MHz);
-   RegCount -= T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ ;
-   psDDRSetting += T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ ;
+   RegCount -= T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ;
+   psDDRSetting += T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ;
break;
default:
return -EINVAL;
@@ -1126,20 +1126,20 @@ int download_ddr_settings(struct bcm_mini_adapter 
*Adapter)
case DDR_80_MHZ:
psDDRSetting = asT3B_DDRSetting80MHz;
RegCount = ARRAY_SIZE(asT3B_DDRSetting80MHz);
-   RegCount -= T3B_SKI

[PATCH 4/7] Staging: bcm: DDRInit: fixed parentheses coding style issues

2013-12-10 Thread Gary Rookard
Fixed coding style issues

Signed-off-by: Gary Alan Rookard 
---
On branch staging-next
 drivers/staging/bcm/DDRInit.c | 99 +--
 1 file changed, 49 insertions(+), 50 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index a177cfe..8408640 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -798,7 +798,7 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
psDDRSetting = asT3LP_DDRSetting133MHz;
RegCount = (sizeof(asT3LP_DDRSetting133MHz)/
sizeof(struct bcm_ddr_setting));
-   if(Adapter->bMipsConfig == MIPS_200_MHZ)
+   if (Adapter->bMipsConfig == MIPS_200_MHZ)
uiClockSetting = 0x03F13652;
else
uiClockSetting = 0x03F1365B;
@@ -816,22 +816,22 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
/* Set bit 2 and bit 6 to 1 for BBIC 2mA drive
 * (please check current value and additionally set these bits)
 */
-   if( (Adapter->chip_id !=  BCS220_2) &&
+   if ((Adapter->chip_id !=  BCS220_2) &&
(Adapter->chip_id !=  BCS220_2BC) &&
-   (Adapter->chip_id != BCS220_3) ) {
+   (Adapter->chip_id != BCS220_3)) {
retval = rdmalt(Adapter, (UINT)0x0f000830, 
&uiResetValue, sizeof(uiResetValue));
-   if(retval < 0) {
+   if (retval < 0) {
BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, 
DBG_LVL_ALL, "%s:%d RDM failed\n", __func__, __LINE__);
return retval;
}
uiResetValue |= 0x44;
retval = wrmalt(Adapter, (UINT)0x0f000830, 
&uiResetValue, sizeof(uiResetValue));
-   if(retval < 0) {
+   if (retval < 0) {
BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, 
DBG_LVL_ALL, "%s:%d RDM failed\n", __func__, __LINE__);
return retval;
}
}
-   switch(Adapter->DDRSetting) {
+   switch (Adapter->DDRSetting) {
case DDR_80_MHZ:
psDDRSetting = asT3LPB_DDRSetting80MHz;
RegCount = (sizeof(asT3B_DDRSetting80MHz)/
@@ -847,7 +847,7 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
RegCount = (sizeof(asT3B_DDRSetting133MHz)/
sizeof(struct bcm_ddr_setting));
 
-   if(Adapter->bMipsConfig == MIPS_200_MHZ)
+   if (Adapter->bMipsConfig == MIPS_200_MHZ)
uiClockSetting = 0x03F13652;
else
uiClockSetting = 0x03F1365B;
@@ -857,7 +857,7 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
psDDRSetting = asT3LPB_DDRSetting160MHz;
RegCount = 
sizeof(asT3LPB_DDRSetting160MHz)/sizeof(struct bcm_ddr_setting);
 
-   if(Adapter->bMipsConfig == MIPS_200_MHZ)
+   if (Adapter->bMipsConfig == MIPS_200_MHZ)
uiClockSetting = 0x03F137D2;
else
uiClockSetting = 0x03F137DB;
@@ -902,10 +902,9 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
RegCount = (sizeof(asT3B_DDRSetting100MHz)/
sizeof(struct bcm_ddr_setting));
break;
-   case DDR_133_MHZ:
+   case DDR_133_MHZ:
 
-   if(Adapter->bDPLLConfig == PLL_266_MHZ) {//266Mhz PLL 
selected.
-   
+   if (Adapter->bDPLLConfig == PLL_266_MHZ) {  //266Mhz 
PLL selected.
memcpy(asT3B_DDRSetting133MHz, asDPLL_266MHZ,
sizeof(asDPLL_266MHZ));
psDDRSetting = asT3B_DDRSetting133MHz;
@@ -915,7 +914,7 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
psDDRSetting = asT3B_DDRSetting133MHz;
RegCount = (sizeof(asT3B_DDRSetting133MHz)/
sizeof(struct bcm_ddr_setting));
-   if(Adapter->bMipsConfig == MIPS_200_MHZ) 
+   if (Adapter->bMipsConfig == MIPS_200_MHZ)
uiClockSetting = 0x07F13652;
else
uiClockSetting = 0x07F1365B;
@@ -926,22 +925,22 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
}
b

[PATCH 3/7] Staging: bcm: DDRInit: fixed brace coding style issues

2013-12-10 Thread Gary Rookard
Fixed coding style issues

Signed-off-by: Gary Alan Rookard chip_id)
-   {
+   switch (Adapter->chip_id) {
case 0xbece3200:
-   switch (Adapter->DDRSetting)
-   {
+   switch (Adapter->DDRSetting) {
case DDR_80_MHZ:
psDDRSetting = asT3LP_DDRSetting80MHz;
RegCount = (sizeof(asT3LP_DDRSetting80MHz)/
@@ -801,13 +799,9 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
RegCount = (sizeof(asT3LP_DDRSetting133MHz)/
sizeof(struct bcm_ddr_setting));
if(Adapter->bMipsConfig == MIPS_200_MHZ)
-   {
uiClockSetting = 0x03F13652;
-   }
else
-   {
uiClockSetting = 0x03F1365B;
-   }
break;
default:
return -EINVAL;
@@ -824,8 +818,7 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
 */
if( (Adapter->chip_id !=  BCS220_2) &&
(Adapter->chip_id !=  BCS220_2BC) &&
-   (Adapter->chip_id != BCS220_3) )
-   {
+   (Adapter->chip_id != BCS220_3) ) {
retval = rdmalt(Adapter, (UINT)0x0f000830, 
&uiResetValue, sizeof(uiResetValue));
if(retval < 0) {
BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, 
DBG_LVL_ALL, "%s:%d RDM failed\n", __func__, __LINE__);
@@ -837,12 +830,8 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, 
DBG_LVL_ALL, "%s:%d RDM failed\n", __func__, __LINE__);
return retval;
}
-   }
-   switch(Adapter->DDRSetting)
-   {
-
-
-
+   }
+   switch(Adapter->DDRSetting) {
case DDR_80_MHZ:
psDDRSetting = asT3LPB_DDRSetting80MHz;
RegCount = (sizeof(asT3B_DDRSetting80MHz)/
@@ -859,13 +848,9 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
sizeof(struct bcm_ddr_setting));
 
if(Adapter->bMipsConfig == MIPS_200_MHZ)
-   {
-   uiClockSetting = 0x03F13652;
-   }
+   uiClockSetting = 0x03F13652;
else
-   {
uiClockSetting = 0x03F1365B;
-   }
break;
 
case DDR_160_MHZ:
@@ -873,14 +858,10 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
RegCount = 
sizeof(asT3LPB_DDRSetting160MHz)/sizeof(struct bcm_ddr_setting);
 
if(Adapter->bMipsConfig == MIPS_200_MHZ)
-   {
uiClockSetting = 0x03F137D2;
-   }
else
-   {
uiClockSetting = 0x03F137DB;
-   }
-   }
+   }
break;
 
case 0xbece0110:
@@ -889,8 +870,7 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
case 0xbece0130:
case 0xbece0300:
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, 
"DDR Setting: %x\n", Adapter->DDRSetting);
-   switch (Adapter->DDRSetting)
-   {
+   switch (Adapter->DDRSetting) {
case DDR_80_MHZ:
psDDRSetting = asT3_DDRSetting80MHz;
RegCount = (sizeof(asT3_DDRSetting80MHz)/
@@ -910,9 +890,8 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
return -EINVAL;
}
case 0xbece0310:
-   {
-   switch (Adapter->DDRSetting)
-   {
+
+   switch (Adapter->DDRSetting) {
case DDR_80_MHZ:
psDDRSetting = asT3B_DDRSetting80MHz;
RegCount = (sizeof(asT3B_DDRSetting80MHz)/
@@ -925,51 +904,42 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
break;
case DDR_133_MHZ:
 
-   if(Adapter->bDPLLConfig == PLL_266_MHZ)//266Mhz PLL 
selected.
-   {
+   if(Adapter->bDPLLConfig == PLL_266_MHZ) {//266Mhz PLL 
selected.
+   
memcpy(asT3B_DDRSetting133MHz, asDPLL_266MHZ,
sizeof(asDPLL_266MHZ));
psDDRSetting = asT3B_DDRSetting

[PATCH 0/7] Staging: bcm: DDRInit: Fixed issues in coding style.

2013-12-10 Thread Gary Rookard
This patchset is an attempt to fix the coding style
issues found in the file DDRInit.c

Gary Rookard (7):
  Staging: bcm: DDRinit: fixed indentation coding style issues
  Staging: bcm: DDRInit: fixed spacing coding style issues
  Staging: bcm: DDRInit: fixed brace coding style issues
  Staging: bcm: DDRInit: fixed parentheses coding style issues
  Staging: bcm: DDRInit: fixed comment coding style issues
  Staging: bcm: DDRInit: fixed semicolon coding style issues
  Staging: bcm: DDRInit: fixed a space coding style issue

 drivers/staging/bcm/DDRInit.c | 2115 -
 1 file changed, 1013 insertions(+), 1102 deletions(-)

-- 
1.8.4

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


[PATCH 11/11] Staging: bcm: DDRInint: tidy up indent issue.

2013-12-07 Thread Gary Rookard
This is the eleventh patch of a series.

Signed-off-by: Gary Alan Rookard 
---
On branch staging-next
 drivers/staging/bcm/DDRInit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index 96afa15..323570f 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -836,7 +836,7 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
case DDR_100_MHZ:
psDDRSetting = asT3B_DDRSetting100MHz;
RegCount = (sizeof(asT3B_DDRSetting100MHz)/
-   sizeof(struct bcm_ddr_setting));
+   sizeof(struct bcm_ddr_setting));
break;
case DDR_133_MHZ:
if (Adapter->bDPLLConfig == PLL_266_MHZ) {  /*266Mhz 
PLL selected. */
-- 
1.8.4

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


[PATCH 03/10] Staging: bcm: DDRInit: added space after commas.

2013-12-06 Thread Gary Rookard
This is the third patch of a series.

Signed-off-by: Gary Alan Rookard 

---
On branch staging-next
 drivers/staging/bcm/DDRInit.c | 1332 -
 1 file changed, 666 insertions(+), 666 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index e014759..ed4dfe9 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -8,526 +8,526 @@
 //DDR INIT-133Mhz
 #define T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 12  //index for 0x0F007000
 static struct bcm_ddr_setting asT3_DDRSetting133MHz[]= {//  # DPLL Clock 
Setting
-   {0x0F000800,0x7212},
-   {0x0f000820,0x07F13FFF},
-   {0x0f000810,0x0F95},
-   {0x0f000860,0x},
-   {0x0f000880,0x03DD},
+   {0x0F000800, 0x7212},
+   {0x0f000820, 0x07F13FFF},
+   {0x0f000810, 0x0F95},
+   {0x0f000860, 0x},
+   {0x0f000880, 0x03DD},
 // Changed source for X-bar and MIPS 
clock to APLL
-   {0x0f000840,0x0FFF1B00},
-   {0x0f000870,0x0002},
-   {0x0F00a044,0x1fff},
-   {0x0F00a040,0x1f00},
-   {0x0F00a084,0x1Cff},
-   {0x0F00a080,0x1C00},
-   {0x0F00a04C,0x000C},
+   {0x0f000840, 0x0FFF1B00},
+   {0x0f000870, 0x0002},
+   {0x0F00a044, 0x1fff},
+   {0x0F00a040, 0x1f00},
+   {0x0F00a084, 0x1Cff},
+   {0x0F00a080, 0x1C00},
+   {0x0F00a04C, 0x000C},
 //Memcontroller Default values
-   {0x0F007000,0x00010001},
-   {0x0F007004,0x01010100},
-   {0x0F007008,0x0101},
-   {0x0F00700c,0x},
-   {0x0F007010,0x0100},
-   {0x0F007014,0x01000100},
-   {0x0F007018,0x0100},
-   {0x0F00701c,0x01020001},// POP - 0x00020001 Normal 0x01020001
-   {0x0F007020,0x04030107}, //Normal - 0x04030107 POP - 0x05030107
-   {0x0F007024,0x0207},
-   {0x0F007028,0x02020202},
-   {0x0F00702c,0x0206060a},//ROB- 0x0205050a,//0x0206060a
-   {0x0F007030,0x0500},
-   {0x0F007034,0x0003};
-   {0x0F007038,0x110a0200},//ROB - 0x110a0200,//0x180a0200,// 0x1f0a0200
-   {0x0F00703C,0x02101010},//ROB - 0x02101010,//0x02101018},
-   {0x0F007040,0x45751200},//ROB - 0x45751200,//0x450f1200},
-   {0x0F007044,0x110a0d00},//ROB - 0x110a0d00//0x111f0d00
-   {0x0F007048,0x081b0306},
-   {0x0F00704c,0x},
-   {0x0F007050,0x001c},
-   {0x0F007054,0x},
-   {0x0F007058,0x},
-   {0x0F00705c,0x},
-   {0x0F007060,0x0010246c},
-   {0x0F007064,0x0010},
-   {0x0F007068,0x},
-   {0x0F00706c,0x0001},
-   {0x0F007070,0x7000},
-   {0x0F007074,0x},
-   {0x0F007078,0x},
-   {0x0F00707C,0x},
-   {0x0F007080,0x},
-   {0x0F007084,0x},
+   {0x0F007000, 0x00010001},
+   {0x0F007004, 0x01010100},
+   {0x0F007008, 0x0101},
+   {0x0F00700c, 0x},
+   {0x0F007010, 0x0100},
+   {0x0F007014, 0x01000100},
+   {0x0F007018, 0x0100},
+   {0x0F00701c, 0x01020001},// POP - 0x00020001 Normal 0x01020001
+   {0x0F007020, 0x04030107}, //Normal - 0x04030107 POP - 0x05030107
+   {0x0F007024, 0x0207},
+   {0x0F007028, 0x02020202},
+   {0x0F00702c, 0x0206060a},//ROB- 0x0205050a,//0x0206060a
+   {0x0F007030, 0x0500},
+   {0x0F007034, 0x0003};
+   {0x0F007038, 0x110a0200},//ROB - 0x110a0200,//0x180a0200,// 0x1f0a0200
+   {0x0F00703C, 0x02101010},//ROB - 0x02101010,//0x02101018},
+   {0x0F007040, 0x45751200},//ROB - 0x45751200,//0x450f1200},
+   {0x0F007044, 0x110a0d00},//ROB - 0x110a0d00//0x111f0d00
+   {0x0F007048, 0x081b0306},
+   {0x0F00704c, 0x},
+   {0x0F007050, 0x001c},
+   {0x0F007054, 0x},
+   {0x0F007058, 0x},
+   {0x0F00705c, 0x},
+   {0x0F007060, 0x0010246c},
+   {0x0F007064, 0x0010},
+   {0x0F007068, 0x},
+   {0x0F00706c, 0x0001},
+   {0x0F007070, 0x7000},
+   {0x0F007074, 0x},
+   {0x0F007078, 0x},
+   {0x0F00707C, 0x},
+   {0x0F007080, 0x},
+   {0x0F007084, 0x},
 //# Enable BW improvement within 
memory controller
-   {0x0F007094,0x0104},
+   {0x0F007094, 0x0104},
 //# Enable 2 ports within X-bar
-   {0x0F00A000,0x0016},
+   {0x0F00A000, 0x0016},
 //# Enable start bit within memory 
controller
-   {0x0F007018,0x0101}
+   {0x0F007018, 0x0101}
 };
 //80Mhz
 #define T3_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 10  //index for 0x0F007000
 static struct bcm_ddr_setting asT3_DDRSetting80MHz[]= {//   # DPLL Cloc

[PATCH 10/10] Staging: bcm: DDRInit: tidy up comments.

2013-12-06 Thread Gary Rookard
This is the tenth patch of a series.

Signed-off-by:Gary Alan Rookard 
---
On branch staging-next
 drivers/staging/bcm/DDRInit.c | 231 +-
 1 file changed, 116 insertions(+), 115 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index 1b73819..96afa15 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -7,37 +7,37 @@
 
 /* DDR INIT-133Mhz */
 #define T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 12  /* index for 0x0F007000 */
-static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = { /* # DPLL Clock 
Setting */
+static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = {  /* # DPLL Clock 
Setting */
{0x0F000800, 0x7212},
{0x0f000820, 0x07F13FFF},
{0x0f000810, 0x0F95},
{0x0f000860, 0x},
{0x0f000880, 0x03DD},
-   {0x0f000840, 0x0FFF1B00},   /* Changed source for X-bar and MIPS 
clock to APLL */
+   {0x0f000840, 0x0FFF1B00},  /* Changed source for X-bar and MIPS clock 
to APLL */
{0x0f000870, 0x0002},
{0x0F00a044, 0x1fff},
{0x0F00a040, 0x1f00},
{0x0F00a084, 0x1Cff},
{0x0F00a080, 0x1C00},
{0x0F00a04C, 0x000C},
-   {0x0F007000, 0x00010001},   /* Memcontroller Default values */
+   {0x0F007000, 0x00010001},  /* Memcontroller Default values */
{0x0F007004, 0x01010100},
{0x0F007008, 0x0101},
{0x0F00700c, 0x},
{0x0F007010, 0x0100},
{0x0F007014, 0x01000100},
{0x0F007018, 0x0100},
-   {0x0F00701c, 0x01020001},/*  POP - 0x00020001 Normal 0x01020001 */
-   {0x0F007020, 0x04030107}, /* Normal - 0x04030107 POP - 0x05030107 */
+   {0x0F00701c, 0x01020001},  /*  POP - 0x00020001 Normal 0x01020001 */
+   {0x0F007020, 0x04030107},  /* Normal - 0x04030107 POP - 0x05030107 */
{0x0F007024, 0x0207},
{0x0F007028, 0x02020202},
-   {0x0F00702c, 0x0206060a},/* ROB- 0x0205050a,0x0206060a */
+   {0x0F00702c, 0x0206060a},  /* ROB- 0x0205050a,0x0206060a */
{0x0F007030, 0x0500},
{0x0F007034, 0x0003};
-   {0x0F007038, 0x110a0200},/* ROB - 0x110a0200,0x180a0200,0x1f0a0200 */
-   {0x0F00703C, 0x02101010},/* ROB - 0x02101010,0x02101018}, */
-   {0x0F007040, 0x45751200},/* ROB - 0x45751200,0x450f1200}, */
-   {0x0F007044, 0x110a0d00},/*ROB - 0x110a0d00.0x111f0d00 */
+   {0x0F007038, 0x110a0200},  /* ROB - 0x110a0200,0x180a0200,0x1f0a0200 */
+   {0x0F00703C, 0x02101010},  /* ROB - 0x02101010,0x02101018}, */
+   {0x0F007040, 0x45751200},  /* ROB - 0x45751200,0x450f1200}, */
+   {0x0F007044, 0x110a0d00},  /*ROB - 0x110a0d00.0x111f0d00 */
{0x0F007048, 0x081b0306},
{0x0F00704c, 0x},
{0x0F007050, 0x001c},
@@ -54,13 +54,13 @@ static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = {   
  /* # DPLL Clock Se
{0x0F00707C, 0x},
{0x0F007080, 0x},
{0x0F007084, 0x},
-   {0x0F007094, 0x0104},   /* # Enable BW improvement within 
memory controller */
-   {0x0F00A000, 0x0016},   /* # Enable 2 ports within X-bar */
-   {0x0F007018, 0x0101}/* # Enable start bit within memory 
controller */
+   {0x0F007094, 0x0104},  /* # Enable BW improvement within memory 
controller */
+   {0x0F00A000, 0x0016},  /* # Enable 2 ports within X-bar */
+   {0x0F007018, 0x0101}   /* # Enable start bit within memory 
controller */
 };
 /* 80Mhz */
 #define T3_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 10  /* index for 0x0F007000 */
-static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = { /*  # DPLL Clock 
Setting */
+static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = {  /*  # DPLL Clock 
Setting */
{0x0f000810, 0x0F95},
{0x0f000820, 0x07f1},
{0x0f000860, 0x},
@@ -106,18 +106,18 @@ static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = { 
/*  # DPLL Clock Settin
{0x0F007080, 0x},
{0x0F007084, 0x},
{0x0F007094, 0x0104},
-   {0x0F007018, 0x0101}/* # Enable start bit within memory 
controller */
+   {0x0F007018, 0x0101}   /* # Enable start bit within memory 
controller */
 };
 /* 100Mhz */
 #define T3_SKIP_CLOCK_PROGRAM_DUMP_100MHZ 13  /* index for 0x0F007000 */
-static struct bcm_ddr_setting asT3_DDRSetting100MHz[] = {/*  # DPLL Clock 
Setting */
+static struct bcm_ddr_setting asT3_DDRSetting100MHz[] = {  /* # DPLL Clock 
Setting */
{0x0F000800, 0x7008},
{0x0f000810, 0x0F95},
{0x0f000820, 0x07F13E3F},
{0x0f000860, 0x},
{0x0f000880, 0x03DD},
-   {0x0f000840, 0x0FFF1B00}, /* Changed source for X-bar and MIPS clock to 
APLL */
-   /* 0x0f000840,0x0FFF1800, */
+   {0x0f000840, 0x0FFF1B00},  /* Changed source for X-bar and MIPS clock 
to APLL */
+

[PATCH 5/9] Staging: bcm: DDRInit: replaced C99 comments.

2013-12-06 Thread Gary Rookard
This is the fifth patch of a series.

Signed-off-by: Gary Alan Rookard 
---
On branch staging-next
 drivers/staging/bcm/DDRInit.c | 270 +-
 1 file changed, 135 insertions(+), 135 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index cb4dd53..1a08b17 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -5,15 +5,15 @@
 #define DDR_DUMP_INTERNAL_DEVICE_MEMORY 0xBFC02B00
 #define MIPS_CLOCK_REG 0x0f000820
 
-//DDR INIT-133Mhz
-#define T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 12  //index for 0x0F007000
-static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = {//  # DPLL Clock 
Setting
+/* DDR INIT-133Mhz */
+#define T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 12  /* index for 0x0F00700 */0
+static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = { /* # DPLL Clock 
Setting */
{0x0F000800, 0x7212},
{0x0f000820, 0x07F13FFF},
{0x0f000810, 0x0F95},
{0x0f000860, 0x},
{0x0f000880, 0x03DD},
-// Changed source for X-bar and MIPS 
clock to APLL
+/* Changed source for X-bar and MIPS 
clock to APLL */
{0x0f000840, 0x0FFF1B00},
{0x0f000870, 0x0002},
{0x0F00a044, 0x1fff},
@@ -21,7 +21,7 @@ static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = {//   
   # DPLL Clock Se
{0x0F00a084, 0x1Cff},
{0x0F00a080, 0x1C00},
{0x0F00a04C, 0x000C},
-//Memcontroller Default values
+/* Memcontroller Default values */
{0x0F007000, 0x00010001},
{0x0F007004, 0x01010100},
{0x0F007008, 0x0101},
@@ -29,17 +29,17 @@ static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = {// 
 # DPLL Clock Se
{0x0F007010, 0x0100},
{0x0F007014, 0x01000100},
{0x0F007018, 0x0100},
-   {0x0F00701c, 0x01020001},// POP - 0x00020001 Normal 0x01020001
-   {0x0F007020, 0x04030107}, //Normal - 0x04030107 POP - 0x05030107
+   {0x0F00701c, 0x01020001},/*  POP - 0x00020001 Normal 0x01020001 */
+   {0x0F007020, 0x04030107}, /* Normal - 0x04030107 POP - 0x05030107 */
{0x0F007024, 0x0207},
{0x0F007028, 0x02020202},
-   {0x0F00702c, 0x0206060a},//ROB- 0x0205050a,//0x0206060a
+   {0x0F00702c, 0x0206060a},/* ROB- 0x0205050a,0x0206060a */
{0x0F007030, 0x0500},
{0x0F007034, 0x0003};
-   {0x0F007038, 0x110a0200},//ROB - 0x110a0200,//0x180a0200,// 0x1f0a0200
-   {0x0F00703C, 0x02101010},//ROB - 0x02101010,//0x02101018},
-   {0x0F007040, 0x45751200},//ROB - 0x45751200,//0x450f1200},
-   {0x0F007044, 0x110a0d00},//ROB - 0x110a0d00//0x111f0d00
+   {0x0F007038, 0x110a0200},/* ROB - 0x110a0200,0x180a0200,0x1f0a0200 */
+   {0x0F00703C, 0x02101010},/* ROB - 0x02101010,0x02101018}, */
+   {0x0F007040, 0x45751200},/* ROB - 0x45751200,0x450f1200}, */
+   {0x0F007044, 0x110a0d00},/*ROB - 0x110a0d00.0x111f0d00 */
{0x0F007048, 0x081b0306},
{0x0F00704c, 0x},
{0x0F007050, 0x001c},
@@ -56,16 +56,16 @@ static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = {// 
 # DPLL Clock Se
{0x0F00707C, 0x},
{0x0F007080, 0x},
{0x0F007084, 0x},
-//# Enable BW improvement within 
memory controller
+/* # Enable BW improvement within 
memory controller */
{0x0F007094, 0x0104},
-//# Enable 2 ports within X-bar
+/* # Enable 2 ports within X-bar */
{0x0F00A000, 0x0016},
-//# Enable start bit within memory 
controller
+/* # Enable start bit within memory 
controller */
{0x0F007018, 0x0101}
 };
-//80Mhz
-#define T3_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 10  //index for 0x0F007000
-static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = {//   # DPLL Clock 
Setting
+/* 80Mhz */
+#define T3_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 10  /* index for 0x0F007000 */
+static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = { /*  # DPLL Clock 
Setting */
{0x0f000810, 0x0F95},
{0x0f000820, 0x07f1},
{0x0f000860, 0x},
@@ -76,7 +76,7 @@ static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = {//   
# DPLL Clock Settin
{0x0F00a080, 0x1C00},
{0x0F00a000, 0x0016},
{0x0F00a04C, 0x000C},
-//Memcontroller Default values
+/* Memcontroller Default values */
{0x0F007000, 0x00010001},
{0x0F007004, 0x0100},
{0x0F007008, 0x0101},
@@ -112,19 +112,19 

[PATCH 9/9] Staging: bcm: DDRInit: removed space from front of semicolon.

2013-12-06 Thread Gary Rookard
This is the ninth patch of a series.

Signed-off-by: Gary Alan Rookard 

---
On branch staging-next
 drivers/staging/bcm/DDRInit.c | 30 +++---
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index c808bc5..1b73819 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -3,7 +3,7 @@
 
 
 #define DDR_DUMP_INTERNAL_DEVICE_MEMORY 0xBFC02B00
-#define MIPS_CLOCK_REG 0x0f000820
+#define MIPS_CLOCK_REG 0x0f000820
 
 /* DDR INIT-133Mhz */
 #define T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 12  /* index for 0x0F007000 */
@@ -1005,20 +1005,20 @@ int download_ddr_settings(struct bcm_mini_adapter 
*Adapter)
case DDR_80_MHZ:
psDDRSetting = asT3LP_DDRSetting80MHz;
RegCount = ARRAY_SIZE(asT3LP_DDRSetting80MHz);
-   RegCount -= T3LP_SKIP_CLOCK_PROGRAM_DUMP_80MHZ ;
+   RegCount -= T3LP_SKIP_CLOCK_PROGRAM_DUMP_80MHZ;
psDDRSetting += T3LP_SKIP_CLOCK_PROGRAM_DUMP_80MHZ;
break;
case DDR_100_MHZ:
psDDRSetting = asT3LP_DDRSetting100MHz;
RegCount = ARRAY_SIZE(asT3LP_DDRSetting100MHz);
-   RegCount -= T3LP_SKIP_CLOCK_PROGRAM_DUMP_100MHZ ;
+   RegCount -= T3LP_SKIP_CLOCK_PROGRAM_DUMP_100MHZ;
psDDRSetting += T3LP_SKIP_CLOCK_PROGRAM_DUMP_100MHZ;
break;
case DDR_133_MHZ:
bOverrideSelfRefresh = TRUE;
psDDRSetting = asT3LP_DDRSetting133MHz;
RegCount = ARRAY_SIZE(asT3LP_DDRSetting133MHz);
-   RegCount -= T3LP_SKIP_CLOCK_PROGRAM_DUMP_133MHZ ;
+   RegCount -= T3LP_SKIP_CLOCK_PROGRAM_DUMP_133MHZ;
psDDRSetting += T3LP_SKIP_CLOCK_PROGRAM_DUMP_133MHZ;
break;
default:
@@ -1034,20 +1034,20 @@ int download_ddr_settings(struct bcm_mini_adapter 
*Adapter)
case DDR_80_MHZ:
psDDRSetting = asT3LPB_DDRSetting80MHz;
RegCount = ARRAY_SIZE(asT3LPB_DDRSetting80MHz);
-   RegCount -= T3LPB_SKIP_CLOCK_PROGRAM_DUMP_80MHZ ;
+   RegCount -= T3LPB_SKIP_CLOCK_PROGRAM_DUMP_80MHZ;
psDDRSetting += T3LPB_SKIP_CLOCK_PROGRAM_DUMP_80MHZ;
break;
case DDR_100_MHZ:
psDDRSetting = asT3LPB_DDRSetting100MHz;
RegCount = ARRAY_SIZE(asT3LPB_DDRSetting100MHz);
-   RegCount -= T3LPB_SKIP_CLOCK_PROGRAM_DUMP_100MHZ ;
+   RegCount -= T3LPB_SKIP_CLOCK_PROGRAM_DUMP_100MHZ;
psDDRSetting += T3LPB_SKIP_CLOCK_PROGRAM_DUMP_100MHZ;
break;
case DDR_133_MHZ:
bOverrideSelfRefresh = TRUE;
psDDRSetting = asT3LPB_DDRSetting133MHz;
RegCount = ARRAY_SIZE(asT3LPB_DDRSetting133MHz);
-   RegCount -= T3LPB_SKIP_CLOCK_PROGRAM_DUMP_133MHZ ;
+   RegCount -= T3LPB_SKIP_CLOCK_PROGRAM_DUMP_133MHZ;
psDDRSetting += T3LPB_SKIP_CLOCK_PROGRAM_DUMP_133MHZ;
break;
case DDR_160_MHZ:
@@ -1066,20 +1066,20 @@ int download_ddr_settings(struct bcm_mini_adapter 
*Adapter)
case DDR_80_MHZ:
psDDRSetting = asT3_DDRSetting80MHz;
RegCount = ARRAY_SIZE(asT3_DDRSetting80MHz);
-   RegCount -= T3_SKIP_CLOCK_PROGRAM_DUMP_80MHZ ;
+   RegCount -= T3_SKIP_CLOCK_PROGRAM_DUMP_80MHZ;
psDDRSetting += T3_SKIP_CLOCK_PROGRAM_DUMP_80MHZ;
break;
case DDR_100_MHZ:
psDDRSetting = asT3_DDRSetting100MHz;
RegCount = ARRAY_SIZE(asT3_DDRSetting100MHz);
-   RegCount -= T3_SKIP_CLOCK_PROGRAM_DUMP_100MHZ ;
+   RegCount -= T3_SKIP_CLOCK_PROGRAM_DUMP_100MHZ;
psDDRSetting += T3_SKIP_CLOCK_PROGRAM_DUMP_100MHZ;
break;
case DDR_133_MHZ:
psDDRSetting = asT3_DDRSetting133MHz;
RegCount = ARRAY_SIZE(asT3_DDRSetting133MHz);
-   RegCount -= T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ ;
-   psDDRSetting += T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ ;
+   RegCount -= T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ;
+   psDDRSetting += T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ;
break;
default:
return -EINVA

[PATCH 8/9] Staging: bcm: DDRInit: tidy up indentation.

2013-12-06 Thread Gary Rookard
This is the eighth patch of a series.

Signed-off-by: Gary Alan Rookard 
---
On branch stanging-next
 drivers/staging/bcm/DDRInit.c | 394 +-
 1 file changed, 195 insertions(+), 199 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index 57e6023..c808bc5 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -54,7 +54,7 @@ static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = { 
/* # DPLL Clock Se
{0x0F00707C, 0x},
{0x0F007080, 0x},
{0x0F007084, 0x},
-{0x0F007094, 0x0104},   /* # Enable BW improvement within 
memory controller */
+   {0x0F007094, 0x0104},   /* # Enable BW improvement within 
memory controller */
{0x0F00A000, 0x0016},   /* # Enable 2 ports within X-bar */
{0x0F007018, 0x0101}/* # Enable start bit within memory 
controller */
 };
@@ -722,31 +722,31 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
UINT uiClockSetting = 0;
int retval = STATUS_SUCCESS;
 
-switch (Adapter->chip_id) {
+   switch (Adapter->chip_id) {
case 0xbece3200:
-   switch (Adapter->DDRSetting) {
-   case DDR_80_MHZ:
-   psDDRSetting = asT3LP_DDRSetting80MHz;
-   RegCount = (sizeof(asT3LP_DDRSetting80MHz)/
-   sizeof(struct bcm_ddr_setting));
-   break;
-   case DDR_100_MHZ:
-   psDDRSetting = asT3LP_DDRSetting100MHz;
-   RegCount = (sizeof(asT3LP_DDRSetting100MHz)/
-   sizeof(struct bcm_ddr_setting));
-   break;
-   case DDR_133_MHZ:
-   psDDRSetting = asT3LP_DDRSetting133MHz;
-   RegCount = (sizeof(asT3LP_DDRSetting133MHz)/
-   sizeof(struct bcm_ddr_setting));
+   switch (Adapter->DDRSetting) {
+   case DDR_80_MHZ:
+   psDDRSetting = asT3LP_DDRSetting80MHz;
+   RegCount = (sizeof(asT3LP_DDRSetting80MHz)/
+   sizeof(struct bcm_ddr_setting));
+   break;
+   case DDR_100_MHZ:
+   psDDRSetting = asT3LP_DDRSetting100MHz;
+   RegCount = (sizeof(asT3LP_DDRSetting100MHz)/
+   sizeof(struct bcm_ddr_setting));
+   break;
+   case DDR_133_MHZ:
+   psDDRSetting = asT3LP_DDRSetting133MHz;
+   RegCount = (sizeof(asT3LP_DDRSetting133MHz)/
+   sizeof(struct bcm_ddr_setting));
if (Adapter->bMipsConfig == MIPS_200_MHZ)
uiClockSetting = 0x03F13652;
else
-   uiClockSetting = 0x03F1365B;
+   uiClockSetting = 0x03F1365B;
break;
-   default:
-   return -EINVAL;
-}
+   default:
+   return -EINVAL;
+   }
break;
case T3LPB:
case BCS220_2:
@@ -756,10 +756,10 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
/* Set bit 2 and bit 6 to 1 for BBIC 2mA drive
 * (please check current value and additionally set these bits)
 */
-   if ((Adapter->chip_id !=  BCS220_2) &&
-   (Adapter->chip_id !=  BCS220_2BC) &&
-   (Adapter->chip_id != BCS220_3)) {
-   retval = rdmalt(Adapter, (UINT)0x0f000830, 
&uiResetValue, sizeof(uiResetValue));
+   if ((Adapter->chip_id !=  BCS220_2) &&
+   (Adapter->chip_id !=  BCS220_2BC) &&
+   (Adapter->chip_id != BCS220_3)) {
+   retval = rdmalt(Adapter, (UINT)0x0f000830, 
&uiResetValue, sizeof(uiResetValue));
if (retval < 0) {
BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, 
DBG_LVL_ALL, "%s:%d RDM failed\n", __func__, __LINE__);
return retval;
@@ -770,96 +770,95 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, 
DBG_LVL_ALL, "%s:%d RDM failed\n", __func__, __LINE__);
return retval;
}
-   }
+   }
switch (Adapter->DDRSetting) {
-   case DDR_80_MHZ:
-   psDDRSetting = asT3LPB_DDRSetting80MHz;
-   RegCount = (sizeof(asT3B_DDRSetting80MHz)/
-   

[PATCH 7/9] Staging: bcm: DDRInit: removed extra lines

2013-12-06 Thread Gary Rookard
This is the seventh patch of a series.

Signed-off-by: Gary Alan Rookard 
---
On branch staging-next
 drivers/staging/bcm/DDRInit.c | 163 +++---
 1 file changed, 43 insertions(+), 120 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index 8bb3283..57e6023 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -6,23 +6,21 @@
 #define MIPS_CLOCK_REG 0x0f000820
 
 /* DDR INIT-133Mhz */
-#define T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 12  /* index for 0x0F00700 */0
+#define T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 12  /* index for 0x0F007000 */
 static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = { /* # DPLL Clock 
Setting */
{0x0F000800, 0x7212},
{0x0f000820, 0x07F13FFF},
{0x0f000810, 0x0F95},
{0x0f000860, 0x},
{0x0f000880, 0x03DD},
-/* Changed source for X-bar and MIPS 
clock to APLL */
-   {0x0f000840, 0x0FFF1B00},
+   {0x0f000840, 0x0FFF1B00},   /* Changed source for X-bar and MIPS 
clock to APLL */
{0x0f000870, 0x0002},
{0x0F00a044, 0x1fff},
{0x0F00a040, 0x1f00},
{0x0F00a084, 0x1Cff},
{0x0F00a080, 0x1C00},
{0x0F00a04C, 0x000C},
-/* Memcontroller Default values */
-   {0x0F007000, 0x00010001},
+   {0x0F007000, 0x00010001},   /* Memcontroller Default values */
{0x0F007004, 0x01010100},
{0x0F007008, 0x0101},
{0x0F00700c, 0x},
@@ -56,12 +54,9 @@ static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = {
 /* # DPLL Clock Se
{0x0F00707C, 0x},
{0x0F007080, 0x},
{0x0F007084, 0x},
-/* # Enable BW improvement within 
memory controller */
-   {0x0F007094, 0x0104},
-/* # Enable 2 ports within X-bar */
-   {0x0F00A000, 0x0016},
-/* # Enable start bit within memory 
controller */
-   {0x0F007018, 0x0101}
+{0x0F007094, 0x0104},   /* # Enable BW improvement within 
memory controller */
+   {0x0F00A000, 0x0016},   /* # Enable 2 ports within X-bar */
+   {0x0F007018, 0x0101}/* # Enable start bit within memory 
controller */
 };
 /* 80Mhz */
 #define T3_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 10  /* index for 0x0F007000 */
@@ -76,8 +71,7 @@ static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = { /*  
# DPLL Clock Settin
{0x0F00a080, 0x1C00},
{0x0F00a000, 0x0016},
{0x0F00a04C, 0x000C},
-/* Memcontroller Default values */
-   {0x0F007000, 0x00010001},
+   {0x0F007000, 0x00010001},  /* Memcontroller Default values */
{0x0F007004, 0x0100},
{0x0F007008, 0x0101},
{0x0F00700c, 0x},
@@ -112,8 +106,7 @@ static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = { /* 
 # DPLL Clock Settin
{0x0F007080, 0x},
{0x0F007084, 0x},
{0x0F007094, 0x0104},
-/*# Enable start bit within memory 
controller */
-   {0x0F007018, 0x0101}
+   {0x0F007018, 0x0101}/* # Enable start bit within memory 
controller */
 };
 /* 100Mhz */
 #define T3_SKIP_CLOCK_PROGRAM_DUMP_100MHZ 13  /* index for 0x0F007000 */
@@ -123,19 +116,16 @@ static struct bcm_ddr_setting asT3_DDRSetting100MHz[] = 
{/*  # DPLL Clock Settin
{0x0f000820, 0x07F13E3F},
{0x0f000860, 0x},
{0x0f000880, 0x03DD},
-/* Changed source for X-bar and MIPS clock to 
APLL */
-/* 0x0f000840,0x0FFF1800, */
-   {0x0f000840, 0x0FFF1B00},
+   {0x0f000840, 0x0FFF1B00}, /* Changed source for X-bar and MIPS clock to 
APLL */
+   /* 0x0f000840,0x0FFF1800, */
{0x0f000870, 0x0002},
{0x0F00a044, 0x1fff},
{0x0F00a040, 0x1f00},
{0x0F00a084, 0x1Cff},
{0x0F00a080, 0x1C00},
{0x0F00a04C, 0x000C},
-/* # Enable 2 ports within X-bar */
-   {0x0F00A000, 0x0016},
-/*Memcontroller Default values */
-   {0x0F007000, 0x00010001},
+   {0x0F00A000, 0x0016},  /* # Enable 2 ports within X-bar */
+   {0x0F007000, 0x00010001},  /*Memcontroller Default values */
{0x0F007004, 0x01010100},
{0x0F007008, 0x0101},
{0x0F00700c, 0x},
@@ -169,12 +159,9 @@ static struct bcm_ddr_setting asT3_DDRSetting100MHz[] = 
{/*  # DPLL Clock Settin
{0x0F00707C, 0x},
{0x0F007080, 0x},
{0x0F007084, 0x},
-/* # Enable BW improvement within memory 
controller */
- 

[PATCH 6/9] Staging: bcm: DDRInit: tidy up bracing issues.

2013-12-06 Thread Gary Rookard
This is the sixth patch of a series.

Signed-off-by: Gary Alan Rookard 
---
On branch staging-next
 drivers/staging/bcm/DDRInit.c | 174 +++---
 1 file changed, 63 insertions(+), 111 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index 1a08b17..8bb3283 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -62,7 +62,7 @@ static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = { 
/* # DPLL Clock Se
{0x0F00A000, 0x0016},
 /* # Enable start bit within memory 
controller */
{0x0F007018, 0x0101}
-};
+};
 /* 80Mhz */
 #define T3_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 10  /* index for 0x0F007000 */
 static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = { /*  # DPLL Clock 
Setting */
@@ -114,7 +114,7 @@ static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = { /* 
 # DPLL Clock Settin
{0x0F007094, 0x0104},
 /*# Enable start bit within memory 
controller */
{0x0F007018, 0x0101}
-};
+};
 /* 100Mhz */
 #define T3_SKIP_CLOCK_PROGRAM_DUMP_100MHZ 13  /* index for 0x0F007000 */
 static struct bcm_ddr_setting asT3_DDRSetting100MHz[] = {/*  # DPLL Clock 
Setting */
@@ -173,7 +173,7 @@ static struct bcm_ddr_setting asT3_DDRSetting100MHz[] = {/* 
 # DPLL Clock Settin
{0x0F007094, 0x0104},
 /* # Enable start bit within memory controller 
*/
{0x0F007018, 0x0101}
-};
+};
 
 /* Net T3B DDR Settings */
 /* DDR INIT-133Mhz */
@@ -186,7 +186,7 @@ static struct bcm_ddr_setting asDPLL_266MHZ[] = {
 /* Changed source for X-bar and MIPS 
clock to APLL */
{0x0f000840, 0x0FFF1B00},
{0x0f000870, 0x0002}
- };
+};
 
 #define T3B_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 11  /* index for 0x0F007000 */
 static struct bcm_ddr_setting asT3B_DDRSetting133MHz[] = {/* # DPLL Clock 
Setting */
@@ -244,7 +244,7 @@ static struct bcm_ddr_setting asT3B_DDRSetting133MHz[] = 
{/* # DPLL Clock Settin
{0x0F007094, 0x0104},
 /* # Enable start bit within memory 
controller */
{0x0F007018, 0x0101},
-};
+};
 
 #define T3B_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 9  /*index for 0x0F007000 */
 static struct bcm_ddr_setting asT3B_DDRSetting80MHz[] = {/* # DPLL Clock 
Setting */
@@ -297,7 +297,7 @@ static struct bcm_ddr_setting asT3B_DDRSetting80MHz[] = {/* 
# DPLL Clock Setting
{0x0F007094, 0x0104},

/* # Enable start bit within memory controller */
{0x0F007018, 0x0101}
-   };
+};
 
 /* 100Mhz */
 #define T3B_SKIP_CLOCK_PROGRAM_DUMP_100MHZ 9  /* index for 0x0F007000 */
@@ -352,7 +352,7 @@ static struct bcm_ddr_setting asT3B_DDRSetting100MHz[] = 
{/* # DPLL Clock Settin
{0x0F007094, 0x0104},
/* # Enable 
start bit within memory controller */
{0x0F007018, 0x0101}
-   };
+};
 
 
 #define T3LP_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 9  /*index for 0x0F007000 */
@@ -781,11 +781,9 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
UINT uiClockSetting = 0;
int retval = STATUS_SUCCESS;
 
-switch (Adapter->chip_id)
-   {
+switch (Adapter->chip_id) {
case 0xbece3200:
-   switch (Adapter->DDRSetting)
-   {
+   switch (Adapter->DDRSetting) {
case DDR_80_MHZ:
psDDRSetting = asT3LP_DDRSetting80MHz;
RegCount = (sizeof(asT3LP_DDRSetting80MHz)/
@@ -800,14 +798,10 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
psDDRSetting = asT3LP_DDRSetting133MHz;
RegCount = (sizeof(asT3LP_DDRSetting133MHz)/
sizeof(struct bcm_ddr_setting));
-   if(Adapter->bMipsConfig == MIPS_200_MHZ)
-   {
+   if (Adapter->bMipsConfig == MIPS_200_MHZ)
uiClockSetting = 0x03F13652;
-   }
else
-   {
uiClockSetting = 0x03F1365B;
-   }
break;
default:
return -EINVAL;
@@ -822,24 +816,22 @@ int ddr_init(struct bcm_mini_adapter *Adapter)

[PATCH 4/9] Staging: bcm: DDRInit: added spaces around operators.

2013-12-06 Thread Gary Rookard
This is the fourth patch of a series.

Signed-off-by: Gary Alan Rookard 
---
On branch-staging-next
 drivers/staging/bcm/DDRInit.c | 86 +--
 1 file changed, 43 insertions(+), 43 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index ed4dfe9..cb4dd53 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -7,7 +7,7 @@
 
 //DDR INIT-133Mhz
 #define T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 12  //index for 0x0F007000
-static struct bcm_ddr_setting asT3_DDRSetting133MHz[]= {//  # DPLL Clock 
Setting
+static struct bcm_ddr_setting asT3_DDRSetting133MHz[] = {//  # DPLL Clock 
Setting
{0x0F000800, 0x7212},
{0x0f000820, 0x07F13FFF},
{0x0f000810, 0x0F95},
@@ -65,7 +65,7 @@ static struct bcm_ddr_setting asT3_DDRSetting133MHz[]= {//
  # DPLL Clock Set
 };
 //80Mhz
 #define T3_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 10  //index for 0x0F007000
-static struct bcm_ddr_setting asT3_DDRSetting80MHz[]= {//   # DPLL Clock 
Setting
+static struct bcm_ddr_setting asT3_DDRSetting80MHz[] = {//   # DPLL Clock 
Setting
{0x0f000810, 0x0F95},
{0x0f000820, 0x07f1},
{0x0f000860, 0x},
@@ -117,7 +117,7 @@ static struct bcm_ddr_setting asT3_DDRSetting80MHz[]= {//   
# DPLL Clock Setting
 };
 //100Mhz
 #define T3_SKIP_CLOCK_PROGRAM_DUMP_100MHZ 13  //index for 0x0F007000
-static struct bcm_ddr_setting asT3_DDRSetting100MHz[]= {//  # DPLL Clock 
Setting
+static struct bcm_ddr_setting asT3_DDRSetting100MHz[] = {//  # DPLL Clock 
Setting
{0x0F000800, 0x7008},
{0x0f000810, 0x0F95},
{0x0f000820, 0x07F13E3F},
@@ -356,7 +356,7 @@ static struct bcm_ddr_setting asT3B_DDRSetting100MHz[] = 
{//  # DPLL Clock S
 
 
 #define T3LP_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 9  //index for 0x0F007000
-static struct bcm_ddr_setting asT3LP_DDRSetting133MHz[]= {//   # DPLL Clock 
Setting
+static struct bcm_ddr_setting asT3LP_DDRSetting133MHz[] = {//  # DPLL Clock 
Setting
{0x0f000820, 0x03F1365B},
{0x0f000810, 0x2F95},
{0x0f000880, 0x03DD},
@@ -416,7 +416,7 @@ static struct bcm_ddr_setting asT3LP_DDRSetting133MHz[]= 
{//# DPLL Clock Settin
 };
 
 #define T3LP_SKIP_CLOCK_PROGRAM_DUMP_100MHZ 11  //index for 0x0F007000
-static struct bcm_ddr_setting asT3LP_DDRSetting100MHz[]= {//   # DPLL Clock 
Setting
+static struct bcm_ddr_setting asT3LP_DDRSetting100MHz[] = {//  # DPLL Clock 
Setting
{0x0f000810, 0x2F95},
{0x0f000820, 0x03F1369B},
{0x0f000840, 0x0fff},
@@ -476,7 +476,7 @@ static struct bcm_ddr_setting asT3LP_DDRSetting100MHz[]= 
{//# DPLL Clock Settin
 };
 
 #define T3LP_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 9  //index for 0x0F007000
-static struct bcm_ddr_setting asT3LP_DDRSetting80MHz[]= {//# DPLL Clock 
Setting
+static struct bcm_ddr_setting asT3LP_DDRSetting80MHz[] = {//   # DPLL Clock 
Setting
{0x0f000820, 0x07F13FFF},
{0x0f000810, 0x2F95},
{0x0f000860, 0x},
@@ -536,7 +536,7 @@ static struct bcm_ddr_setting asT3LP_DDRSetting80MHz[]= {// 
# DPLL Clock Setting
 ///T3 LP-B (UMA-B)
 
 #define T3LPB_SKIP_CLOCK_PROGRAM_DUMP_160MHZ 7  //index for 0x0F007000
-static struct bcm_ddr_setting asT3LPB_DDRSetting160MHz[]= {//  # DPLL Clock 
Setting
+static struct bcm_ddr_setting asT3LPB_DDRSetting160MHz[] = {// # DPLL Clock 
Setting
 
{0x0f000820, 0x03F137DB},
{0x0f000810, 0x01842795},
@@ -594,7 +594,7 @@ static struct bcm_ddr_setting asT3LPB_DDRSetting160MHz[]= 
{//   # DPLL Clock Setti
 
 
 #define T3LPB_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 7  //index for 0x0F007000
-static struct bcm_ddr_setting asT3LPB_DDRSetting133MHz[]= {//  # DPLL Clock 
Setting
+static struct bcm_ddr_setting asT3LPB_DDRSetting133MHz[] = {// # DPLL Clock 
Setting
{0x0f000820, 0x03F1365B},
{0x0f000810, 0x2F95},
{0x0f000880, 0x03DD},
@@ -655,7 +655,7 @@ static struct bcm_ddr_setting asT3LPB_DDRSetting133MHz[]= 
{//   # DPLL Clock Setti
 };
 
 #define T3LPB_SKIP_CLOCK_PROGRAM_DUMP_100MHZ 8  //index for 0x0F007000
-static struct bcm_ddr_setting asT3LPB_DDRSetting100MHz[]= {//  # DPLL Clock 
Setting
+static struct bcm_ddr_setting asT3LPB_DDRSetting100MHz[] = {// # DPLL Clock 
Setting
{0x0f000810, 0x2F95},
{0x0f000820, 0x03F1369B},
{0x0f000840, 0x0fff},
@@ -716,7 +716,7 @@ static struct bcm_ddr_setting asT3LPB_DDRSetting100MHz[]= 
{//   # DPLL Clock Setti
 };
 
 #define T3LPB_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 7  //index for 0x0F007000
-static struct bcm_ddr_setting asT3LPB_DDRSetting80MHz[]= {//   # DPLL Clock 
Setting
+static struct bcm_ddr_setting asT3LPB_DDRSetting80MHz[] = {//  # DPLL Clock 
Setting
{0x0f000820, 0x07F13FFF},
{0x0f000810, 0x2F95},
{0x0f000860, 0x},
@@ -774,8 +774,8 @@ static struct bcm_

[PATCH 3/9] Staging: bcm: DDRInit: added space after commas.

2013-12-06 Thread Gary Rookard
Signed-off-by: Gary Alan Rookard 
---
On branch staging-next
 drivers/staging/bcm/DDRInit.c | 1332 -
 1 file changed, 666 insertions(+), 666 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index e014759..ed4dfe9 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -8,526 +8,526 @@
 //DDR INIT-133Mhz
 #define T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 12  //index for 0x0F007000
 static struct bcm_ddr_setting asT3_DDRSetting133MHz[]= {//  # DPLL Clock 
Setting
-   {0x0F000800,0x7212},
-   {0x0f000820,0x07F13FFF},
-   {0x0f000810,0x0F95},
-   {0x0f000860,0x},
-   {0x0f000880,0x03DD},
+   {0x0F000800, 0x7212},
+   {0x0f000820, 0x07F13FFF},
+   {0x0f000810, 0x0F95},
+   {0x0f000860, 0x},
+   {0x0f000880, 0x03DD},
 // Changed source for X-bar and MIPS 
clock to APLL
-   {0x0f000840,0x0FFF1B00},
-   {0x0f000870,0x0002},
-   {0x0F00a044,0x1fff},
-   {0x0F00a040,0x1f00},
-   {0x0F00a084,0x1Cff},
-   {0x0F00a080,0x1C00},
-   {0x0F00a04C,0x000C},
+   {0x0f000840, 0x0FFF1B00},
+   {0x0f000870, 0x0002},
+   {0x0F00a044, 0x1fff},
+   {0x0F00a040, 0x1f00},
+   {0x0F00a084, 0x1Cff},
+   {0x0F00a080, 0x1C00},
+   {0x0F00a04C, 0x000C},
 //Memcontroller Default values
-   {0x0F007000,0x00010001},
-   {0x0F007004,0x01010100},
-   {0x0F007008,0x0101},
-   {0x0F00700c,0x},
-   {0x0F007010,0x0100},
-   {0x0F007014,0x01000100},
-   {0x0F007018,0x0100},
-   {0x0F00701c,0x01020001},// POP - 0x00020001 Normal 0x01020001
-   {0x0F007020,0x04030107}, //Normal - 0x04030107 POP - 0x05030107
-   {0x0F007024,0x0207},
-   {0x0F007028,0x02020202},
-   {0x0F00702c,0x0206060a},//ROB- 0x0205050a,//0x0206060a
-   {0x0F007030,0x0500},
-   {0x0F007034,0x0003};
-   {0x0F007038,0x110a0200},//ROB - 0x110a0200,//0x180a0200,// 0x1f0a0200
-   {0x0F00703C,0x02101010},//ROB - 0x02101010,//0x02101018},
-   {0x0F007040,0x45751200},//ROB - 0x45751200,//0x450f1200},
-   {0x0F007044,0x110a0d00},//ROB - 0x110a0d00//0x111f0d00
-   {0x0F007048,0x081b0306},
-   {0x0F00704c,0x},
-   {0x0F007050,0x001c},
-   {0x0F007054,0x},
-   {0x0F007058,0x},
-   {0x0F00705c,0x},
-   {0x0F007060,0x0010246c},
-   {0x0F007064,0x0010},
-   {0x0F007068,0x},
-   {0x0F00706c,0x0001},
-   {0x0F007070,0x7000},
-   {0x0F007074,0x},
-   {0x0F007078,0x},
-   {0x0F00707C,0x},
-   {0x0F007080,0x},
-   {0x0F007084,0x},
+   {0x0F007000, 0x00010001},
+   {0x0F007004, 0x01010100},
+   {0x0F007008, 0x0101},
+   {0x0F00700c, 0x},
+   {0x0F007010, 0x0100},
+   {0x0F007014, 0x01000100},
+   {0x0F007018, 0x0100},
+   {0x0F00701c, 0x01020001},// POP - 0x00020001 Normal 0x01020001
+   {0x0F007020, 0x04030107}, //Normal - 0x04030107 POP - 0x05030107
+   {0x0F007024, 0x0207},
+   {0x0F007028, 0x02020202},
+   {0x0F00702c, 0x0206060a},//ROB- 0x0205050a,//0x0206060a
+   {0x0F007030, 0x0500},
+   {0x0F007034, 0x0003};
+   {0x0F007038, 0x110a0200},//ROB - 0x110a0200,//0x180a0200,// 0x1f0a0200
+   {0x0F00703C, 0x02101010},//ROB - 0x02101010,//0x02101018},
+   {0x0F007040, 0x45751200},//ROB - 0x45751200,//0x450f1200},
+   {0x0F007044, 0x110a0d00},//ROB - 0x110a0d00//0x111f0d00
+   {0x0F007048, 0x081b0306},
+   {0x0F00704c, 0x},
+   {0x0F007050, 0x001c},
+   {0x0F007054, 0x},
+   {0x0F007058, 0x},
+   {0x0F00705c, 0x},
+   {0x0F007060, 0x0010246c},
+   {0x0F007064, 0x0010},
+   {0x0F007068, 0x},
+   {0x0F00706c, 0x0001},
+   {0x0F007070, 0x7000},
+   {0x0F007074, 0x},
+   {0x0F007078, 0x},
+   {0x0F00707C, 0x},
+   {0x0F007080, 0x},
+   {0x0F007084, 0x},
 //# Enable BW improvement within 
memory controller
-   {0x0F007094,0x0104},
+   {0x0F007094, 0x0104},
 //# Enable 2 ports within X-bar
-   {0x0F00A000,0x0016},
+   {0x0F00A000, 0x0016},
 //# Enable start bit within memory 
controller
-   {0x0F007018,0x0101}
+   {0x0F007018, 0x0101}
 };
 //80Mhz
 #define T3_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 10  //index for 0x0F007000
 static struct bcm_ddr_setting asT3_DDRSetting80MHz[]= {//   # DPLL Clock 
Setting
-   {0x0f000810,0x0F

[PATCH 1/9] Staging: bcm: DDRInit: Replaced spaces with tabs.

2013-12-06 Thread Gary Rookard
This is the first patch of a series.

Signed:off-by: Gary Alan Rookard 
---
On branch staging-next
 drivers/staging/bcm/DDRInit.c | 398 +-
 1 file changed, 199 insertions(+), 199 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index 9f7e30f..f550567 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -8,242 +8,242 @@
 //DDR INIT-133Mhz
 #define T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 12  //index for 0x0F007000
 static struct bcm_ddr_setting asT3_DDRSetting133MHz[]= {//  # DPLL Clock 
Setting
-{0x0F000800,0x7212},
-{0x0f000820,0x07F13FFF},
-{0x0f000810,0x0F95},
-{0x0f000860,0x},
-{0x0f000880,0x03DD},
+   {0x0F000800,0x7212},
+   {0x0f000820,0x07F13FFF},
+   {0x0f000810,0x0F95},
+   {0x0f000860,0x},
+   {0x0f000880,0x03DD},
 // Changed source for X-bar and MIPS 
clock to APLL
-{0x0f000840,0x0FFF1B00},
-{0x0f000870,0x0002},
-{0x0F00a044,0x1fff},
-{0x0F00a040,0x1f00},
-{0x0F00a084,0x1Cff},
-{0x0F00a080,0x1C00},
-{0x0F00a04C,0x000C},
+   {0x0f000840,0x0FFF1B00},
+   {0x0f000870,0x0002},
+   {0x0F00a044,0x1fff},
+   {0x0F00a040,0x1f00},
+   {0x0F00a084,0x1Cff},
+   {0x0F00a080,0x1C00},
+   {0x0F00a04C,0x000C},
 //Memcontroller Default values
-{0x0F007000,0x00010001},
-{0x0F007004,0x01010100},
-{0x0F007008,0x0101},
-{0x0F00700c,0x},
-{0x0F007010,0x0100},
-{0x0F007014,0x01000100},
-{0x0F007018,0x0100},
-{0x0F00701c,0x01020001},// POP - 
0x00020001 Normal 0x01020001
-{0x0F007020,0x04030107}, //Normal - 
0x04030107 POP - 0x05030107
-{0x0F007024,0x0207},
-{0x0F007028,0x02020202},
-{0x0F00702c,0x0206060a},//ROB- 
0x0205050a,//0x0206060a
-{0x0F007030,0x0500},
-{0x0F007034,0x0003},
-{0x0F007038,0x110a0200},//ROB - 
0x110a0200,//0x180a0200,// 0x1f0a0200
-{0x0F00703C,0x02101010},//ROB - 
0x02101010,//0x02101018},
-{0x0F007040,0x45751200},//ROB - 
0x45751200,//0x450f1200},
-{0x0F007044,0x110a0d00},//ROB - 
0x110a0d00//0x111f0d00
-{0x0F007048,0x081b0306},
-{0x0F00704c,0x},
-{0x0F007050,0x001c},
-{0x0F007054,0x},
-{0x0F007058,0x},
-{0x0F00705c,0x},
-{0x0F007060,0x0010246c},
-{0x0F007064,0x0010},
-{0x0F007068,0x},
-{0x0F00706c,0x0001},
-{0x0F007070,0x7000},
-{0x0F007074,0x},
-{0x0F007078,0x},
-{0x0F00707C,0x},
-{0x0F007080,0x},
-{0x0F007084,0x},
+   {0x0F007000,0x00010001},
+   {0x0F007004,0x01010100},
+   {0x0F007008,0x0101},
+   {0x0F00700c,0x},
+   {0x0F007010,0x0100},
+   {0x0F007014,0x01000100},
+   {0x0F007018,0x0100},
+   {0x0F00701c,0x01020001},// POP - 0x00020001 Normal 0x01020001
+   {0x0F007020,0x04030107}, //Normal - 0x04030107 POP - 0x05030107
+   {0x0F007024,0x0207},
+   {0x0F007028,0x02020202},
+   {0x0F00702c,0x0206060a},//ROB- 0x0205050a,//0x0206060a
+   {0x0F007030,0x0500},
+  

[PATCH 2/9] Staging: bcm: DDRInit: replaced multiple tabs with tab.

2013-12-06 Thread Gary Rookard
This is second in a series of patches.

Signed-off-by: Gary Alan Rookard 
---
On branch staging-next
 drivers/staging/bcm/DDRInit.c | 910 +-
 1 file changed, 455 insertions(+), 455 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index f550567..e014759 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -248,286 +248,286 @@ static struct bcm_ddr_setting asT3B_DDRSetting133MHz[] 
= {//  # DPLL Clock S
 
 #define T3B_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 9  //index for 0x0F007000
 static struct bcm_ddr_setting asT3B_DDRSetting80MHz[] = {//   # DPLL Clock 
Setting
-   
{0x0f000810,0x0F95},
-   
{0x0f000820,0x07F13FFF},
-   
{0x0f000840,0x0FFF1F00},
-   
{0x0f000880,0x03DD},
-   
{0x0f000860,0x},
+   {0x0f000810,0x0F95},
+   {0x0f000820,0x07F13FFF},
+   {0x0f000840,0x0FFF1F00},
+   {0x0f000880,0x03DD},
+   {0x0f000860,0x},
 
-   
{0x0F00a044,0x1fff},
-   
{0x0F00a040,0x1f00},
-   
{0x0F00a084,0x1Cff},
-   
{0x0F00a080,0x1C00},
-   
{0x0F00a000,0x0016},
+   {0x0F00a044,0x1fff},
+   {0x0F00a040,0x1f00},
+   {0x0F00a084,0x1Cff},
+   {0x0F00a080,0x1C00},
+   {0x0F00a000,0x0016},

//Memcontroller Default values
-   
{0x0F007000,0x00010001},
-   
{0x0F007004,0x0100},
-   
{0x0F007008,0x0101},
-   
{0x0F00700c,0x},
-   
{0x0F007010,0x0100},
-   
{0x0F007014,0x01000100},
-   
{0x0F007018,0x0100},
-   
{0x0F00701c,0x0102},
-   
{0x0F007020,0x04020107},
-   
{0x0F007024,0x0007},
-   
{0x0F007028,0x02020201},
-   
{0x0F00702c,0x0204040a},
-   
{0x0F007030,0x0400},
-   
{0x0F007034,0x0202},
-   
{0x0F007038,0x1F060202},
-   
{0x0F00703C,0x1C1F},
-   
{0x0F007040,0x8A006600},
-   
{0x0F007044,0x221a0800},
-   
{0x0F007048,0x02690204},
-   
{0x0F00704c,0x},
-   
{0x0F007050,0x011c},
-   
{0x0F007054,0x},
-   
{0x0F007058,0x},
-   
{0x0F00705c,0x},
-   
{0x0F007060,0x000A15D6},
-   
{0x0F007064,0x000A},
-

[PATCH 4/5] Staging: bcm: DDRInit: Fixed coding style issue, repaced spaces w/ tab.(patch set)

2013-12-04 Thread Gary Rookard
This is the fourth patch of a series.(4)
Replaced spaces in margin w/ 1 tab for lines:
 181-185, 187-188

Signed-off-by: Gary Alan Rookard 
 On branch staging-next
---
 drivers/staging/bcm/DDRInit.c | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index d31dc71..fdeb4f6 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -178,14 +178,14 @@ static struct bcm_ddr_setting asT3_DDRSetting100MHz[]= 
{//  # DPLL Clock Setting
 //Net T3B DDR Settings
 //DDR INIT-133Mhz
 static struct bcm_ddr_setting asDPLL_266MHZ[] = {
-{0x0F000800,0x7212},
-{0x0f000820,0x07F13FFF},
-{0x0f000810,0x0F95},
-{0x0f000860,0x},
-{0x0f000880,0x03DD},
+   {0x0F000800,0x7212},
+   {0x0f000820,0x07F13FFF},
+   {0x0f000810,0x0F95},
+   {0x0f000860,0x},
+   {0x0f000880,0x03DD},
 // Changed source for X-bar and MIPS 
clock to APLL
-{0x0f000840,0x0FFF1B00},
-{0x0f000870,0x0002}
+   {0x0f000840,0x0FFF1B00},
+   {0x0f000870,0x0002}
  };
 
 #define T3B_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 11  //index for 0x0F007000
-- 
1.8.4

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


[PATCH 5/5] Staging: bcm: DDRInit: Fixed coding style issue, replaced spaces w/ tab.(patch set)

2013-12-04 Thread Gary Rookard
This is the fifth and final patch for replace spaces w/tab.(5)
Replaced spaces in margin w/ 1 tab for lines:
 193-197, 199-200, 202-205, 207, 209-242, 244, 246

Signed-off-by: Gary Alan Rookard 
 On branch staging-next
---
 drivers/staging/bcm/DDRInit.c | 96 +--
 1 file changed, 48 insertions(+), 48 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index fdeb4f6..dc14cf5 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -190,60 +190,60 @@ static struct bcm_ddr_setting asDPLL_266MHZ[] = {
 
 #define T3B_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 11  //index for 0x0F007000
 static struct bcm_ddr_setting asT3B_DDRSetting133MHz[] = {//  # DPLL Clock 
Setting
-{0x0f000810,0x0F95},
-{0x0f000810,0x0F95},
-{0x0f000810,0x0F95},
-{0x0f000820,0x07F13652},
-{0x0f000840,0x0FFF0800},
+   {0x0f000810,0x0F95},
+   {0x0f000810,0x0F95},
+   {0x0f000810,0x0F95},
+   {0x0f000820,0x07F13652},
+   {0x0f000840,0x0FFF0800},
 // Changed source for X-bar and MIPS 
clock to APLL
-{0x0f000880,0x03DD},
-{0x0f000860,0x},
+   {0x0f000880,0x03DD},
+   {0x0f000860,0x},
 // Changed source for X-bar and MIPS 
clock to APLL
-{0x0F00a044,0x1fff},
-{0x0F00a040,0x1f00},
-{0x0F00a084,0x1Cff},
-{0x0F00a080,0x1C00},
+   {0x0F00a044,0x1fff},
+   {0x0F00a040,0x1f00},
+   {0x0F00a084,0x1Cff},
+   {0x0F00a080,0x1C00},
 //# Enable 2 ports within X-bar
-{0x0F00A000,0x0016},
+   {0x0F00A000,0x0016},
 //Memcontroller Default values
-{0x0F007000,0x00010001},
-{0x0F007004,0x01010100},
-{0x0F007008,0x0101},
-{0x0F00700c,0x},
-{0x0F007010,0x0100},
-{0x0F007014,0x01000100},
-{0x0F007018,0x0100},
-{0x0F00701c,0x01020001},// POP - 
0x00020001 Normal 0x01020001
-{0x0F007020,0x04030107}, //Normal - 
0x04030107 POP - 0x05030107
-{0x0F007024,0x0207},
-{0x0F007028,0x02020202},
-{0x0F00702c,0x0206060a},//ROB- 
0x0205050a,//0x0206060a
-{0x0F007030,0x0500},
-{0x0F007034,0x0003},
-{0x0F007038,0x130a0200},//ROB - 
0x110a0200,//0x180a0200,// 0x1f0a0200
-{0x0F00703C,0x02101012},//ROB - 
0x02101010,//0x02101018},
-{0x0F007040,0x457D1200},//ROB - 
0x45751200,//0x450f1200},
-{0x0F007044,0x11130d00},//ROB - 
0x110a0d00//0x111f0d00
-{0x0F007048,0x040D0306},
-{0x0F00704c,0x},
-{0x0F007050,0x001c},
-{0x0F007054,0x},
-{0x0F007058,0x},
-{0x0F00705c,0x},
-{0x0F007060,0x0010246c},
-{0x0F007064,0x0012},
-{0x0F007068,0x},
-{0x0F00706c,0x0001},
-{0x0F007070,0x7000},
-{0x0F007074,0x},
-{0x0F007078,0x},
-{0x0F00707C,0x},
-{0x0F007080,0x},
-{0x0F007084,0x},
+   {0x0F007000,0x00010001},
+   {0x0F007004,0x01010100},
+   {0x0F007008,0x0101},
+   {0x0F00700c,0x},
+   {0x0F007010,0x0100},
+   {0x0F007014,0x01000100},
+   {0x0F00701

[PATCH 3/3] Staging: bcm: DDRInit: Fixed coding style issue, replaced spaces w/ tab.(patch set)

2013-12-04 Thread Gary Rookard
This is the third patch of a series.(3)
Replaced spaces in margin w/ 1 tab for lines:
 121-125, 128-134, 136, 138-171, 173, 175

Signed-off-by: Gary Alan Rookard 
 On branch staging-next
---
 drivers/staging/bcm/DDRInit.c | 98 +--
 1 file changed, 49 insertions(+), 49 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index 6f5880b..d31dc71 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -118,61 +118,61 @@ static struct bcm_ddr_setting asT3_DDRSetting80MHz[]= {// 
  # DPLL Clock Setting
 //100Mhz
 #define T3_SKIP_CLOCK_PROGRAM_DUMP_100MHZ 13  //index for 0x0F007000
 static struct bcm_ddr_setting asT3_DDRSetting100MHz[]= {//  # DPLL Clock 
Setting
-{0x0F000800,0x7008},
-{0x0f000810,0x0F95},
-{0x0f000820,0x07F13E3F},
-{0x0f000860,0x},
-{0x0f000880,0x03DD},
+   {0x0F000800,0x7008},
+   {0x0f000810,0x0F95},
+   {0x0f000820,0x07F13E3F},
+   {0x0f000860,0x},
+   {0x0f000880,0x03DD},
 // Changed source for X-bar and MIPS clock to 
APLL
 //0x0f000840,0x0FFF1800,
-{0x0f000840,0x0FFF1B00},
-{0x0f000870,0x0002},
-{0x0F00a044,0x1fff},
-{0x0F00a040,0x1f00},
-{0x0F00a084,0x1Cff},
-{0x0F00a080,0x1C00},
-{0x0F00a04C,0x000C},
+   {0x0f000840,0x0FFF1B00},
+   {0x0f000870,0x0002},
+   {0x0F00a044,0x1fff},
+   {0x0F00a040,0x1f00},
+   {0x0F00a084,0x1Cff},
+   {0x0F00a080,0x1C00},
+   {0x0F00a04C,0x000C},
 //# Enable 2 ports within X-bar
-{0x0F00A000,0x0016},
+   {0x0F00A000,0x0016},
 //Memcontroller Default values
-{0x0F007000,0x00010001},
-{0x0F007004,0x01010100},
-{0x0F007008,0x0101},
-{0x0F00700c,0x},
-{0x0F007010,0x0100},
-{0x0F007014,0x01000100},
-{0x0F007018,0x0100},
-{0x0F00701c,0x01020001}, // POP - 
0x0002 Normal 0x0102
-{0x0F007020,0x04020107},//Normal - 
0x04030107 POP - 0x05030107
-{0x0F007024,0x0007},
-{0x0F007028,0x01020201},
-{0x0F00702c,0x0204040A},
-{0x0F007030,0x0600},
-{0x0F007034,0x0004},
-{0x0F007038,0x20080200},
-{0x0F00703C,0x02030320},
-{0x0F007040,0x6E7F1200},
-{0x0F007044,0x01190A00},
-{0x0F007048,0x06120305},//0x02690204 
// 0x06120305
-{0x0F00704c,0x},
-{0x0F007050,0x001C},
-{0x0F007054,0x},
-{0x0F007058,0x},
-{0x0F00705c,0x},
-{0x0F007060,0x00082ED6},
-{0x0F007064,0x000A},
-{0x0F007068,0x},
-{0x0F00706c,0x0001},
-{0x0F007070,0x5000},
-{0x0F007074,0x},
-{0x0F007078,0x},
-{0x0F00707C,0x},
-{0x0F007080,0x},
-{0x0F007084,0x},
+   {0x0F007000,0x00010001},
+   {0x0F007004,0x01010100},
+   {0x0F007008,0x0101},
+   {0x0F00700c,0x},
+   {0x0F007010,0x0100},
+   {0x0F007014,0x01000100},
+   {0x0F007018,0x0100},
+   {0x0F00701c,0x01020001}, // POP - 0x0002 Normal 0x0102
+   {0x0F007020,0x

[PATCH 3/3] Staging: bcm: DDRInit: Fixed coding style issue, replaced spaces w/ tab.(patch set)

2013-12-04 Thread Gary Rookard
This is the third patch of a series.(3)
Replaced spaces in margin w/ 1 tab for lines:
 121-125, 128-134, 136, 138-171, 173, 175

Signed-off-by: Gary Alan Rookard 
 On branch staging-next
---
 drivers/staging/bcm/DDRInit.c | 98 +--
 1 file changed, 49 insertions(+), 49 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index 6f5880b..d31dc71 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -118,61 +118,61 @@ static struct bcm_ddr_setting asT3_DDRSetting80MHz[]= {// 
  # DPLL Clock Setting
 //100Mhz
 #define T3_SKIP_CLOCK_PROGRAM_DUMP_100MHZ 13  //index for 0x0F007000
 static struct bcm_ddr_setting asT3_DDRSetting100MHz[]= {//  # DPLL Clock 
Setting
-{0x0F000800,0x7008},
-{0x0f000810,0x0F95},
-{0x0f000820,0x07F13E3F},
-{0x0f000860,0x},
-{0x0f000880,0x03DD},
+   {0x0F000800,0x7008},
+   {0x0f000810,0x0F95},
+   {0x0f000820,0x07F13E3F},
+   {0x0f000860,0x},
+   {0x0f000880,0x03DD},
 // Changed source for X-bar and MIPS clock to 
APLL
 //0x0f000840,0x0FFF1800,
-{0x0f000840,0x0FFF1B00},
-{0x0f000870,0x0002},
-{0x0F00a044,0x1fff},
-{0x0F00a040,0x1f00},
-{0x0F00a084,0x1Cff},
-{0x0F00a080,0x1C00},
-{0x0F00a04C,0x000C},
+   {0x0f000840,0x0FFF1B00},
+   {0x0f000870,0x0002},
+   {0x0F00a044,0x1fff},
+   {0x0F00a040,0x1f00},
+   {0x0F00a084,0x1Cff},
+   {0x0F00a080,0x1C00},
+   {0x0F00a04C,0x000C},
 //# Enable 2 ports within X-bar
-{0x0F00A000,0x0016},
+   {0x0F00A000,0x0016},
 //Memcontroller Default values
-{0x0F007000,0x00010001},
-{0x0F007004,0x01010100},
-{0x0F007008,0x0101},
-{0x0F00700c,0x},
-{0x0F007010,0x0100},
-{0x0F007014,0x01000100},
-{0x0F007018,0x0100},
-{0x0F00701c,0x01020001}, // POP - 
0x0002 Normal 0x0102
-{0x0F007020,0x04020107},//Normal - 
0x04030107 POP - 0x05030107
-{0x0F007024,0x0007},
-{0x0F007028,0x01020201},
-{0x0F00702c,0x0204040A},
-{0x0F007030,0x0600},
-{0x0F007034,0x0004},
-{0x0F007038,0x20080200},
-{0x0F00703C,0x02030320},
-{0x0F007040,0x6E7F1200},
-{0x0F007044,0x01190A00},
-{0x0F007048,0x06120305},//0x02690204 
// 0x06120305
-{0x0F00704c,0x},
-{0x0F007050,0x001C},
-{0x0F007054,0x},
-{0x0F007058,0x},
-{0x0F00705c,0x},
-{0x0F007060,0x00082ED6},
-{0x0F007064,0x000A},
-{0x0F007068,0x},
-{0x0F00706c,0x0001},
-{0x0F007070,0x5000},
-{0x0F007074,0x},
-{0x0F007078,0x},
-{0x0F00707C,0x},
-{0x0F007080,0x},
-{0x0F007084,0x},
+   {0x0F007000,0x00010001},
+   {0x0F007004,0x01010100},
+   {0x0F007008,0x0101},
+   {0x0F00700c,0x},
+   {0x0F007010,0x0100},
+   {0x0F007014,0x01000100},
+   {0x0F007018,0x0100},
+   {0x0F00701c,0x01020001}, // POP - 0x0002 Normal 0x0102
+   {0x0F007020,0x

[PATCH 3/5] Staging: bcm: DDRInit: Fixed coding style issue, replaced spaces w/ tab.(patch set)

2013-12-04 Thread Gary Rookard
This is the third patch of a series.(3)
Replaced spaces in margin w/ 1 tab for lines:
 121-125, 128-134, 136, 138-171, 173, 175

Signed-off-by: Gary Alan Rookard 
 On branch staging-next
---
 drivers/staging/bcm/DDRInit.c | 98 +--
 1 file changed, 49 insertions(+), 49 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index 6f5880b..d31dc71 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -118,61 +118,61 @@ static struct bcm_ddr_setting asT3_DDRSetting80MHz[]= {// 
  # DPLL Clock Setting
 //100Mhz
 #define T3_SKIP_CLOCK_PROGRAM_DUMP_100MHZ 13  //index for 0x0F007000
 static struct bcm_ddr_setting asT3_DDRSetting100MHz[]= {//  # DPLL Clock 
Setting
-{0x0F000800,0x7008},
-{0x0f000810,0x0F95},
-{0x0f000820,0x07F13E3F},
-{0x0f000860,0x},
-{0x0f000880,0x03DD},
+   {0x0F000800,0x7008},
+   {0x0f000810,0x0F95},
+   {0x0f000820,0x07F13E3F},
+   {0x0f000860,0x},
+   {0x0f000880,0x03DD},
 // Changed source for X-bar and MIPS clock to 
APLL
 //0x0f000840,0x0FFF1800,
-{0x0f000840,0x0FFF1B00},
-{0x0f000870,0x0002},
-{0x0F00a044,0x1fff},
-{0x0F00a040,0x1f00},
-{0x0F00a084,0x1Cff},
-{0x0F00a080,0x1C00},
-{0x0F00a04C,0x000C},
+   {0x0f000840,0x0FFF1B00},
+   {0x0f000870,0x0002},
+   {0x0F00a044,0x1fff},
+   {0x0F00a040,0x1f00},
+   {0x0F00a084,0x1Cff},
+   {0x0F00a080,0x1C00},
+   {0x0F00a04C,0x000C},
 //# Enable 2 ports within X-bar
-{0x0F00A000,0x0016},
+   {0x0F00A000,0x0016},
 //Memcontroller Default values
-{0x0F007000,0x00010001},
-{0x0F007004,0x01010100},
-{0x0F007008,0x0101},
-{0x0F00700c,0x},
-{0x0F007010,0x0100},
-{0x0F007014,0x01000100},
-{0x0F007018,0x0100},
-{0x0F00701c,0x01020001}, // POP - 
0x0002 Normal 0x0102
-{0x0F007020,0x04020107},//Normal - 
0x04030107 POP - 0x05030107
-{0x0F007024,0x0007},
-{0x0F007028,0x01020201},
-{0x0F00702c,0x0204040A},
-{0x0F007030,0x0600},
-{0x0F007034,0x0004},
-{0x0F007038,0x20080200},
-{0x0F00703C,0x02030320},
-{0x0F007040,0x6E7F1200},
-{0x0F007044,0x01190A00},
-{0x0F007048,0x06120305},//0x02690204 
// 0x06120305
-{0x0F00704c,0x},
-{0x0F007050,0x001C},
-{0x0F007054,0x},
-{0x0F007058,0x},
-{0x0F00705c,0x},
-{0x0F007060,0x00082ED6},
-{0x0F007064,0x000A},
-{0x0F007068,0x},
-{0x0F00706c,0x0001},
-{0x0F007070,0x5000},
-{0x0F007074,0x},
-{0x0F007078,0x},
-{0x0F00707C,0x},
-{0x0F007080,0x},
-{0x0F007084,0x},
+   {0x0F007000,0x00010001},
+   {0x0F007004,0x01010100},
+   {0x0F007008,0x0101},
+   {0x0F00700c,0x},
+   {0x0F007010,0x0100},
+   {0x0F007014,0x01000100},
+   {0x0F007018,0x0100},
+   {0x0F00701c,0x01020001}, // POP - 0x0002 Normal 0x0102
+   {0x0F007020,0x

[PATCH 2/5] Staging: bcm:DDRInit: Fixed coding style issue, replaced spaces w/ tab.(patch set)

2013-12-04 Thread Gary Rookard
This is the second patch of a series.(2)
Replaced spaces in margin w/ 1 tab for lines:
 69-78, 80-114, 116

Signed-off-by: Gary Alan Rookard 
 On branch staging-next
---
 drivers/staging/bcm/DDRInit.c | 92 +--
 1 file changed, 46 insertions(+), 46 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index 9ee844c..6f5880b 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -66,54 +66,54 @@ static struct bcm_ddr_setting asT3_DDRSetting133MHz[]= {//  
# DPLL Clock Set
 //80Mhz
 #define T3_SKIP_CLOCK_PROGRAM_DUMP_80MHZ 10  //index for 0x0F007000
 static struct bcm_ddr_setting asT3_DDRSetting80MHz[]= {//   # DPLL Clock 
Setting
-{0x0f000810,0x0F95},
-{0x0f000820,0x07f1},
-{0x0f000860,0x},
-{0x0f000880,0x03DD},
-{0x0F00a044,0x1fff},
-{0x0F00a040,0x1f00},
-{0x0F00a084,0x1Cff},
-{0x0F00a080,0x1C00},
-{0x0F00a000,0x0016},
-{0x0F00a04C,0x000C},
+   {0x0f000810,0x0F95},
+   {0x0f000820,0x07f1},
+   {0x0f000860,0x},
+   {0x0f000880,0x03DD},
+   {0x0F00a044,0x1fff},
+   {0x0F00a040,0x1f00},
+   {0x0F00a084,0x1Cff},
+   {0x0F00a080,0x1C00},
+   {0x0F00a000,0x0016},
+   {0x0F00a04C,0x000C},
 //Memcontroller Default values
-{0x0F007000,0x00010001},
-{0x0F007004,0x0100},
-{0x0F007008,0x0101},
-{0x0F00700c,0x},
-{0x0F007010,0x0100},
-{0x0F007014,0x01000100},
-{0x0F007018,0x0100},
-{0x0F00701c,0x0102},
-{0x0F007020,0x04020107},
-{0x0F007024,0x0007},
-{0x0F007028,0x02020201},
-{0x0F00702c,0x0204040a},
-{0x0F007030,0x0400},
-{0x0F007034,0x0002},
-{0x0F007038,0x1F060200},
-{0x0F00703C,0x1C1F},
-{0x0F007040,0x8A006600},
-{0x0F007044,0x221a0800},
-{0x0F007048,0x02690204},
-{0x0F00704c,0x},
-{0x0F007050,0x001c},
-{0x0F007054,0x},
-{0x0F007058,0x},
-{0x0F00705c,0x},
-{0x0F007060,0x000A15D6},
-{0x0F007064,0x000A},
-{0x0F007068,0x},
-{0x0F00706c,0x0001},
-{0x0F007070,0x4000},
-{0x0F007074,0x},
-{0x0F007078,0x},
-{0x0F00707C,0x},
-{0x0F007080,0x},
-{0x0F007084,0x},
-{0x0F007094,0x0104},
+   {0x0F007000,0x00010001},
+   {0x0F007004,0x0100},
+   {0x0F007008,0x0101},
+   {0x0F00700c,0x},
+   {0x0F007010,0x0100},
+   {0x0F007014,0x01000100},
+   {0x0F007018,0x0100},
+   {0x0F00701c,0x0102},
+{0x0F007020,0x04020107},
+{0x0F007024,0x0007},
+   {0x0F007028,0x02020201},
+   {0x0F00702c,0x0204040a},
+   {0x0F007030,0x0400},
+   {0x0F007034,0x0002},
+   {0x0F007038,0x1F060200},
+   {0x0F00703C,0x1C1F},
+   {0x0F007040,0x8A006600},
+   {0x0F007044,0x221a0800},
+   {0x0F007048,0x02690204},
+   {0x0F00704c,0x},
+   {0x0F007050,0x001c},
+   {0x0F007054,0x},
+   {0x0F007058,0x},
+   {0x0F00705c,0x},
+   {0x0F007060,0x000A15D6},
+   {0x0F007064,0x000A},
+   {0x0F007068,0x},

[PATCH 1/5] Staging: bcm: DDRInit: Fixed coding style issue, replaced spaces w/ tabs.(patch set)

2013-12-04 Thread Gary Rookard
This is the first patch of a series.
Replaced spaces in margin w/ 1 tab for lines:
 11-15, 17-23, 25-58, 60, 62, 64

 On branch staging-next
---
 drivers/staging/bcm/DDRInit.c | 98 +--
 1 file changed, 49 insertions(+), 49 deletions(-)

diff --git a/drivers/staging/bcm/DDRInit.c b/drivers/staging/bcm/DDRInit.c
index 9f7e30f..9ee844c 100644
--- a/drivers/staging/bcm/DDRInit.c
+++ b/drivers/staging/bcm/DDRInit.c
@@ -8,60 +8,60 @@
 //DDR INIT-133Mhz
 #define T3_SKIP_CLOCK_PROGRAM_DUMP_133MHZ 12  //index for 0x0F007000
 static struct bcm_ddr_setting asT3_DDRSetting133MHz[]= {//  # DPLL Clock 
Setting
-{0x0F000800,0x7212},
-{0x0f000820,0x07F13FFF},
-{0x0f000810,0x0F95},
-{0x0f000860,0x},
-{0x0f000880,0x03DD},
+   {0x0F000800,0x7212},
+   {0x0f000820,0x07F13FFF},
+   {0x0f000810,0x0F95},
+   {0x0f000860,0x},
+   {0x0f000880,0x03DD},
 // Changed source for X-bar and MIPS 
clock to APLL
-{0x0f000840,0x0FFF1B00},
-{0x0f000870,0x0002},
-{0x0F00a044,0x1fff},
-{0x0F00a040,0x1f00},
-{0x0F00a084,0x1Cff},
-{0x0F00a080,0x1C00},
-{0x0F00a04C,0x000C},
+   {0x0f000840,0x0FFF1B00},
+   {0x0f000870,0x0002},
+   {0x0F00a044,0x1fff},
+   {0x0F00a040,0x1f00},
+   {0x0F00a084,0x1Cff},
+   {0x0F00a080,0x1C00},
+   {0x0F00a04C,0x000C},
 //Memcontroller Default values
-{0x0F007000,0x00010001},
-{0x0F007004,0x01010100},
-{0x0F007008,0x0101},
-{0x0F00700c,0x},
-{0x0F007010,0x0100},
-{0x0F007014,0x01000100},
-{0x0F007018,0x0100},
-{0x0F00701c,0x01020001},// POP - 
0x00020001 Normal 0x01020001
-{0x0F007020,0x04030107}, //Normal - 
0x04030107 POP - 0x05030107
-{0x0F007024,0x0207},
-{0x0F007028,0x02020202},
-{0x0F00702c,0x0206060a},//ROB- 
0x0205050a,//0x0206060a
-{0x0F007030,0x0500},
-{0x0F007034,0x0003},
-{0x0F007038,0x110a0200},//ROB - 
0x110a0200,//0x180a0200,// 0x1f0a0200
-{0x0F00703C,0x02101010},//ROB - 
0x02101010,//0x02101018},
-{0x0F007040,0x45751200},//ROB - 
0x45751200,//0x450f1200},
-{0x0F007044,0x110a0d00},//ROB - 
0x110a0d00//0x111f0d00
-{0x0F007048,0x081b0306},
-{0x0F00704c,0x},
-{0x0F007050,0x001c},
-{0x0F007054,0x},
-{0x0F007058,0x},
-{0x0F00705c,0x},
-{0x0F007060,0x0010246c},
-{0x0F007064,0x0010},
-{0x0F007068,0x},
-{0x0F00706c,0x0001},
-{0x0F007070,0x7000},
-{0x0F007074,0x},
-{0x0F007078,0x},
-{0x0F00707C,0x},
-{0x0F007080,0x},
-{0x0F007084,0x},
+   {0x0F007000,0x00010001},
+   {0x0F007004,0x01010100},
+   {0x0F007008,0x0101},
+   {0x0F00700c,0x},
+   {0x0F007010,0x0100},
+   {0x0F007014,0x01000100},
+   {0x0F007018,0x0100},
+   {0x0F00701c,0x01020001},// POP - 0x00020001 Normal 0x01020001
+   {0x0F007020,0x04030107}, //Normal - 0x04030107 POP - 0x05030107
+   {0x0F007024,0x0207},
+   {0x0F007028,0x02020202},
+   {0x0F00702c,0x0206060a},//ROB- 0x0205050a,//0x020