Skip to contentSkip to conversation

A short note on includes

parisc-linux Matthew Wilcox 1 participant 1 message Jan 5, 2000

lore
Share & tools
lore
#0 lore raw

Something I've noticed while going through the 2.2 code and modifying it for 2.3 is that people quite often use

#include <asm/spinlock.h>

instead of

#include <linux/spinlock.h>

It is almost always preferred to use linux/foo instead of asm/foo if linux/foo exists. The linux/foo file will perform the <asm/foo> include to get the arch-specific pieces as necessary. There's no need to panic and submit dozens of patches right now (particularly since we're about to make the 2.3 tree available for public submissions), but I thought this was a useful thing for people to know for the future.