Skip to contentSkip to conversation

fix typo and correct coding styles in report_formatter

PATCH In review Sergey Senozhatsky 4 participants 7 messages Oct 15, 2012

lore
Share & tools
lore

Sergey Senozhatsky

author
#0 lore raw

PATCH 1/1 fix typo and correct coding styles in report_formatter

[PATCH] fix typo and correct coding styles in report_formatter

Igor noted a typo and coding styles errors in previous patch, correct them.

Signed-off-by Sergey Senozhatsky <sergey.senozhatsky(a)gmail.com>

---

 src/report/report-formatter.h | 36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)
src/report/report-formatter.h +18 -18
index 7f9f544..d532f30 100644
@@ -33,33 +33,33 @@ class report_formatter
 public:
 	virtual ~report_formatter() {}
 
-	virtual void finish_report() {};
-	virtual const char *get_result() {return "Basic report_formatter::get_resul call\n";};
-	virtual void clear_result() {};
+	virtual void finish_report() {}
+	virtual const char *get_result() {return "Basic report_formatter::get_result() call\n";}
+	virtual void clear_result() {}
 
-	virtual void add(const char *str) {};
-	virtual void addv(const char *fmt, va_list ap) {};
+	virtual void add(const char *str) {}
+	virtual void addv(const char *fmt, va_list ap) {}
 
-	virtual void add_header(const char *header, int level) {};
+	virtual void add_header(const char *header, int level) {}
 
-	virtual void begin_section(section_type stype) {};
-	virtual void end_section() {};
+	virtual void begin_section(section_type stype) {}
+	virtual void end_section() {}
 
-	virtual void begin_table(table_type ttype) {};
-	virtual void end_table() {};
+	virtual void begin_table(table_type ttype) {}
+	virtual void end_table() {}
 
-	virtual void begin_row(row_type rtype) {};
-	virtual void end_row() {};
+	virtual void begin_row(row_type rtype) {}
+	virtual void end_row() {}
 
-	virtual void begin_cell(cell_type ctype) {};
-	virtual void end_cell() {};
-	virtual void add_empty_cell() {};
+	virtual void begin_cell(cell_type ctype) {}
+	virtual void end_cell() {}
+	virtual void add_empty_cell() {}
 
-	virtual void begin_paragraph() {};
-	virtual void end_paragraph() {};
+	virtual void begin_paragraph() {}
+	virtual void end_paragraph() {}
 
 	/* For quad-colouring CPU tables in HTML */
-	virtual void set_cpu_number(int nr) {};
+	virtual void set_cpu_number(int nr) {}
 };
 
 #endif /* _REPORT_FORMATTER_H_ */
#1 lore raw

Dear Sergey,

thank you for your patch.

Am Montag, den 15.10.2012, 02:25 -0700 schrieb Sergey Senozhatsky:

Quoted 1 line

[PATCH] fix typo and correct coding styles in report_formatter

Please do not repeat the summary in the commit message body.

Quoted 1 line

Igor noted a typo and coding styles errors in previous patch, correct them.

Two patches are better. If not only that you can make the commit summary smaller. ;-)

report-formatter.h: Fix typo iget_resul → get_result() report-formatter.h: Remove ; to adhere to coding style

Quoted 1 line
Signed-off-by Sergey Senozhatsky <sergey.senozhatsky(a)gmail.com>

[…]

It would be great if you could resend.

Thanks,

Paul

#2 lore raw
Quoted 9 lines · Paul Menzel

Dear Sergey,

thank you for your patch.

Am Montag, den 15.10.2012, 02:25 -0700 schrieb Sergey Senozhatsky:

Quoted 1 line

[PATCH] fix typo and correct coding styles in report_formatter

Please do not repeat the summary in the commit message body.

there's nothing wrong with that though.

I rather have one sentence too much, than a too short commit message.

#3 lore raw

[Powertop] Repeating lines in Git commit messages (was: [PATCH] fix typo and correct coding styles in report_formatter)

Am Montag, den 15.10.2012, 07:19 -0700 schrieb Arjan van de Ven:

Quoted 10 lines · Paul Menzel
Quoted 7 lines

thank you for your patch.

Am Montag, den 15.10.2012, 02:25 -0700 schrieb Sergey Senozhatsky:

Quoted 1 line

[PATCH] fix typo and correct coding styles in report_formatter

Please do not repeat the summary in the commit message body.

there's nothing wrong with that though.

Well I would agree if it is kind of rephrased. But if it is the exact same line I will say it is bad practice. ;-)

Thanks,

Paul

author
#4 lore raw

