I was wondering how people feel about including .c files in other .c files. I saw a few occasions of this. Triggered by that observation I decided to do a grep for this (on 2.6.25.7 as that was the one I had handy at that moment). Some 268 .c files are included. Seems an awful lot for me. Do people feel this is good practice? I understand that sometimes it is useful (and then you might need to decide on whether to include a .c file or to have a .h file with code), but in other places it is probably less relevant. Generally I would expect that if the .c file contains some standalone functionality then it should probably be a .c file on its own with a well defined interface. Curious what others think about this. As attachement I've added the output of the grep (slightly edited to remove some false positives, like those from the Documentation and scripts directories and those who are obviously comments). Frans.
