I am using sparse linux tool
to clean the noise from the code. Suppose I have following struct defined in file abc.c
as:
static struct check1 {
void __iomem **base_regs;
};
In the same file abc.c
. I have following line of code as well (Let X be a positive integer):
case 1:
static struct check1 *check1_var;
struct check2 {
void* __iomem base= check1_var -->base_regs[X];
}
case 2:
struct check2 {
void __iomem *base= check1_var-->base_regs[X];
}
In Case 1, I am getting the following warning
warning: incorrect type in initializer (different address spaces)
However, this warning get removed when i switched to case 2.
My Question is: What is the difference between void __iomem *
and void* __iomem
. In my view they should be the same ? Please help me out here, I am not getting why this warning get removed in case 2.