All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: qlogicpti: Remove unneeded semicolon
@ 2021-08-10 12:42 Jason Wang
  0 siblings, 0 replies; 9+ messages in thread
From: Jason Wang @ 2021-08-10 12:42 UTC (permalink / raw)
  To: martin.petersen; +Cc: jejb, linux-scsi, linux-kernel, Jason Wang

The semicolon after a code block bracket is unneeded in C. Thus, we can
remove the redundant semicolon from the code safely.

Signed-off-by: Jason Wang <wangborong@cdjrlc.com>
---
 drivers/scsi/qlogicpti.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index d84e218d32cb..d1d5ede38500 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -513,7 +513,7 @@ static int qlogicpti_load_firmware(struct qlogicpti *qpti)
 		       qpti->qpti_id);
 		err = 1;
 		goto out;
-	}		
+	}
 	sbus_writew(SBUS_CTRL_RESET, qpti->qregs + SBUS_CTRL);
 	sbus_writew((DMA_CTRL_CCLEAR | DMA_CTRL_CIRQ), qpti->qregs + CMD_DMA_CTRL);
 	sbus_writew((DMA_CTRL_CCLEAR | DMA_CTRL_CIRQ), qpti->qregs + DATA_DMA_CTRL);
@@ -563,7 +563,7 @@ static int qlogicpti_load_firmware(struct qlogicpti *qpti)
 		       qpti->qpti_id);
 		err = 1;
 		goto out;
-	}		
+	}
 
 	/* Load it up.. */
 	for (i = 0; i < risc_code_length; i++) {
@@ -1136,7 +1136,7 @@ static struct scsi_cmnd *qlogicpti_intr_handler(struct qlogicpti *qpti)
 
 	if (!(sbus_readw(qpti->qregs + SBUS_STAT) & SBUS_STAT_RINT))
 		return NULL;
-		
+
 	in_ptr = sbus_readw(qpti->qregs + MBOX5);
 	sbus_writew(HCCTRL_CRIRQ, qpti->qregs + HCCTRL);
 	if (sbus_readw(qpti->qregs + SBUS_SEMAPHORE) & SBUS_SEMAPHORE_LCK) {
@@ -1150,7 +1150,7 @@ static struct scsi_cmnd *qlogicpti_intr_handler(struct qlogicpti *qpti)
 		case COMMAND_ERROR:
 		case COMMAND_PARAM_ERROR:
 			break;
-		};
+		}
 		sbus_writew(0, qpti->qregs + SBUS_SEMAPHORE);
 	}
 
@@ -1364,7 +1364,7 @@ static int qpti_sbus_probe(struct platform_device *op)
 		printk("(FCode %s)", fcode);
 	if (of_find_property(dp, "differential", NULL) != NULL)
 		qpti->differential = 1;
-			
+
 	printk("\nqlogicpti%d: [%s Wide, using %s interface]\n",
 		qpti->qpti_id,
 		(qpti->ultra ? "Ultra" : "Fast"),
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] scsi: qlogicpti: Remove unneeded semicolon
  2023-06-14  8:54 ` baomingtong001
@ 2023-06-14 18:17   ` Bart Van Assche
  0 siblings, 0 replies; 9+ messages in thread
From: Bart Van Assche @ 2023-06-14 18:17 UTC (permalink / raw)
  To: baomingtong001, jejb, martin.petersen; +Cc: linux-scsi, linux-kernel

On 6/14/23 01:54, baomingtong001@208suo.com wrote:
> ./drivers/scsi/qlogicpti.c:1153:3-4: Unneeded semicolon

That's a very short patch description. Although I'm not sure this patch 
will be considered useful by anyone, please mention the name of the tool 
that has been used to detect the unneeded semicolon in the patch 
description.

Thanks,

Bart.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] scsi: qlogicpti: Remove unneeded semicolon
       [not found] <20230614085236.43022-1-luojianhong@cdjrlc.com>
@ 2023-06-14  8:54 ` baomingtong001
  2023-06-14 18:17   ` Bart Van Assche
  0 siblings, 1 reply; 9+ messages in thread
From: baomingtong001 @ 2023-06-14  8:54 UTC (permalink / raw)
  To: jejb, martin.petersen; +Cc: linux-scsi, linux-kernel

