On pointer type and the return type of ioremap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I'm writing my little module now a days and want to ioremap some space. I learnt from LDD3 that "Therefore, generic memory addresses in the kernel are usually unsigned long"(ch11). So I declared a pointer like "usigned long p2dev;" But when I feed it with ioremap, it yields a warning:

warning: assignment makes integer from pointer without a cast [enabled by default]

Do I really have to add a cast? What is the reason that while "generic pointers are unsigned long" but the return type of ioremap is void *?

Thanks in advance.

--
Cheers,
Grissiom
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux