I am trying to subtract the value of a macro from a pointer but after this operation, I still get the same pointer address.
In particular, why the following code
gives the same result with this?:
struct list_head *init_tasks = tasks;
printk("init_task next task is: 0x%X\n", init_tasks->next);
Could anyone let me know what I am doing wrong?
init_tasks = (uint8_t*)(init_tasks->next - (uint32_t)SEGMENT_OFFSET);
printk("init_task next task (phys) is: 0x%X\n", init_tasks);
Thanks in advance.