Skip to contentSkip to conversation

Fix Compilation error for UM Linux

PATCH Suzuki 3 participants 4 messages Jun 8, 2006 – Jun 9, 2006

lore
Share & tools
lore

Suzuki

author
#0 lore raw

Hi,

This patch fixes the compilation error for UM Linux with linux-2.6.17-rc5.

It complains of using (void *) in arithmetic.

Thanks.

Suzuki K P
Linux Technology Center,
IBM Software Labs.

* Fix the compilation error for um-linux.

Signed Off by: Suzuki K P <[email protected]>

um/include/mem.h~fix_compilation_error 2006-06-08 07:46:21.000000000 -0700 renamed from um/include/mem.h 2006-05-25 01:45:04.000000000 -0700 +1 -1
@@ -22,7 +22,7 @@ static inline unsigned long to_phys(void
 
 static inline void *to_virt(unsigned long phys)
 {
-       return((void *) uml_physmem + phys);
+       return (void *) (uml_physmem + phys);
 }
 
 #endif
#1 lore raw
Quoted 5 lines · On Thu, 08 Jun 2006 20:34:08 +0530 Suzuki <[email protected]> wrote:

Hi,

This patch fixes the compilation error for UM Linux with linux-2.6.17-rc5.

It complains of using (void *) in arithmetic.

Really? We often do arithmetic on void*. Are you using gcc, with standard kbuild and standard compiler options?

Quoted 11 lines

Thanks.

Suzuki K P
Linux Technology Center,
IBM Software Labs.

* Fix the compilation error for um-linux.

Signed Off by: Suzuki K P <[email protected]>

"Signed-off-by:", please.

Quoted 12 lines
um/include/mem.h~fix_compilation_error 2006-06-08 renamed from um/include/mem.h 2006-05-25 01:45:04.000000000 -0700 +0 -0

07:46:21.000000000 -0700

um/include/mem.h~fix_compilation_error 2006-06-08 renamed from um/include/mem.h 2006-05-25 01:45:04.000000000 -0700 +1 -1
@@ -22,7 +22,7 @@ static inline unsigned long to_phys(void
 
  static inline void *to_virt(unsigned long phys)
  {
-       return((void *) uml_physmem + phys);
+       return (void *) (uml_physmem + phys);
  }
 
  #endif
#2 lore raw
Quoted 2 lines · Andrew Morton

Really? We often do arithmetic on void*. Are you using gcc, with standard kbuild and standard compiler options?

I've never seen any gcc complaints from that piece of code, so I'm wondering the same thing.

Jeff

author
#3 lore raw
In reply to Andrew Morton
Quoted 6 lines · Andrew Morton
Quoted 2 lines · On Thu, 08 Jun 2006 20:34:08 +0530 Suzuki <[email protected]> wrote:

Hi,

Quoted 7 lines
Quoted 3 lines

This patch fixes the compilation error for UM Linux with linux-2.6.17-rc5.

It complains of using (void *) in arithmetic.

Really? We often do arithmetic on void*. Are you using gcc, with standard kbuild and standard compiler options?

Ah ! I was using g++ since the kernel had some C++ code in it. Sorry for the same.

Quoted 10 lines
Quoted 10 lines

Thanks.

Suzuki K P
Linux Technology Center,
IBM Software Labs.

Quoted 6 lines
Quoted 3 lines

* Fix the compilation error for um-linux.

Signed Off by: Suzuki K P <[email protected]>

"Signed-off-by:", please.

Sorry ! Will take care of it from now onwards.

Thanks,

Suzuki

Quoted 14 lines
Quoted 14 lines
um/include/mem.h~fix_compilation_error 2006-06-08 renamed from um/include/mem.h 2006-05-25 01:45:04.000000000 -0700 +0 -0

07:46:21.000000000 -0700

um/include/mem.h~fix_compilation_error 2006-06-08 renamed from um/include/mem.h 2006-05-25 01:45:04.000000000 -0700 +1 -1
@@ -22,7 +22,7 @@ static inline unsigned long to_phys(void
 
 static inline void *to_virt(unsigned long phys)
 {
-       return((void *) uml_physmem + phys);
+       return (void *) (uml_physmem + phys);
 }
 
 #endif