You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/05/02 02:37:33 UTC

[GitHub] [incubator-nuttx] yamt commented on a change in pull request #904: Resolve linking and compiler warning issues with x86_64 port

yamt commented on a change in pull request #904:
URL: https://github.com/apache/incubator-nuttx/pull/904#discussion_r418841571



##########
File path: arch/x86_64/src/intel64/intel64_lowsetup.c
##########
@@ -56,24 +71,24 @@
 
 void up_lowsetup(void)
 {
-  /* we should be in long mode at this point*/
+  /* we should be in long mode at this point */
 
   /* GDT is loaded with 64bit GDT  */
 
-  /* Paging is enabled*/
+  /* Paging is enabled */
 
   /* Setup pointers for accessing Page table and GDT in high address */
 
-  pdpt = &pdpt_low + X86_64_LOAD_OFFSET;
-  pd   = &pd_low   + X86_64_LOAD_OFFSET;
-  pt   = &pt_low   + X86_64_LOAD_OFFSET;
+  pdpt = (uint64_t *)((uint64_t)&pdpt_low + X86_64_LOAD_OFFSET);
+  pd   = (uint64_t *)((uint64_t)&pd_low   + X86_64_LOAD_OFFSET);
+  pt   = (uint64_t *)((uint64_t)&pt_low   + X86_64_LOAD_OFFSET);
 
-  ist64     = (struct ist_s *)((void *)&ist64_low       + X86_64_LOAD_OFFSET);
-  gdt64     = (struct gdt_entry_s *)((void *)&gdt64_low + X86_64_LOAD_OFFSET);
+  ist64 = (struct ist_s *)((uint64_t)&ist64_low       + X86_64_LOAD_OFFSET);
+  gdt64 = (struct gdt_entry_s *)((uint64_t)&gdt64_low + X86_64_LOAD_OFFSET);

Review comment:
       do you really need this change? (void *) seems perfectly fine to me.
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org