Re: [PATCH 1/2] [PATCH V2 2/4] staging:gpib:agilent_82350b: Removed commented out code

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

 



On Mon, Feb 17, 2025 at 03:35:11PM +0530, Ravi Kumar kairi wrote:
> From: Ravi Kumar Kairi <kumarkairiravi@xxxxxxxxx>
> 
> Removed commented out debugging code to make code look cleaner as
> spcified by TODO
> 
> Signed-off-by: Ravi Kumar Kairi <kumarkairiravi@xxxxxxxxx>
> ---
>  drivers/staging/gpib/agilent_82350b/agilent_82350b.c | 9 ---------
>  1 file changed, 9 deletions(-)
> 
> diff --git a/drivers/staging/gpib/agilent_82350b/agilent_82350b.c b/drivers/staging/gpib/agilent_82350b/agilent_82350b.c
> index 5a74a22015..7936c7285d 100644
> --- a/drivers/staging/gpib/agilent_82350b/agilent_82350b.c
> +++ b/drivers/staging/gpib/agilent_82350b/agilent_82350b.c
> @@ -176,7 +176,6 @@ static int agilent_82350b_accel_write(gpib_board_t *board, uint8_t *buffer, size
>  
>  	event_status = read_and_clear_event_status(board);
>  
> -	//pr_info("ag_ac_wr: event status 0x%x tms state 0x%lx\n", event_status, tms_priv->state);
>  

The rules for splitting patches up are a bit subtle.  Here the rule is
that if you make a change, it can't introduce new style issues.  You've
introduced two blank lines in a row so you must delete one.



>  #ifdef EXPERIMENTAL
>  	pr_info("ag_ac_wr: wait for previous BO to complete if any\n");
> @@ -190,13 +189,11 @@ static int agilent_82350b_accel_write(gpib_board_t *board, uint8_t *buffer, size
>  		return retval;
>  #endif
>  
> -	//pr_info("ag_ac_wr: sending first byte\n");
>  	retval = agilent_82350b_write(board, buffer, 1, 0, &num_bytes);
>  	*bytes_written += num_bytes;
>  	if (retval < 0)
>  		return retval;
>  
> -	//pr_info("ag_ac_wr: %ld bytes eoi %d tms state 0x%lx\n",length, send_eoi, tms_priv->state);
>  

Same.

>  	write_byte(tms_priv, tms_priv->imr0_bits & ~HR_BOIE, IMR0);
>  	for (i = 1; i < fifotransferlength;) {
> @@ -210,8 +207,6 @@ static int agilent_82350b_accel_write(gpib_board_t *board, uint8_t *buffer, size
>  		}
>  		writeb(ENABLE_TI_TO_SRAM, a_priv->gpib_base + SRAM_ACCESS_CONTROL_REG);
>  
> -		//pr_info("ag_ac_wr: send block: %d bytes tms 0x%lx\n", block_size,
> -		// tms_priv->state);
>  

Same.

>  		if (agilent_82350b_fifo_is_halted(a_priv)) {
>  			writeb(RESTART_STREAM_BIT, a_priv->gpib_base + STREAM_STATUS_REG);
> @@ -226,7 +221,6 @@ static int agilent_82350b_accel_write(gpib_board_t *board, uint8_t *buffer, size
>  						  test_bit(TIMO_NUM, &board->status));
>  		writeb(0, a_priv->gpib_base + SRAM_ACCESS_CONTROL_REG);
>  		num_bytes = block_size - read_transfer_counter(a_priv);
> -		//pr_info("ag_ac_wr: sent  %ld bytes tms 0x%lx\n", num_bytes, tms_priv->state);
>  
>  		*bytes_written += num_bytes;
>  		retval = translate_wait_return_value(board, retval);
> @@ -238,8 +232,6 @@ static int agilent_82350b_accel_write(gpib_board_t *board, uint8_t *buffer, size
>  		return retval;
>  
>  	if (send_eoi) {
> -		//pr_info("ag_ac_wr: sending last byte with eoi byte no:   %d\n",
> -		// fifotransferlength+1);
>  

Here you should delete the blanke as well.  I don't know if checkpatch
will complain but you can't have a blank line after a { or before a }.

regards,
dan carpenter





[Index of Archives]     [Linux Driver Development]     [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