This fixes "line over 80 characters" for lines that are "over 140 characters"
  A further patch can be released to fix remaining "line over 80 characters" if 
necessary.

  drivers/staging/bcm/Bcmchar.c |  123 ++++++++++++++++++++++++++++++----------
  1 files changed, 92 insertions(+), 31 deletions(-)

Signed-off-by: Ceri James <[email protected]>
---
 drivers/staging/bcm/Bcmchar.c |  111 +++++++++++++++++++++++++++++------------
 1 files changed, 79 insertions(+), 32 deletions(-)

diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c
index 1e2a713..703236c 100644
--- a/drivers/staging/bcm/Bcmchar.c
+++ b/drivers/staging/bcm/Bcmchar.c
@@ -369,7 +369,9 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, 
ULONG arg)
                if ((((ULONG)sWrmBuffer.Register & 0x0F000000) != 0x0F000000) ||
                        ((ULONG)sWrmBuffer.Register & 0x3)) {
 
-                       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "WRM 
Done On invalid Address : %x Access Denied.\n", (int)sWrmBuffer.Register);
+                       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0,
+                                       "WRM Done On invalid Address : %x 
Access Denied.\n",
+                                       (int)sWrmBuffer.Register);
                        return -EINVAL;
                }
 
@@ -425,7 +427,10 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, 
ULONG arg)
                value = (1<<uiBit);
 
                if (IsReqGpioIsLedInNVM(Adapter, value) == FALSE) {
-                       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, 
DBG_LVL_ALL, "Sorry, Requested GPIO<0x%X> is not correspond to LED !!!", value);
+                       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG,
+                                       DBG_LVL_ALL,
+                                       "Sorry, Requested GPIO<0x%X> is not 
correspond to LED !!!",
+                                       value);
                        Status = -EINVAL;
                        break;
                }
@@ -479,7 +484,8 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, 
ULONG arg)
 
        case BCM_LED_THREAD_STATE_CHANGE_REQ: {
                USER_THREAD_REQ threadReq = {0};
-               BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, 
DBG_LVL_ALL, "User made LED thread InActive");
+               BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL,
+                               "User made LED thread InActive");
 
                if ((Adapter->IdleMode == TRUE) ||
                        (Adapter->bShutStatus == TRUE) ||
@@ -939,7 +945,8 @@ cntrlEnd:
        case IOCTL_CHIP_RESET: {
                INT NVMAccess = down_trylock(&Adapter->NVMRdmWrmLock);
                if (NVMAccess) {
-                       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, " 
IOCTL_BCM_CHIP_RESET not allowed as EEPROM Read/Write is in progress\n");
+                       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0,
+                                       " IOCTL_BCM_CHIP_RESET not allowed as 
EEPROM Read/Write is in progress\n");
                        return -EACCES;
                }
 
@@ -985,11 +992,13 @@ cntrlEnd:
 
                if (uiData) {
                        /* Allow All Packets */
-                       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, 
DBG_LVL_ALL, "IOCTL_BCM_SWITCH_TRANSFER_MODE: ETH_PACKET_TUNNELING_MODE\n");
-                               Adapter->TransferMode = 
ETH_PACKET_TUNNELING_MODE;
+                       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, 
DBG_LVL_ALL,
+                                       "IOCTL_BCM_SWITCH_TRANSFER_MODE: 
ETH_PACKET_TUNNELING_MODE\n");
+                                       Adapter->TransferMode = 
ETH_PACKET_TUNNELING_MODE;
                } else {
                        /* Allow IP only Packets */
-                       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, 
DBG_LVL_ALL, "IOCTL_BCM_SWITCH_TRANSFER_MODE: IP_PACKET_ONLY_MODE\n");
+                       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, 
DBG_LVL_ALL,
+                                       "IOCTL_BCM_SWITCH_TRANSFER_MODE: 
IP_PACKET_ONLY_MODE\n");
                        Adapter->TransferMode = IP_PACKET_ONLY_MODE;
                }
                Status = STATUS_SUCCESS;
