This is an automated email from Gerrit.

Antonio Borneo ([email protected]) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/5193

-- gerrit

commit c4683384af40f12b11f7075193249a7c0840a1df
Author: Antonio Borneo <[email protected]>
Date:   Mon May 6 11:40:17 2019 +0200

    target/nds32: fix type of magic number
    
    The macro NDS32_COMMON_MAGIC was cast-ed to int to avoid compile
    time error for comparison type mismatch while comparing it with
    the field common_magic.
    This is incorrect because the macro value is a 32 bit unsigned
    value; better changing the type of the field common_magic to keep
    the unsigned value.
    
    Issue identified by checkpatch script from Linux kernel v5.1 using
    the command
    
        find src/ -type f -exec ./tools/scripts/checkpatch.pl \
        -q --types TYPECAST_INT_CONSTANT -f {} \;
    
    Change-Id: Ib5924b6cecdffe70ab5c78d3b30a9c8e4deb7c7b
    Signed-off-by: Antonio Borneo <[email protected]>

diff --git a/src/target/nds32.h b/src/target/nds32.h
index 141dbf4..3670fd2 100644
--- a/src/target/nds32.h
+++ b/src/target/nds32.h
@@ -82,7 +82,7 @@ enum nds32_syscall_id {
        NDS32_SYSCALL_ERRNO = 6001,
 };
 
-#define NDS32_COMMON_MAGIC (int)0xADE5ADE5
+#define NDS32_COMMON_MAGIC 0xADE5ADE5U
 
 struct nds32_edm {
 
@@ -235,7 +235,7 @@ struct nds32_misc_config {
  * Represents a generic Andes core.
  */
 struct nds32 {
-       int common_magic;
+       uint32_t common_magic;
        struct reg_cache *core_cache;
 
        /** Handle for the debug module. */

-- 


_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to