On 01/13/2016 12:37 PM, Randy Dunlap wrote: > [add Jens Axboe] > > > On 01/13/16 11:35, Randy Dunlap wrote: >> On 01/13/16 11:22, Blower, Melanie wrote: >>> [1.] Incorrect C usage in drivers/block/null_blk.c causes kernel compilation failure with Intel c++ compiler >>> [2.] Full description of the problem/report: >>> Using icc, >>> drivers/block/null_blk.c(569): error: variable "null_lnvm_dev_ops" was declared with a never-completed type >>> static struct nvm_dev_ops null_lnvm_dev_ops; >>> >>> Clark Nelson, one of Intel's C++ language lawyers, explains why this declaration is illegal: >>> >>> Discussion: >>> Here is the problematic declaration, which appears near line 585 of file drivers/block/null_blk.c: >>> >>> static struct nvm_dev_ops null_lnvm_dev_ops; So that's a very verbose way of saying that the structure is undefined if CONFIG_NVM isn't set. I agree, that's crap code, doesn't make any sense. Surprised gcc doesn't complain about it. Something like the attached should fix it, making enough visible with CONFIG_NVM that we can declare an empty ops type. -- Jens Axboe