@@ -1148,7 +1157,9 @@ cntrlEnd:
                if (((ULONG)pBulkBuffer->Register & 0x0F000000) != 0x0F000000 ||
                        ((ULONG)pBulkBuffer->Register & 0x3)) {
                        kfree(pvBuffer);
-                       BCM_DEBUG_PRINT (Adapter, DBG_TYPE_PRINTK, 0, 0, "WRM 
Done On invalid Address : %x Access Denied.\n", (int)pBulkBuffer->Register);
+                       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0,
+                                       "WRM Done On invalid Address : %x 
Access Denied.\n",
+                                       (int)pBulkBuffer->Register);
                        Status = -EINVAL;
                        break;
                }
@@ -1168,9 +1179,13 @@ cntrlEnd:
                }
 
                if (pBulkBuffer->SwapEndian == FALSE)
-                       Status = wrmWithLock(Adapter, 
(UINT)pBulkBuffer->Register, (PCHAR)pBulkBuffer->Values, IoBuffer.InputLength - 
2*sizeof(ULONG));
+                       Status = wrmWithLock(Adapter, 
(UINT)pBulkBuffer->Register,
+                                               (PCHAR)pBulkBuffer->Values,
+                                               IoBuffer.InputLength - 
2*sizeof(ULONG));
                else
-                       Status = wrmaltWithLock(Adapter, 
(UINT)pBulkBuffer->Register, (PUINT)pBulkBuffer->Values, IoBuffer.InputLength - 
2*sizeof(ULONG));
+                       Status = wrmaltWithLock(Adapter, 
(UINT)pBulkBuffer->Register,
+                                               (PUINT)pBulkBuffer->Values,
+                                               IoBuffer.InputLength - 
2*sizeof(ULONG));
 
                if (Status != STATUS_SUCCESS)
                        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "WRM 
Failed\n");
@@ -1269,7 +1284,8 @@ cntrlEnd:
                memset(&tv0, 0, sizeof(struct timeval));
                memset(&tv1, 0, sizeof(struct timeval));
                if ((Adapter->eNVMType == NVM_FLASH) && 
(Adapter->uiFlashLayoutMajorVersion == 0)) {
-                       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "The 
Flash Control Section is Corrupted. Hence Rejection on NVM Read/Write\n");
+                       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0,
+                                       "The Flash Control Section is 
Corrupted. Hence Rejection on NVM Read/Write\n");
                        return -EFAULT;
                }
 
@@ -1299,7 +1315,10 @@ cntrlEnd:
                        return STATUS_FAILURE;
 
                if (stNVMReadWrite.uiOffset > Adapter->uiNVMDSDSize - 
stNVMReadWrite.uiNumBytes) {
-                       /* BCM_DEBUG_PRINT(Adapter,DBG_TYPE_PRINTK, 0, 0,"Can't 
allow access beyond NVM Size: 0x%x 0x%x\n", stNVMReadWrite.uiOffset, 
stNVMReadWrite.uiNumBytes); */
+                       /* BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0,
+                        *                      "Can't allow access beyond NVM 
Size: 0x%x 0x%x\n",
+                        *                      stNVMReadWrite.uiOffset,
+                        *                      stNVMReadWrite.uiNumBytes); */
                        return STATUS_FAILURE;
                }
 
