* [PATCH] dm integrity: Convert comma to semicolon
@ 2024-09-05 2:28 Chen Ni
2024-09-05 14:34 ` Mike Snitzer
0 siblings, 1 reply; 3+ messages in thread
From: Chen Ni @ 2024-09-05 2:28 UTC (permalink / raw)
To: agk, snitzer, mpatocka; +Cc: dm-devel, linux-kernel, Chen Ni
Replace comma between expressions with semicolons.
Using a ',' in place of a ';' can have unintended side effects.
Although that is not the case here, it is seems best to use ';'
unless ',' is intended.
Found by inspection.
No functional change intended.
Compile tested only.
Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
---
drivers/md/dm-integrity.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c
index b3489d3fe7db..34fa98efa9fa 100644
--- a/drivers/md/dm-integrity.c
+++ b/drivers/md/dm-integrity.c
@@ -1500,15 +1500,15 @@ static void dm_integrity_flush_buffers(struct dm_integrity_c *ic, bool flush_dat
if (!ic->meta_dev)
flush_data = false;
if (flush_data) {
- fr.io_req.bi_opf = REQ_OP_WRITE | REQ_PREFLUSH | REQ_SYNC,
- fr.io_req.mem.type = DM_IO_KMEM,
- fr.io_req.mem.ptr.addr = NULL,
- fr.io_req.notify.fn = flush_notify,
+ fr.io_req.bi_opf = REQ_OP_WRITE | REQ_PREFLUSH | REQ_SYNC;
+ fr.io_req.mem.type = DM_IO_KMEM;
+ fr.io_req.mem.ptr.addr = NULL;
+ fr.io_req.notify.fn = flush_notify;
fr.io_req.notify.context = &fr;
- fr.io_req.client = dm_bufio_get_dm_io_client(ic->bufio),
- fr.io_reg.bdev = ic->dev->bdev,
- fr.io_reg.sector = 0,
- fr.io_reg.count = 0,
+ fr.io_req.client = dm_bufio_get_dm_io_client(ic->bufio);
+ fr.io_reg.bdev = ic->dev->bdev;
+ fr.io_reg.sector = 0;
+ fr.io_reg.count = 0;
fr.ic = ic;
init_completion(&fr.comp);
r = dm_io(&fr.io_req, 1, &fr.io_reg, NULL, IOPRIO_DEFAULT);
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: dm integrity: Convert comma to semicolon
2024-09-05 2:28 [PATCH] dm integrity: Convert comma to semicolon Chen Ni
@ 2024-09-05 14:34 ` Mike Snitzer
2024-09-06 11:38 ` Mikulas Patocka
0 siblings, 1 reply; 3+ messages in thread
From: Mike Snitzer @ 2024-09-05 14:34 UTC (permalink / raw)
To: Chen Ni; +Cc: agk, mpatocka, dm-devel, linux-kernel
On Thu, Sep 05, 2024 at 10:28:32AM +0800, Chen Ni wrote:
> Replace comma between expressions with semicolons.
>
> Using a ',' in place of a ';' can have unintended side effects.
> Although that is not the case here, it is seems best to use ';'
> unless ',' is intended.
>
> Found by inspection.
> No functional change intended.
> Compile tested only.
>
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
I agree, the use of comma is bizarre. Not sure how that slipped
through but...
Reviewed-by: Mike Snitzer <snitzer@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: dm integrity: Convert comma to semicolon
2024-09-05 14:34 ` Mike Snitzer
@ 2024-09-06 11:38 ` Mikulas Patocka
0 siblings, 0 replies; 3+ messages in thread
From: Mikulas Patocka @ 2024-09-06 11:38 UTC (permalink / raw)
To: Mike Snitzer; +Cc: Chen Ni, agk, dm-devel, linux-kernel
On Thu, 5 Sep 2024, Mike Snitzer wrote:
> On Thu, Sep 05, 2024 at 10:28:32AM +0800, Chen Ni wrote:
> > Replace comma between expressions with semicolons.
> >
> > Using a ',' in place of a ';' can have unintended side effects.
> > Although that is not the case here, it is seems best to use ';'
> > unless ',' is intended.
> >
> > Found by inspection.
> > No functional change intended.
> > Compile tested only.
> >
> > Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
>
> I agree, the use of comma is bizarre. Not sure how that slipped
> through but...
>
> Reviewed-by: Mike Snitzer <snitzer@kernel.org>
Applied, thanks.
I don't know why I used ',' there.
Mikulas
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-09-06 11:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-05 2:28 [PATCH] dm integrity: Convert comma to semicolon Chen Ni
2024-09-05 14:34 ` Mike Snitzer
2024-09-06 11:38 ` Mikulas Patocka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox