2023-07-20 04:14:52

by Rong Qianfeng

[permalink] [raw]
Subject: [PATCH] tools: perf: Two typos have been corrected

When wrapping code, use ';' better than using ',' which is more
in line with the coding habits of most engineers.

Signed-off-by: Rong Qianfeng <[email protected]>
---
tools/perf/builtin-diff.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
index e8a1b16aa5f8..57d300d8e570
--- a/tools/perf/builtin-diff.c
+++ b/tools/perf/builtin-diff.c
@@ -1915,8 +1915,8 @@ static int data_init(int argc, const char **argv)
struct perf_data *data = &d->data;

data->path = use_default ? defaults[i] : argv[i];
- data->mode = PERF_DATA_MODE_READ,
- data->force = force,
+ data->mode = PERF_DATA_MODE_READ;
+ data->force = force;

d->idx = i;
}
--
2.39.0



2023-07-20 05:13:33

by Ian Rogers

[permalink] [raw]
Subject: Re: [PATCH] tools: perf: Two typos have been corrected

On Wed, Jul 19, 2023 at 8:40 PM Rong Qianfeng <[email protected]> wrote:
>
> When wrapping code, use ';' better than using ',' which is more
> in line with the coding habits of most engineers.
>
> Signed-off-by: Rong Qianfeng <[email protected]>

Snap: https://lore.kernel.org/lkml/[email protected]/

Thanks,
Ian

> ---
> tools/perf/builtin-diff.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
> index e8a1b16aa5f8..57d300d8e570
> --- a/tools/perf/builtin-diff.c
> +++ b/tools/perf/builtin-diff.c
> @@ -1915,8 +1915,8 @@ static int data_init(int argc, const char **argv)
> struct perf_data *data = &d->data;
>
> data->path = use_default ? defaults[i] : argv[i];
> - data->mode = PERF_DATA_MODE_READ,
> - data->force = force,
> + data->mode = PERF_DATA_MODE_READ;
> + data->force = force;
>
> d->idx = i;
> }
> --
> 2.39.0
>

2023-07-20 15:18:19

by Arnaldo Carvalho de Melo

[permalink] [raw]
Subject: Re: [PATCH] tools: perf: Two typos have been corrected

Em Wed, Jul 19, 2023 at 09:32:57PM -0700, Ian Rogers escreveu:
> On Wed, Jul 19, 2023 at 8:40 PM Rong Qianfeng <[email protected]> wrote:
> >
> > When wrapping code, use ';' better than using ',' which is more
> > in line with the coding habits of most engineers.
> >
> > Signed-off-by: Rong Qianfeng <[email protected]>
>
> Snap: https://lore.kernel.org/lkml/[email protected]/

Applied the one from [email protected],

Thanks,

- Arnaldo

> Thanks,
> Ian
>
> > ---
> > tools/perf/builtin-diff.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
> > index e8a1b16aa5f8..57d300d8e570
> > --- a/tools/perf/builtin-diff.c
> > +++ b/tools/perf/builtin-diff.c
> > @@ -1915,8 +1915,8 @@ static int data_init(int argc, const char **argv)
> > struct perf_data *data = &d->data;
> >
> > data->path = use_default ? defaults[i] : argv[i];
> > - data->mode = PERF_DATA_MODE_READ,
> > - data->force = force,
> > + data->mode = PERF_DATA_MODE_READ;
> > + data->force = force;
> >
> > d->idx = i;
> > }
> > --
> > 2.39.0
> >

--

- Arnaldo