./drivers/scsi/qlogicpti.c:1153:3-4: Unneeded semicolon

Signed-off-by: Mingtong Bao <baomingtong001@208suo.com>
---
  drivers/scsi/qlogicpti.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index 1e8fbd457248..52253b7da157 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -1150,7 +1150,7 @@ static struct scsi_cmnd 
*qlogicpti_intr_handler(struct qlogicpti *qpti)
          case COMMAND_ERROR:
          case COMMAND_PARAM_ERROR:
              break;
-        };
+        }
          sbus_writew(0, qpti->qregs + SBUS_SEMAPHORE);
      }

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH] scsi: qlogicpti: Remove unneeded semicolon
@ 2022-08-23  5:31 Jiapeng Chong
  0 siblings, 0 replies; 9+ messages in thread
From: Jiapeng Chong @ 2022-08-23  5:31 UTC (permalink / raw)
  To: jejb
  Cc: martin.petersen, linux-scsi, linux-kernel, Jiapeng Chong, Abaci Robot

No functional modification involved.

./drivers/scsi/qlogicpti.c:1151:3-4: Unneeded semicolon.

Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=1942
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/scsi/qlogicpti.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index 5bddfe0233b2..a58c7c7b1a17 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -1148,7 +1148,7 @@ static struct scsi_cmnd *qlogicpti_intr_handler(struct qlogicpti *qpti)
 		case COMMAND_ERROR:
 		case COMMAND_PARAM_ERROR:
 			break;
-		};
+		}
 		sbus_writew(0, qpti->qregs + SBUS_SEMAPHORE);
 	}
 
-- 
2.20.1.7.g153144c


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH] scsi: qlogicpti: Remove unneeded semicolon
@ 2022-07-18  1:44 Jason Wang
  0 siblings, 0 replies; 9+ messages in thread
From: Jason Wang @ 2022-07-18  1:44 UTC (permalink / raw)
  To: martin.petersen; +Cc: jejb, linux-scsi, linux-kernel, Jason Wang

The semicolon after the `}' in line 1152 is unneeded.

Signed-off-by: Jason Wang <wangborong@cdjrlc.com>
---
 drivers/scsi/qlogicpti.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index 57f2f4135a06..59c82d740139 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -1149,7 +1149,7 @@ static struct scsi_cmnd *qlogicpti_intr_handler(struct qlogicpti *qpti)
 		case COMMAND_ERROR:
 		case COMMAND_PARAM_ERROR:
 			break;
-		};
+		}
 		sbus_writew(0, qpti->qregs + SBUS_SEMAPHORE);
 	}
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] scsi: qlogicpti: Remove unneeded semicolon
  2022-07-16 18:38 [PATCH] scsi: qlogicpti: Remove " Jason Wang
@ 2022-07-17  9:42 ` Fabio M. De Francesco
  0 siblings, 0 replies; 9+ messages in thread
From: Fabio M. De Francesco @ 2022-07-17  9:42 UTC (permalink / raw)
  To: martin.petersen, Jason Wang; +Cc: jejb, linux-scsi, linux-kernel, Jason Wang

