[Qemu-devel] [PATCH v2] target/mips: add * to comments and realign them to fix checkpatch warnings

Jules Irenge posted 1 patch 5 years ago
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test checkpatch passed
Test asan passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190327181650.23992-1-jbi.octave@gmail.com
Maintainers: Aleksandar Rikalo <arikalo@wavecomp.com>, Aurelien Jarno <aurelien@aurel32.net>, Aleksandar Markovic <amarkovic@wavecomp.com>
target/mips/cp0_timer.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
[Qemu-devel] [PATCH v2] target/mips: add * to comments and realign them to fix checkpatch warnings
Posted by Jules Irenge 5 years ago
Add * to comments and realign to fix warnings issued by checkpatch.pl tool
"WARNING: Block comments use a leading /* on a separate line"
 within the file "target/mips/cp0_timer.c".

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
This v2 improves on writing the comment style and get rid of the warnings completely
 target/mips/cp0_timer.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/target/mips/cp0_timer.c b/target/mips/cp0_timer.c
index 742f4b2890..d80b0076d3 100644
--- a/target/mips/cp0_timer.c
+++ b/target/mips/cp0_timer.c
@@ -42,8 +42,10 @@ uint32_t cpu_mips_get_random(CPUMIPSState *env)
 
     /* Don't return same value twice, so get another value */
     do {
-        /* Use a simple algorithm of Linear Congruential Generator
-         * from ISO/IEC 9899 standard. */
+        /*
+         * Use a simple algorithm of Linear Congruential Generator
+         * from ISO/IEC 9899 standard.
+         */
         seed = 1103515245 * seed + 12345;
         idx = (seed >> 16) % nb_rand_tlb + env->CP0_Wired;
     } while (idx == prev_idx);
@@ -143,9 +145,11 @@ static void mips_timer_cb(void *opaque)
     if (env->CP0_Cause & (1 << CP0Ca_DC))
         return;
 
-    /* ??? This callback should occur when the counter is exactly equal to
-       the comparator value.  Offset the count by one to avoid immediately
-       retriggering the callback before any virtual time has passed.  */
+    /*
+     * ??? This callback should occur when the counter is exactly equal to
+     * the comparator value.  Offset the count by one to avoid immediately
+     * retriggering the callback before any virtual time has passed.
+     */
     env->CP0_Count++;
     cpu_mips_timer_expire(env);
     env->CP0_Count--;
-- 
2.20.1


Re: [Qemu-devel] [PATCH v2] target/mips: add * to comments and realign them to fix checkpatch warnings
Posted by Aleksandar Markovic 5 years ago
> From: Jules Irenge <jbi.octave@gmail.com>
> Subject: [PATCH v2] target/mips: add * to comments and realign them to fix checkpatch warnings
> 
> Add * to comments and realign to fix warnings issued by checkpatch.pl tool
> "WARNING: Block comments use a leading /* on a separate line"
> within the file "target/mips/cp0_timer.c".
> 
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
> ---

Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>

Jules,

would you perhapsh like to clean up files cpu.h,  mips-defs.h, and trace.h in target/mips dir (from all checkpatch errors and warnings, if possible)? I wanted to do it for a long time.

Sincerelly,
Aleksandar