Kalle Valo <kvalo@xxxxxxxxxx> wrote: > I noticed by random that rtl8xxxu includes linux/wireless.h even though it > doesn't need it. While investigating a bit more I found even more unused > include files: > > #include <linux/init.h> > #include <linux/sched.h> > #include <linux/ethtool.h> > > It looks like that the includes are just copied to every file without checking > if the file really needs the include. So more includes could be removed but > that would need more careful analysis per each file. I can do that. My ways will be to create an empty (new) C file to examine every driver's header file can be included individually, and then try-and-error to remove includes from existing C files. However, this driver uses #ifdef. I will check if autoconf.h is included. > > No functional changes, compile tested only. > > Signed-off-by: Kalle Valo <kvalo@xxxxxxxxxx> Reviewed-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>