Re: [PATCH 2/3 v2] staging: bcm: Bcmchar.c - Checkpatch fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Oct 27, 2012 at 07:54:24PM +0100, Ceri James wrote:
>   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 <jamesceri@xxxxxxxxxxxxxx>
> ---
>  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;
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is indented too far now.  It's better to wait over night and
re-review your changes the next morning before resending.

> @@ -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);

We would normally put spaces around the multiply and divide as well.

				(tv1.tv_sec - tv0.tv_sec) * 1000 + (tv1.tv_usec - tv0.tv_usec) / 1000);

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux