include/linux/irq.h: In function ‘alloc_desc_masks’:
include/linux/irq.h:441:8: warning: variable ‘gfp’ set but not used [-Wunused-but-set-variable]
In file included from drivers/net/igbvf/ethtool.c:36:0:
drivers/net/igbvf/igbvf.h: At top level:
drivers/net/igbvf/igbvf.h:129:15: error: duplicate member ‘page’
make[3]: *** [drivers/net/igbvf/ethtool.o] Error 1
make[2]: *** [drivers/net/igbvf] Error 2
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2
root@ubuntu:/linux-2.6.34.14/linux-2.6.34.7#
SOLUTION:
---------
struct igbvf_buffer {
dma_addr_t dma;
struct sk_buff *skb;`enter code here`
union {
/* Tx */
struct {
unsigned long time_stamp;
u16 length;
u16 next_to_watch;
u16 mapped_as_page;
};
/* Rx */
struct {
struct page *page; <--------------- No 1
u64 page_dma;
unsigned int page_offset;
};
};
struct page *page; <------------ No 2
};
Hmm conflict of a member with a transparent union.
Maybe older gccs didn't catch that. But it looks very broken
Comment second pointer.
旧的gcc可能已经不适合,建议把第二个page指针注释掉。