I have downloaded the latest linux kernel and the Next tree, I want to run sparse on  'drivers/staging' tree, I tried enabling all the drivers via make menuconfig and then didmake C=1 M=drivers/stagingBut the above command only builds some of the drivers, not all.How do I enable more staging drivers to be built ?
How to compile all drivers in the staging tree of the Linux Kernel?
linux;kernel;linux kernel;drivers
There is a special symbol in the Kconfig files called BROKEN.  Code which doesn't work correctly at all (usually catastrophically fails) is marked in the Kconfig files with a dependency on this symbol, which is not defined anywhere by Kconfig itself, and therefore is not set by allyesconfig or any other automatic config targets.  A reasonable percentage of the drivers in the staging tree fall into this category, and thus make allyesconfig will not include many of them.  I'm not 100% certain, but I believe that you can manually add BROKEN=y at the end of the .config file in your build directory, then manually enable the Kconfig symbols either by adding them by hand in a similar manner to BROKEN, or through make menuconfig.  You may also need to enable the COMPILE_TEST symbol, but that one has an entry in the menuconfig UI (it's in the first sub-menu, near the top), and even then there is a possibility that some of the drivers may be architecture dependent.