Skip to contentSkip to conversation

Cleanup of dvb frontend driver header files

DISCUSSION Matthias Schwarzott 2 participants 2 messages Mar 4, 2009 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

Hi there!

While having a look at lnbp21.h I have seen it includes <linux/dvb/frontend.h> without needing it. (There are only pointers referring to struct dvb_frontend).

So I had a look at the whole directory.

# cd linux/drivers/media/dvb/frontends
# grep -l linux/dvb/frontend.h *.h|wc -l
47

So 47 header files include this header and seem not to need it. At least removing this line still allows me to compile the full set of v4l-dvb drivers.

# sed -e '/linux\/dvb\/frontend/s-^-// -' -i *.h

Some of these files use more headers the same way like dvb_frontend.h, firmware.h or i2c.h

Is this kind of cleanup appreciated, or should the includes be kept even if they are not really needed for pointers to structs like dvb_frontend.

Regards
Matthias

#1 lore raw
Quoted 14 lines · On Wed, 4 Mar 2009 11:36:26 +0100 Matthias Schwarzott <[email protected]> wrote:

Hi there!

While having a look at lnbp21.h I have seen it includes <linux/dvb/frontend.h> without needing it. (There are only pointers referring to struct dvb_frontend).

So I had a look at the whole directory.

# cd linux/drivers/media/dvb/frontends
# grep -l linux/dvb/frontend.h *.h|wc -l
47

So 47 header files include this header and seem not to need it. At least removing this line still allows me to compile the full set of v4l-dvb drivers.

Quoted 7 lines
# sed -e '/linux\/dvb\/frontend/s-^-// -' -i *.h

Some of these files use more headers the same way like dvb_frontend.h, firmware.h or i2c.h

Is this kind of cleanup appreciated, or should the includes be kept even if they are not really needed for pointers to structs like dvb_frontend.

This kind of cleanup is appreciated, since it reduces the compilation time of the kernel. Some care should be taken, however, since a few headers are required on other architectures, or may be needed, depending on the enabled CONFIG options.

Cheers,
Mauro