@@ -1350,15 +1369,15 @@ cntrlEnd:
                        Adapter->bHeaderChangeAllowed = TRUE;
                        if (IsFlash2x(Adapter)) {
                                /*
-                                *                      New Requirement:-
-                                *                      DSD section updation 
will be allowed in two case:-
-                                *                      1.  if DSD sig is 
present in DSD header means dongle is ok and updation is fruitfull
-                                *                      2.  if point 1 failes 
then user buff should have DSD sig. this point ensures that if dongle is
-                                *                            corrupted then 
user space program first modify the DSD header with valid DSD sig so
-                                *                            that this as well 
as further write may be worthwhile.
+                                * New Requirement:-
+                                * DSD section updation will be allowed in two 
case:-
+                                *      1.  if DSD sig is present in DSD header 
means dongle is ok and updation is fruitfull
+                                *      2.  if point 1 failes then user buff 
should have DSD sig. this point ensures that if dongle is
+                                *            corrupted then user space program 
first modify the DSD header with valid DSD sig so
+                                *            that this as well as further 
write may be worthwhile.
                                 *
-                                *                       This restriction has 
been put assuming that if DSD sig is corrupted, DSD
-                                *                       data won't be 
considered valid.
+                                * This restriction has been put assuming that 
if DSD sig is corrupted, DSD
+                                * data won't be considered valid.
                                 */
 
                                Status = BcmFlash2xCorruptSig(Adapter, 
Adapter->eActiveDSD);
@@ -1366,7 +1385,9 @@ cntrlEnd:
                                        if (((stNVMReadWrite.uiOffset + 
stNVMReadWrite.uiNumBytes) != Adapter->uiNVMDSDSize) ||
                                                (stNVMReadWrite.uiNumBytes < 
SIGNATURE_SIZE)) {
 
-                                               BCM_DEBUG_PRINT(Adapter, 
DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "DSD Sig is present neither in Flash 
nor User provided Input..");
+                                               BCM_DEBUG_PRINT(Adapter, 
DBG_TYPE_OTHERS,
+                                                               OSAL_DBG, 
DBG_LVL_ALL,
+                                                               "DSD Sig is 
present neither in Flash nor User provided Input..");
                                                up(&Adapter->NVMRdmWrmLock);
                                                kfree(pReadData);
                                                return Status;
@@ -1374,7 +1395,9 @@ cntrlEnd:
 
                                        ulDSDMagicNumInUsrBuff = 
ntohl(*(PUINT)(pReadData + stNVMReadWrite.uiNumBytes - SIGNATURE_SIZE));
                                        if (ulDSDMagicNumInUsrBuff != 
DSD_IMAGE_MAGIC_NUMBER) {
-                                               BCM_DEBUG_PRINT(Adapter, 
DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "DSD Sig is present neither in Flash 
nor User provided Input..");
+                                               BCM_DEBUG_PRINT(Adapter, 
DBG_TYPE_OTHERS,
+                                                               OSAL_DBG, 
DBG_LVL_ALL,
+                                                               "DSD Sig is 
present neither in Flash nor User provided Input..");
                                                up(&Adapter->NVMRdmWrmLock);
                                                kfree(pReadData);
                                                return Status;
@@ -1382,7 +1405,10 @@ cntrlEnd:
                                }
                        }
 
-                       Status = BeceemNVMWrite(Adapter, (PUINT)pReadData, 
stNVMReadWrite.uiOffset, stNVMReadWrite.uiNumBytes, stNVMReadWrite.bVerify);
+                       Status = BeceemNVMWrite(Adapter, (PUINT)pReadData,
+                                               stNVMReadWrite.uiOffset,
+                                               stNVMReadWrite.uiNumBytes,
+                                               stNVMReadWrite.bVerify);
                        if (IsFlash2x(Adapter))
                                BcmFlash2xWriteSig(Adapter, 
Adapter->eActiveDSD);
 
@@ -1397,7 +1423,9 @@ cntrlEnd:
                }
 
                do_gettimeofday(&tv1);
-               BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, 
DBG_LVL_ALL, " timetaken by Write/read :%ld msec\n", (tv1.tv_sec - 
tv0.tv_sec)*1000 + (tv1.tv_usec - tv0.tv_usec)/1000);
+               BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL,
+                               " timetaken by Write/read :%ld msec\n",
+                               (tv1.tv_sec - tv0.tv_sec)*1000 + (tv1.tv_usec - 
tv0.tv_usec)/1000);
 
                kfree(pReadData);
                return STATUS_SUCCESS;
@@ -1469,7 +1497,10 @@ cntrlEnd:
                        /* Reading the data from Flash 2.x */
                        Status = BcmFlash2xBulkRead(Adapter, (PUINT)pReadBuff, 
sFlash2xRead.Section, ReadOffset, ReadBytes);
                        if (Status) {
-                               BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, 
OSAL_DBG, DBG_LVL_ALL, "Flash 2x read err with Status :%d", Status);
+                               BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS,
+                                               OSAL_DBG, DBG_LVL_ALL,
+                                               "Flash 2x read err with Status 
:%d",
+                                               Status);
                                break;
                        }
 
