[PATCH] perf parse-events: Variable type completion

Xin Gao posted 1 patch 3 years, 7 months ago
tools/perf/util/pmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] perf parse-events: Variable type completion
Posted by Xin Gao 3 years, 7 months ago
'unsigned int' is better than 'unsigned'.

Signed-off-by: Xin Gao <gaoxin@cdjrlc.com>
---
 tools/perf/util/pmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index f516d3821d28..bc1230f68341 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -1225,7 +1225,7 @@ static char *pmu_formats_string(struct list_head *formats)
 	struct perf_pmu_format *format;
 	char *str = NULL;
 	struct strbuf buf = STRBUF_INIT;
-	unsigned i = 0;
+	unsigned int i = 0;
 
 	if (!formats)
 		return NULL;
-- 
2.30.2
Re: [PATCH] perf parse-events: Variable type completion
Posted by Arnaldo Carvalho de Melo 3 years, 7 months ago
Em Wed, Aug 17, 2022 at 01:41:09AM +0800, Xin Gao escreveu:
> 'unsigned int' is better than 'unsigned'.

Thanks, applied.

- Arnaldo

 
> Signed-off-by: Xin Gao <gaoxin@cdjrlc.com>
> ---
>  tools/perf/util/pmu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
> index f516d3821d28..bc1230f68341 100644
> --- a/tools/perf/util/pmu.c
> +++ b/tools/perf/util/pmu.c
> @@ -1225,7 +1225,7 @@ static char *pmu_formats_string(struct list_head *formats)
>  	struct perf_pmu_format *format;
>  	char *str = NULL;
>  	struct strbuf buf = STRBUF_INIT;
> -	unsigned i = 0;
> +	unsigned int i = 0;
>  
>  	if (!formats)
>  		return NULL;
> -- 
> 2.30.2

-- 

- Arnaldo