compile error: invalid operands for binary >> for pgd_index(addr) macro
I am writing a driver for a pci device and am trying to translate a virtual address to locate its page table entry using the set of macros in asm/pgtable.h
I am giving a void * to pgd_index(addr) macro to give me a relative position in Page global directory.
But instead while compiling, it gives me an error saying:
error: invalid operands to binary >> (have void * and 'int')
I don't understand what is wrong because as I know, I am supposed to pass a virtual address to the macro to get the pgd index.
Thanks for help.
i figured it out. The macro requires an unsigned long to resolve the error. But I dont understand why because the definition of macro says it requires a void pointer.
|All times are GMT -5. The time now is 12:13 AM.|