staging:gpib:agilent_82350b: Removed commented out code
PATCH v2 2/4 staging:gpib:agilent_82350b: Removed commented out code
In reply to a message not in the archiveFrom: Ravi Kumar Kairi <[email protected]>
Removed commented out debugging code to make code look cleaner as spcified by TODO
--- drivers/staging/gpib/agilent_82350b/agilent_82350b.c | 9 --------- 1 file changed, 9 deletions(-)
drivers/staging/gpib/agilent_82350b/agilent_82350b.c +0 -9
@@ -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); #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, sizereturn 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); 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); 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, sizereturn retval;if (send_eoi) { -//pr_info("ag_ac_wr: sending last byte with eoi byte no: %d\n", -// fifotransferlength+1); retval =agilent_82350b_write (board, buffer + fifotransferlength,1 , send_eoi, &num_bytes);
@@ -284,7 +276,6 @@ static irqreturn_t agilent_82350b_interrupt(int irq, void *arg)tms9914_interrupt_have_status (board, &a_priv->tms9914_priv, tms9914_status1, tms9914_status2); } -//pr_info("event_status=0x%x s1 %x s2 %x\n", event_status,tms9914_status1,tms9914_status2); //write-clear status bits if (event_status & (BUFFER_END_STATUS_BIT |TERM_COUNT_STATUS_BIT )) { writeb(event_status & (BUFFER_END_STATUS_BIT | TERM_COUNT_STATUS_BIT),
Signature · 1 line
2.48.1
PATCH v2 2/4 staging:gpib:agilent_82350b: Removed commented out code
In reply to a message not in the archiveFrom: Ravi Kumar Kairi <[email protected]>
Removed commented out debugging code to make code look cleaner as spcified by TODO
--- drivers/staging/gpib/agilent_82350b/agilent_82350b.c | 9 --------- 1 file changed, 9 deletions(-)
drivers/staging/gpib/agilent_82350b/agilent_82350b.c +0 -9
@@ -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); #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, sizereturn 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); 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); 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, sizereturn retval;if (send_eoi) { -//pr_info("ag_ac_wr: sending last byte with eoi byte no: %d\n", -// fifotransferlength+1); retval =agilent_82350b_write (board, buffer + fifotransferlength,1 , send_eoi, &num_bytes);
@@ -284,7 +276,6 @@ static irqreturn_t agilent_82350b_interrupt(int irq, void *arg)tms9914_interrupt_have_status (board, &a_priv->tms9914_priv, tms9914_status1, tms9914_status2); } -//pr_info("event_status=0x%x s1 %x s2 %x\n", event_status,tms9914_status1,tms9914_status2); //write-clear status bits if (event_status & (BUFFER_END_STATUS_BIT |TERM_COUNT_STATUS_BIT )) { writeb(event_status & (BUFFER_END_STATUS_BIT | TERM_COUNT_STATUS_BIT),
Signature · 1 line
2.48.1
PATCH v2 3/4 staging:gpib:agilent_82350b:Removed blank line
In reply to a message not in the archiveFrom: Ravi Kumar Kairi <[email protected]>
removed few empty lines that were causing checkpatch script warnings
--- drivers/staging/gpib/agilent_82350b/agilent_82350b.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/staging/gpib/agilent_82350b/agilent_82350b.c +0 -4
@@ -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); -#ifdef EXPERIMENTAL pr_info ("ag_ac_wr: wait for previous BO to complete if any\n" ); retval = wait_event_interruptible(board->wait,
@@ -193,8 +192,6 @@ static int agilent_82350b_accel_write(gpib_board_t *board, uint8_t *buffer, size *bytes_written += num_bytes;if (retval <0 )return retval; - -write_byte (tms_priv, tms_priv->imr0_bits & ~HR_BOIE ,IMR0 );for (i =1 ; i < fifotransferlength;) {clear_bit (WRITE_READY_BN , &tms_priv->state);
@@ -207,7 +204,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 ); -if (agilent_82350b_fifo_is_halted (a_priv)) {writeb (RESTART_STREAM_BIT , a_priv->gpib_base +STREAM_STATUS_REG );// pr_info("ag_ac_wr: needed restart\n");
Signature · 1 line
2.48.1
PATCH v2 3/4 staging:gpib:agilent_82350b:Removed blank line
In reply to a message not in the archiveFrom: Ravi Kumar Kairi <[email protected]>
removed few empty lines that were causing checkpatch script warnings
--- drivers/staging/gpib/agilent_82350b/agilent_82350b.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/staging/gpib/agilent_82350b/agilent_82350b.c +0 -4
@@ -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); -#ifdef EXPERIMENTAL pr_info ("ag_ac_wr: wait for previous BO to complete if any\n" ); retval = wait_event_interruptible(board->wait,
@@ -193,8 +192,6 @@ static int agilent_82350b_accel_write(gpib_board_t *board, uint8_t *buffer, size *bytes_written += num_bytes;if (retval <0 )return retval; - -write_byte (tms_priv, tms_priv->imr0_bits & ~HR_BOIE ,IMR0 );for (i =1 ; i < fifotransferlength;) {clear_bit (WRITE_READY_BN , &tms_priv->state);
@@ -207,7 +204,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 ); -if (agilent_82350b_fifo_is_halted (a_priv)) {writeb (RESTART_STREAM_BIT , a_priv->gpib_base +STREAM_STATUS_REG );// pr_info("ag_ac_wr: needed restart\n");
Signature · 1 line
2.48.1
PATCH v2 4/4 staging:gpib:agilent_82350b: Fix Indent issue with block
In reply to a message not in the archiveFrom: Ravi Kumar Kairi <[email protected]>
There was a empty line, which was causing the checkpatch script to think it's a single line statment, after removing the empty line it's no longer asking to check that line.
--- drivers/staging/gpib/agilent_82350b/agilent_82350b.c | 1 - 1 file changed, 1 deletion(-)
drivers/staging/gpib/agilent_82350b/agilent_82350b.c +0 -1
@@ -228,7 +228,6 @@ static int agilent_82350b_accel_write(gpib_board_t *board, uint8_t *buffer, sizereturn retval;if (send_eoi) { - retval =agilent_82350b_write (board, buffer + fifotransferlength,1 , send_eoi, &num_bytes); *bytes_written += num_bytes;
Signature · 1 line
2.48.1
Quoted 15 lines · Ravi Kumar kairi
From: Ravi Kumar Kairi <[email protected]>
Removed commented out debugging code to make code look cleaner as spcified by TODO
Signed-off-by Ravi Kumar Kairi <[email protected]>--- drivers/staging/gpib/agilent_82350b/agilent_82350b.c | 9 --------- 1 file changed, 9 deletions(-)drivers/staging/gpib/agilent_82350b/agilent_82350b.c +0
-0
drivers/staging/gpib/agilent_82350b/agilent_82350b.c static int agilent_82350b_accel_write(gpib_board_t *board, uint8_t *buffer, size · line 179
Quoted 5 lines
drivers/staging/gpib/agilent_82350b/agilent_82350b.c +0
-1@@ -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.
Quoted 4 lines
drivers/staging/gpib/agilent_82350b/agilent_82350b.c +0
-0#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, sizereturn retval;
drivers/staging/gpib/agilent_82350b/agilent_82350b.c static int agilent_82350b_accel_write(gpib_board_t *board, uint8_t *buffer, size · line 197
Quoted 10 lines
drivers/staging/gpib/agilent_82350b/agilent_82350b.c +0
-2#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.
drivers/staging/gpib/agilent_82350b/agilent_82350b.c static int agilent_82350b_accel_write(gpib_board_t *board, uint8_t *buffer, size · line 210
Quoted 9 lines
drivers/staging/gpib/agilent_82350b/agilent_82350b.c +0
-2write_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.
Quoted 11 lines
drivers/staging/gpib/agilent_82350b/agilent_82350b.c +0
-1if (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);
drivers/staging/gpib/agilent_82350b/agilent_82350b.c static int agilent_82350b_accel_write(gpib_board_t *board, uint8_t *buffer, size · line 235
Quoted 6 lines
drivers/staging/gpib/agilent_82350b/agilent_82350b.c +0
-2@@ -238,8 +232,6 @@ static int agilent_82350b_accel_write(gpib_board_t *board, uint8_t *buffer, sizereturn 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