Skip to contentSkip to conversation

perf parse-events: Remove unneeded semicolon

PATCH In review [email protected] 3 participants 4 messages Jun 14, 2023 – Jun 21, 2023 1 message not in the archive perf events

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 perf parse-events: Remove unneeded semicolon

./tools/perf/util/parse-events.c:1466:2-3: Unneeded semicolon

---
 tools/perf/util/parse-events.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/parse-events.c +0 -0
index 629f7bd9fd59..42f84f61fabc 100644
@@ -1463,7 +1463,7 @@ static int __parse_events_add_numeric(struct parse_events_state *parse_state,
     if (extended_type && (type == PERF_TYPE_HARDWARE || type == 
PERF_TYPE_HW_CACHE)) {
         assert(perf_pmus__supports_extended_type());
         attr.config |= (u64)extended_type << PERF_PMU_TYPE_SHIFT;

- };
+ }

     if (head_config) {
         if (config_attr(&attr, head_config, parse_state->error,
#2 lore raw

Em Wed, Jun 14, 2023 at 04:13:53PM +0800, [email protected] escreveu:

Quoted 1 line

./tools/perf/util/parse-events.c:1466:2-3: Unneeded semicolon

Was this detected by some tool? Which one?

- Arnaldo

Quoted 20 lines
---
 tools/perf/util/parse-events.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/parse-events.c +1 -1
index 629f7bd9fd59..42f84f61fabc 100644
@@ -1463,7 +1463,7 @@ static int __parse_events_add_numeric(struct
 parse_events_state *parse_state,
     if (extended_type && (type == PERF_TYPE_HARDWARE || type ==
 PERF_TYPE_HW_CACHE)) {
         assert(perf_pmus__supports_extended_type());
         attr.config |= (u64)extended_type << PERF_PMU_TYPE_SHIFT;
-    };
+    }
 
     if (head_config) {
         if (config_attr(&attr, head_config, parse_state->error,
Signature · 1 line
- Arnaldo
maintainer
#3 lore raw
In reply to [email protected]

Hello,

Quoted 14 lines · On Wed, Jun 14, 2023 at 1:13 AM <[email protected]> wrote:

./tools/perf/util/parse-events.c:1466:2-3: Unneeded semicolon

---
  tools/perf/util/parse-events.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/parse-events.c +0 -0
index 629f7bd9fd59..42f84f61fabc 100644

tools/perf/util/parse-events.c static int __parse_events_add_numeric(struct · line 1465

Quoted 3 lines
tools/perf/util/parse-events.c +0 -0
@@ -1463,7 +1463,7 @@ static int __parse_events_add_numeric(struct
 parse_events_state *parse_state,
      if (extended_type && (type == PERF_TYPE_HARDWARE || type ==
 PERF_TYPE_HW_CACHE)) {

The format is broken, please fix your mail client not fix wrap long lines. This time I fixed it manually, but you need to update your config.

Thanks,
Namhyung

Quoted 7 lines
tools/perf/util/parse-events.c +1 -1
          assert(perf_pmus__supports_extended_type());
          attr.config |= (u64)extended_type << PERF_PMU_TYPE_SHIFT;
-    };
+    }
 
      if (head_config) {
          if (config_attr(&attr, head_config, parse_state->error,
maintainer
#4 lore raw
Quoted 12 lines · Namhyung Kim

Hello,

Quoted 8 lines · On Wed, Jun 14, 2023 at 1:13 AM <[email protected]> wrote:

./tools/perf/util/parse-events.c:1466:2-3: Unneeded semicolon

---
  tools/perf/util/parse-events.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 12 lines

tools/perf/util/parse-events.c static int __parse_events_add_numeric(struct · line 1465

Quoted 9 lines
tools/perf/util/parse-events.c +0 -0
index 629f7bd9fd59..42f84f61fabc 100644
@@ -1463,7 +1463,7 @@ static int __parse_events_add_numeric(struct
 parse_events_state *parse_state,
      if (extended_type && (type == PERF_TYPE_HARDWARE || type ==
 PERF_TYPE_HW_CACHE)) {

The format is broken, please fix your mail client not fix wrap long lines. This time I fixed it manually, but you need to update your config.

Also there were other whitespace breakages, but applied to perf-tools-next anyway, thanks!