On sabato 16 luglio 2022 20:38:43 CEST Jason Wang wrote:
> The semicolon after the `}' in line 1152 is unneeded.
> 
> Signed-off-by: Jason Wang <wangborong@cdjrlc.com>
> ---
>  drivers/scsi/qlogicpti.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
> index 57f2f4135a06..4f777ca9730b 100644
> --- a/drivers/scsi/qlogicpti.c
> +++ b/drivers/scsi/qlogicpti.c
> @@ -513,7 +513,7 @@ static int qlogicpti_load_firmware(struct qlogicpti 
*qpti)
>  		       qpti->qpti_id);
>  		err = 1;
>  		goto out;
> -	}		
> +	}

Why did you delete and then put back braces?

>  	sbus_writew(SBUS_CTRL_RESET, qpti->qregs + SBUS_CTRL);
>  	sbus_writew((DMA_CTRL_CCLEAR | DMA_CTRL_CIRQ), qpti->qregs + 
CMD_DMA_CTRL);
>  	sbus_writew((DMA_CTRL_CCLEAR | DMA_CTRL_CIRQ), qpti->qregs + 
DATA_DMA_CTRL);
> @@ -563,7 +563,7 @@ static int qlogicpti_load_firmware(struct qlogicpti 
*qpti)
>  		       qpti->qpti_id);
>  		err = 1;
>  		goto out;
> -	}		
> +	}

Same question.

>  	/* Load it up.. */
>  	for (i = 0; i < risc_code_length; i++) {
> @@ -1135,7 +1135,7 @@ static struct scsi_cmnd 
*qlogicpti_intr_handler(struct qlogicpti *qpti)
>  
>  	if (!(sbus_readw(qpti->qregs + SBUS_STAT) & SBUS_STAT_RINT))
>  		return NULL;
> -		
> +

Why did you delete and then put back an empty line?

>  	in_ptr = sbus_readw(qpti->qregs + MBOX5);
>  	sbus_writew(HCCTRL_CRIRQ, qpti->qregs + HCCTRL);
>  	if (sbus_readw(qpti->qregs + SBUS_SEMAPHORE) & 
SBUS_SEMAPHORE_LCK) {
> @@ -1149,7 +1149,7 @@ static struct scsi_cmnd 
*qlogicpti_intr_handler(struct qlogicpti *qpti)
>  		case COMMAND_ERROR:
>  		case COMMAND_PARAM_ERROR:
>  			break;
> -		};
> +		}
>  		sbus_writew(0, qpti->qregs + SBUS_SEMAPHORE);
>  	}
>  
> @@ -1363,7 +1363,7 @@ static int qpti_sbus_probe(struct platform_device 
*op)
>  		printk("(FCode %s)", fcode);
>  	if (of_find_property(dp, "differential", NULL) != NULL)
>  		qpti->differential = 1;
> -			
> +

Again :-)

>  	printk("\nqlogicpti%d: [%s Wide, using %s interface]\n",
>  		qpti->qpti_id,
>  		(qpti->ultra ? "Ultra" : "Fast"),
> -- 
> 2.35.1
> 
> 

I guess that things went the following way (please check yourself):

1) You made a patch with some mistakes (i.e., deleted _necessary_ braces 
and lines).
2) You realized your own mistakes.
3) You made a second patch on your first patch (because you forgot to git-
reset the first version - you probably now see two patches with git-log).
4) You didn't look at git-diff before committing and sending.

If so, please notice that this is not the right way to fix mistakes. 
Maintainers don't want to see that, for instance, you deleted a line and 
then you put it back. Patches must show only net changes, not the entire 
story of trial, errors, fixes.

Please learn and use Git properly. I'd suggest you to work on drivers/
staging, otherwise you may risk that patches coming from your address 
become ignored by Maintainers and other developers working in more mature 
parts of Linux (this means everywhere but drivers/staging).

Thanks,

Fabio



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] scsi: qlogicpti: Remove unneeded semicolon
@ 2022-07-16 18:38 Jason Wang
  2022-07-17  9:42 ` Fabio M. De Francesco
  0 siblings, 1 reply; 9+ messages in thread
From: Jason Wang @ 2022-07-16 18:38 UTC (permalink / raw)
  To: martin.petersen; +Cc: jejb, linux-scsi, linux-kernel, Jason Wang