@@ -1477,7 +1508,10 @@ cntrlEnd:
 
                        Status = copy_to_user(OutPutBuff, pReadBuff, ReadBytes);
                        if (Status) {
-                               BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, 
OSAL_DBG, DBG_LVL_ALL, "Copy to use failed with status :%d", Status);
+                               BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS,
+                                               OSAL_DBG, DBG_LVL_ALL,
+                                               "Copy to use failed with status 
:%d",
+                                               Status);
                                up(&Adapter->NVMRdmWrmLock);
                                kfree(pReadBuff);
                                return -EFAULT;
@@ -1579,7 +1613,10 @@ cntrlEnd:
                        BCM_DEBUG_PRINT_BUFFER(Adapter, DBG_TYPE_OTHERS, 
OSAL_DBG, DBG_LVL_ALL, pWriteBuff, WriteBytes);
 
                        /* Writing the data from Flash 2.x */
-                       Status = BcmFlash2xBulkWrite(Adapter, 
(PUINT)pWriteBuff, sFlash2xWrite.Section, WriteOffset, WriteBytes, 
sFlash2xWrite.bVerify);
+                       Status = BcmFlash2xBulkWrite(Adapter, (PUINT)pWriteBuff,
+                                                       sFlash2xWrite.Section,
+                                                       WriteOffset, WriteBytes,
+                                                       sFlash2xWrite.bVerify);
 
                        if (Status) {
                                BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, 
"Flash 2x read err with Status :%d", Status);
@@ -1720,17 +1757,23 @@ cntrlEnd:
                BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, 
DBG_LVL_ALL, "NOB :%x", sCopySectStrut.numOfBytes);
 
                if (IsSectionExistInFlash(Adapter, sCopySectStrut.SrcSection) 
== FALSE) {
-                       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Source 
Section<%x> does not exixt in Flash ", sCopySectStrut.SrcSection);
+                       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0,
+                                       "Source Section<%x> does not exixt in 
Flash ",
+                                       sCopySectStrut.SrcSection);
                        return -EINVAL;
                }
 
                if (IsSectionExistInFlash(Adapter, sCopySectStrut.DstSection) 
== FALSE) {
-                       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, 
"Destinatio Section<%x> does not exixt in Flash ", sCopySectStrut.DstSection);
+                       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0,
+                                       "Destinatio Section<%x> does not exixt 
in Flash ",
+                                       sCopySectStrut.DstSection);
                        return -EINVAL;
                }
 
                if (sCopySectStrut.SrcSection == sCopySectStrut.DstSection) {
-                       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, 
DBG_LVL_ALL, "Source and Destination section should be different");
+                       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG,
+                                       DBG_LVL_ALL,
+                                       "Source and Destination section should 
be different");
                        return -EINVAL;
                }
 
@@ -1830,7 +1873,9 @@ cntrlEnd:
 
                SectOfset = BcmGetSectionValStartOffset(Adapter, 
eFlash2xSectionVal);
                if (SectOfset == INVALID_OFFSET) {
-                       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, 
"Provided Section val <%d> does not exixt in Flash 2.x", eFlash2xSectionVal);
+                       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0,
+                                       "Provided Section val <%d> does not 
exixt in Flash 2.x",
+                                       eFlash2xSectionVal);
                        return -EINVAL;
                }
 
@@ -1949,7 +1994,9 @@ cntrlEnd:
                        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, 
DBG_LVL_ALL, "copy of control bit mask failed from user space");
                        return -EFAULT;
                }
-               BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, 
DBG_LVL_ALL, "\n Got user defined cntrl msg bit mask :%lx", RxCntrlMsgBitMask);
+               BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL,
+                               "\n Got user defined cntrl msg bit mask :%lx",
+                               RxCntrlMsgBitMask);
                pTarang->RxCntrlMsgBitMask = RxCntrlMsgBitMask;
        }
        break;
-- 
1.7.5.4

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

Reply via email to