On Wed, 14 Jul 2010, John Rigby wrote:
Here is an update. First, I am still getting errors of the form:
/home/jcrigby/work/git-trees/kernelbuild/linux/drivers/mtd/onenand/onenand_sim.c:142: error: expected expression before 'do'
The 'do' here is from arch/arm/include/asm/io.h: #define writew(v,c) do { wmb(); writew_relaxed(v,c); } while (0)
That looks ok until you find out how it is used in drivers/mtd/onenand/onenand_sim.c:
#define ONENAND_SET_WP_STATUS(v, this) \ (writew(v, this->base + ONENAND_REG_WP_STATUS))
The parens around it make the valid statement into an invalid expression.
I know that Catalin faced a similar issue with another driver already resulting from his patch. I'll forward this to him so to have this issue resolved upstream as well.
Nicolas