The semicolon after the `}' in line 1152 is unneeded.

Signed-off-by: Jason Wang <wangborong@cdjrlc.com>
---
 drivers/scsi/qlogicpti.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index 57f2f4135a06..4f777ca9730b 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -513,7 +513,7 @@ static int qlogicpti_load_firmware(struct qlogicpti *qpti)
 		       qpti->qpti_id);
 		err = 1;
 		goto out;
-	}		
+	}
 	sbus_writew(SBUS_CTRL_RESET, qpti->qregs + SBUS_CTRL);
 	sbus_writew((DMA_CTRL_CCLEAR | DMA_CTRL_CIRQ), qpti->qregs + CMD_DMA_CTRL);
 	sbus_writew((DMA_CTRL_CCLEAR | DMA_CTRL_CIRQ), qpti->qregs + DATA_DMA_CTRL);
@@ -563,7 +563,7 @@ static int qlogicpti_load_firmware(struct qlogicpti *qpti)
 		       qpti->qpti_id);
 		err = 1;
 		goto out;
-	}		
+	}
 
 	/* Load it up.. */
 	for (i = 0; i < risc_code_length; i++) {
@@ -1135,7 +1135,7 @@ static struct scsi_cmnd *qlogicpti_intr_handler(struct qlogicpti *qpti)
 
 	if (!(sbus_readw(qpti->qregs + SBUS_STAT) & SBUS_STAT_RINT))
 		return NULL;
-		
+
 	in_ptr = sbus_readw(qpti->qregs + MBOX5);
 	sbus_writew(HCCTRL_CRIRQ, qpti->qregs + HCCTRL);
 	if (sbus_readw(qpti->qregs + SBUS_SEMAPHORE) & SBUS_SEMAPHORE_LCK) {
@@ -1149,7 +1149,7 @@ static struct scsi_cmnd *qlogicpti_intr_handler(struct qlogicpti *qpti)
 		case COMMAND_ERROR:
 		case COMMAND_PARAM_ERROR:
 			break;
-		};
+		}
 		sbus_writew(0, qpti->qregs + SBUS_SEMAPHORE);
 	}
 
@@ -1363,7 +1363,7 @@ static int qpti_sbus_probe(struct platform_device *op)
 		printk("(FCode %s)", fcode);
 	if (of_find_property(dp, "differential", NULL) != NULL)
 		qpti->differential = 1;
-			
+
 	printk("\nqlogicpti%d: [%s Wide, using %s interface]\n",
 		qpti->qpti_id,
 		(qpti->ultra ? "Ultra" : "Fast"),
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH] scsi:qlogicpti: remove unneeded semicolon
@ 2021-11-09  1:53 cgel.zte
  0 siblings, 0 replies; 9+ messages in thread
From: cgel.zte @ 2021-11-09  1:53 UTC (permalink / raw)
  To: jejb; +Cc: martin.petersen, linux-scsi, linux-kernel, ran jianping, Zeal Robot

From: ran jianping <ran.jianping@zte.com.cn>

Eliminate the following coccinelle check warning:
drivers/scsi/qlogicpti.c:1152:3-4

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: ran jianping <ran.jianping@zte.com.cn>
---
 drivers/scsi/qlogicpti.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index 57f2f4135a06..59c82d740139 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -1149,7 +1149,7 @@ static struct scsi_cmnd *qlogicpti_intr_handler(struct qlogicpti *qpti)
 		case COMMAND_ERROR:
 		case COMMAND_PARAM_ERROR:
 			break;
-		};
+		}
 		sbus_writew(0, qpti->qregs + SBUS_SEMAPHORE);
 	}
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH] scsi:qlogicpti:Remove unneeded semicolon
@ 2021-11-01  9:18 cgel.zte
  0 siblings, 0 replies; 9+ messages in thread
From: cgel.zte @ 2021-11-01  9:18 UTC (permalink / raw)
  To: jejb; +Cc: martin.petersen, linux-scsi, linux-kernel, Zhang Mingyu, Zeal Robot

From: Zhang Mingyu <zhang.mingyu@zte.com.cn>

Eliminate the following coccinelle check warning:
drivers/scsi/qlogicpti.c:1152:3-4

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Zhang Mingyu <zhang.mingyu@zte.com.cn>
---
 drivers/scsi/qlogicpti.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index 57f2f4135a06..59c82d740139 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -1149,7 +1149,7 @@ static struct scsi_cmnd *qlogicpti_intr_handler(struct qlogicpti *qpti)
 		case COMMAND_ERROR:
 		case COMMAND_PARAM_ERROR:
 			break;
-		};
+		}
 		sbus_writew(0, qpti->qregs + SBUS_SEMAPHORE);
 	}
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-06-14 18:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-10 12:42 [PATCH] scsi: qlogicpti: Remove unneeded semicolon Jason Wang
2021-11-01  9:18 [PATCH] scsi:qlogicpti:Remove " cgel.zte
2021-11-09  1:53 [PATCH] scsi:qlogicpti: remove " cgel.zte
2022-07-16 18:38 [PATCH] scsi: qlogicpti: Remove " Jason Wang
2022-07-17  9:42 ` Fabio M. De Francesco
2022-07-18  1:44 Jason Wang
2022-08-23  5:31 Jiapeng Chong
     [not found] <20230614085236.43022-1-luojianhong@cdjrlc.com>
2023-06-14  8:54 ` baomingtong001
2023-06-14 18:17   ` Bart Van Assche

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.