Re: [Powertop] Repeating lines in Git commit messages (was: [PATCH] fix typo and correct coding styles in report_formatter)

Quoted 6 lines · Paul Menzel

Am Montag, den 15.10.2012, 07:19 -0700 schrieb Arjan van de Ven:

Quoted 5 lines · Paul Menzel
Quoted 4 lines

thank you for your patch.

Am Montag, den 15.10.2012, 02:25 -0700 schrieb Sergey Senozhatsky:

Quoted 10 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

[PATCH] fix typo and correct coding styles in report_formatter

Please do not repeat the summary in the commit message body.

there's nothing wrong with that though.

Well I would agree if it is kind of rephrased. But if it is the exact same line I will say it is bad practice. ;-)

oh, please not again :)

	-ss
author
#5 lore raw
In reply to Paul Menzel
Quoted 7 lines · Paul Menzel

thank you for your patch.

Am Montag, den 15.10.2012, 02:25 -0700 schrieb Sergey Senozhatsky:

Quoted 1 line

[PATCH] fix typo and correct coding styles in report_formatter

Please do not repeat the summary in the commit message body.

I do like this line in git shortlog, the only thing with that line is that *probably* [PATCH] should not be there, but I can't see any problems with it anyway.

Quoted 5 lines
Quoted 1 line

Igor noted a typo and coding styles errors in previous patch, correct them.

Two patches are better. If not only that you can make the commit summary smaller. ;-)

why? two patches are good for bisecting, no one ever will bisect those 2 small changes.

	-ss
Quoted 10 lines

report-formatter.h: Fix typo iget_resul → get_result() report-formatter.h: Remove ; to adhere to coding style

Quoted 1 line
Signed-off-by Sergey Senozhatsky <sergey.senozhatsky(a)gmail.com>

[…]

It would be great if you could resend.

#6 lore raw
In reply to Sergey Senozhatsky
Quoted 68 lines · Sergey Senozhatsky

[PATCH] fix typo and correct coding styles in report_formatter

Igor noted a typo and coding styles errors in previous patch, correct them.

Signed-off-by Sergey Senozhatsky <sergey.senozhatsky(a)gmail.com>

---

  src/report/report-formatter.h | 36 ++++++++++++++++++------------------
  1 file changed, 18 insertions(+), 18 deletions(-)
src/report/report-formatter.h +18 -18
index 7f9f544..d532f30 100644
@@ -33,33 +33,33 @@ class report_formatter
  public:
  	virtual ~report_formatter() {}
 
-	virtual void finish_report() {};
-	virtual const char *get_result() {return "Basic report_formatter::get_resul call\n";};
-	virtual void clear_result() {};
+	virtual void finish_report() {}
+	virtual const char *get_result() {return "Basic report_formatter::get_result() call\n";}
+	virtual void clear_result() {}
 
-	virtual void add(const char *str) {};
-	virtual void addv(const char *fmt, va_list ap) {};
+	virtual void add(const char *str) {}
+	virtual void addv(const char *fmt, va_list ap) {}
 
-	virtual void add_header(const char *header, int level) {};
+	virtual void add_header(const char *header, int level) {}
 
-	virtual void begin_section(section_type stype) {};
-	virtual void end_section() {};
+	virtual void begin_section(section_type stype) {}
+	virtual void end_section() {}
 
-	virtual void begin_table(table_type ttype) {};
-	virtual void end_table() {};
+	virtual void begin_table(table_type ttype) {}
+	virtual void end_table() {}
 
-	virtual void begin_row(row_type rtype) {};
-	virtual void end_row() {};
+	virtual void begin_row(row_type rtype) {}
+	virtual void end_row() {}
 
-	virtual void begin_cell(cell_type ctype) {};
-	virtual void end_cell() {};
-	virtual void add_empty_cell() {};
+	virtual void begin_cell(cell_type ctype) {}
+	virtual void end_cell() {}
+	virtual void add_empty_cell() {}
 
-	virtual void begin_paragraph() {};
-	virtual void end_paragraph() {};
+	virtual void begin_paragraph() {}
+	virtual void end_paragraph() {}
 
  	/* For quad-colouring CPU tables in HTML */
-	virtual void set_cpu_number(int nr) {};
+	virtual void set_cpu_number(int nr) {}
  };
 
  #endif /* _REPORT_FORMATTER_H_ */
Quoted 6 lines

_______________________________________________
PowerTop mailing list
PowerTop(a)lists.01.org
https://lists.01.org/mailman/listinfo/powertop

Your patch has been merged.
Sorry for merging early and missing types, but thank you for the quick fix. -C