mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH, trivial] Remove about 50 unneeded #includes in fbdev
@ 2006-06-27 16:19 Jon Smirl
  2006-06-27 16:51 ` [Linux-fbdev-devel] " Randy.Dunlap
  0 siblings, 1 reply; 3+ messages in thread
From: Jon Smirl @ 2006-06-27 16:19 UTC (permalink / raw)
  To: Antonino A. Daplas; +Cc: lkml, fbdev

Remove about 50 unneeded #includes in fbdev

Signed-off-by: Jon Smirl <jonsmirl@gmail.com>

diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c
index db878fd..e498a54 100644
--- a/drivers/video/aty/aty128fb.c
+++ b/drivers/video/aty/aty128fb.c
@@ -46,26 +46,14 @@
  */


-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
-#include <linux/kernel.h>
 #include <linux/errno.h>
-#include <linux/string.h>
-#include <linux/mm.h>
-#include <linux/tty.h>
-#include <linux/slab.h>
-#include <linux/vmalloc.h>
 #include <linux/delay.h>
-#include <linux/interrupt.h>
 #include <asm/uaccess.h>
  #include <linux/fb.h>
-#include <linux/init.h>
 #include <linux/pci.h>
-#include <linux/ioport.h>
 #include <linux/console.h>
-#include <linux/backlight.h>
-#include <asm/io.h>

  #ifdef CONFIG_PPC_PMAC
 #include <asm/machdep.h>
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
index c5185f7..5f4c76c 100644
--- a/drivers/video/aty/atyfb_base.c
+++ b/drivers/video/aty/atyfb_base.c
@@ -49,26 +49,13 @@
 ******************************************************************************/


-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/moduleparam.h>
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/string.h>
-#include <linux/mm.h>
-#include <linux/slab.h>
-#include <linux/vmalloc.h>
 #include <linux/delay.h>
 #include <linux/console.h>
  #include <linux/fb.h>
-#include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/interrupt.h>
-#include <linux/spinlock.h>
-#include <linux/wait.h>
 #include <linux/backlight.h>

-#include <asm/io.h>
 #include <asm/uaccess.h>

 #include <video/mach64.h>
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
index c5ecbb0..56445ea 100644
--- a/drivers/video/aty/radeon_base.c
+++ b/drivers/video/aty/radeon_base.c
@@ -52,25 +52,6 @@

 #define RADEON_VERSION	"0.2.0"

-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/moduleparam.h>
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/string.h>
-#include <linux/mm.h>
-#include <linux/tty.h>
-#include <linux/slab.h>
-#include <linux/delay.h>
-#include <linux/time.h>
-#include <linux/fb.h>
-#include <linux/ioport.h>
-#include <linux/init.h>
-#include <linux/pci.h>
-#include <linux/vmalloc.h>
-#include <linux/device.h>
-
-#include <asm/io.h>
 #include <asm/uaccess.h>

  #ifdef CONFIG_PPC_OF
diff --git a/drivers/video/aty/radeon_i2c.c b/drivers/video/aty/radeon_i2c.c
index a9d0414..4855c0a 100644
--- a/drivers/video/aty/radeon_i2c.c
+++ b/drivers/video/aty/radeon_i2c.c
@@ -1,9 +1,3 @@
-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/delay.h>
-#include <linux/pci.h>
  #include <linux/fb.h>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Linux-fbdev-devel] [PATCH, trivial] Remove about 50 unneeded #includes in fbdev
  2006-06-27 16:19 [PATCH, trivial] Remove about 50 unneeded #includes in fbdev Jon Smirl
@ 2006-06-27 16:51 ` Randy.Dunlap
       [not found]   ` <9e4733910606271001u2794d1e3ocb123f3cf9476266@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Randy.Dunlap @ 2006-06-27 16:51 UTC (permalink / raw)
  To: linux-fbdev-devel; +Cc: jonsmirl, adaplas, linux-kernel

On Tue, 27 Jun 2006 12:19:07 -0400 Jon Smirl wrote:

> Remove about 50 unneeded #includes in fbdev

Does this that
(a) these drivers build without these header files explicitly #included
or
(b) these drivers don't use *any* APIs or data from these header files?

They may build (a) but still use the APIs, so (b) is the requirement/target.
(I.e., other header files could suck in the required headers.)


> Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
> 
> diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c
> index db878fd..e498a54 100644
> --- a/drivers/video/aty/aty128fb.c
> +++ b/drivers/video/aty/aty128fb.c
> @@ -46,26 +46,14 @@
>   */
> 
> 
> -#include <linux/config.h>
>  #include <linux/module.h>
>  #include <linux/moduleparam.h>
> -#include <linux/kernel.h>
>  #include <linux/errno.h>
> -#include <linux/string.h>
> -#include <linux/mm.h>
> -#include <linux/tty.h>
> -#include <linux/slab.h>
> -#include <linux/vmalloc.h>
>  #include <linux/delay.h>
> -#include <linux/interrupt.h>
>  #include <asm/uaccess.h>
>   #include <linux/fb.h>
> -#include <linux/init.h>
>  #include <linux/pci.h>
> -#include <linux/ioport.h>
>  #include <linux/console.h>
> -#include <linux/backlight.h>
> -#include <asm/io.h>
> 
>   #ifdef CONFIG_PPC_PMAC
>  #include <asm/machdep.h>
> diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
> index c5185f7..5f4c76c 100644
> --- a/drivers/video/aty/atyfb_base.c
> +++ b/drivers/video/aty/atyfb_base.c
> @@ -49,26 +49,13 @@
>  ******************************************************************************/
> 
> 
> -#include <linux/config.h>
> -#include <linux/module.h>
> -#include <linux/moduleparam.h>
> -#include <linux/kernel.h>
> -#include <linux/errno.h>
> -#include <linux/string.h>
> -#include <linux/mm.h>
> -#include <linux/slab.h>
> -#include <linux/vmalloc.h>
>  #include <linux/delay.h>
>  #include <linux/console.h>
>   #include <linux/fb.h>
> -#include <linux/init.h>
>  #include <linux/pci.h>
>  #include <linux/interrupt.h>
> -#include <linux/spinlock.h>
> -#include <linux/wait.h>
>  #include <linux/backlight.h>
> 
> -#include <asm/io.h>
>  #include <asm/uaccess.h>
> 
>  #include <video/mach64.h>
> diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
> index c5ecbb0..56445ea 100644
> --- a/drivers/video/aty/radeon_base.c
> +++ b/drivers/video/aty/radeon_base.c
> @@ -52,25 +52,6 @@
> 
>  #define RADEON_VERSION	"0.2.0"
> 
> -#include <linux/config.h>
> -#include <linux/module.h>
> -#include <linux/moduleparam.h>
> -#include <linux/kernel.h>
> -#include <linux/errno.h>
> -#include <linux/string.h>
> -#include <linux/mm.h>
> -#include <linux/tty.h>
> -#include <linux/slab.h>
> -#include <linux/delay.h>
> -#include <linux/time.h>
> -#include <linux/fb.h>
> -#include <linux/ioport.h>
> -#include <linux/init.h>
> -#include <linux/pci.h>
> -#include <linux/vmalloc.h>
> -#include <linux/device.h>
> -
> -#include <asm/io.h>
>  #include <asm/uaccess.h>
> 
>   #ifdef CONFIG_PPC_OF
> diff --git a/drivers/video/aty/radeon_i2c.c b/drivers/video/aty/radeon_i2c.c
> index a9d0414..4855c0a 100644
> --- a/drivers/video/aty/radeon_i2c.c
> +++ b/drivers/video/aty/radeon_i2c.c
> @@ -1,9 +1,3 @@
> -#include <linux/config.h>
> -#include <linux/module.h>
> -#include <linux/kernel.h>
> -#include <linux/sched.h>
> -#include <linux/delay.h>
> -#include <linux/pci.h>
>   #include <linux/fb.h>
> 
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Linux-fbdev-devel mailing list
> Linux-fbdev-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel
> 


---
~Randy

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Linux-fbdev-devel] [PATCH, trivial] Remove about 50 unneeded #includes in fbdev
       [not found]   ` <9e4733910606271001u2794d1e3ocb123f3cf9476266@mail.gmail.com>
@ 2006-06-27 17:25     ` Randy.Dunlap
  0 siblings, 0 replies; 3+ messages in thread
From: Randy.Dunlap @ 2006-06-27 17:25 UTC (permalink / raw)
  To: Jon Smirl; +Cc: linux-fbdev-devel, adaplas, linux-kernel

On Tue, 27 Jun 2006 13:01:16 -0400 Jon Smirl wrote:

> On 6/27/06, Randy.Dunlap <rdunlap@xenotime.net> wrote:
> > On Tue, 27 Jun 2006 12:19:07 -0400 Jon Smirl wrote:
> >
> > > Remove about 50 unneeded #includes in fbdev
> >
> > Does this that
> > (a) these drivers build without these header files explicitly #included
> 
> I checked it this way. There are 2,295 explicit includes in
> drivers/video. Do you have a tool to automatically determine which
> APIs are directly used? Many of the fbdev drivers look to be the
> victim of cut and paste and have a lot of unnecessary includes.

Nope, I don't have such a tool.  I wish we did.

> > or
> > (b) these drivers don't use *any* APIs or data from these header files?
> >
> > They may build (a) but still use the APIs, so (b) is the requirement/target.
> > (I.e., other header files could suck in the required headers.)
> >
> >
> > > Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
> > >
> > > diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c
> > > index db878fd..e498a54 100644
> > > --- a/drivers/video/aty/aty128fb.c
> > > +++ b/drivers/video/aty/aty128fb.c
> > > @@ -46,26 +46,14 @@
> > >   */
> > >
> > >
> > > -#include <linux/config.h>
> > >  #include <linux/module.h>
> > >  #include <linux/moduleparam.h>
> > > -#include <linux/kernel.h>
> > >  #include <linux/errno.h>
> > > -#include <linux/string.h>
> > > -#include <linux/mm.h>
> > > -#include <linux/tty.h>
> > > -#include <linux/slab.h>
> > > -#include <linux/vmalloc.h>
> > >  #include <linux/delay.h>
> > > -#include <linux/interrupt.h>
> > >  #include <asm/uaccess.h>
> > >   #include <linux/fb.h>
> > > -#include <linux/init.h>
> > >  #include <linux/pci.h>
> > > -#include <linux/ioport.h>
> > >  #include <linux/console.h>
> > > -#include <linux/backlight.h>
> > > -#include <asm/io.h>
> > >
> > >   #ifdef CONFIG_PPC_PMAC
> > >  #include <asm/machdep.h>
> > > diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
> > > index c5185f7..5f4c76c 100644
> > > --- a/drivers/video/aty/atyfb_base.c
> > > +++ b/drivers/video/aty/atyfb_base.c
> > > @@ -49,26 +49,13 @@
> > >  ******************************************************************************/
> > >
> > >
> > > -#include <linux/config.h>
> > > -#include <linux/module.h>
> > > -#include <linux/moduleparam.h>
> > > -#include <linux/kernel.h>
> > > -#include <linux/errno.h>
> > > -#include <linux/string.h>
> > > -#include <linux/mm.h>
> > > -#include <linux/slab.h>
> > > -#include <linux/vmalloc.h>
> > >  #include <linux/delay.h>
> > >  #include <linux/console.h>
> > >   #include <linux/fb.h>
> > > -#include <linux/init.h>
> > >  #include <linux/pci.h>
> > >  #include <linux/interrupt.h>
> > > -#include <linux/spinlock.h>
> > > -#include <linux/wait.h>
> > >  #include <linux/backlight.h>
> > >
> > > -#include <asm/io.h>
> > >  #include <asm/uaccess.h>
> > >
> > >  #include <video/mach64.h>
> > > diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
> > > index c5ecbb0..56445ea 100644
> > > --- a/drivers/video/aty/radeon_base.c
> > > +++ b/drivers/video/aty/radeon_base.c
> > > @@ -52,25 +52,6 @@
> > >
> > >  #define RADEON_VERSION       "0.2.0"
> > >
> > > -#include <linux/config.h>
> > > -#include <linux/module.h>
> > > -#include <linux/moduleparam.h>
> > > -#include <linux/kernel.h>
> > > -#include <linux/errno.h>
> > > -#include <linux/string.h>
> > > -#include <linux/mm.h>
> > > -#include <linux/tty.h>
> > > -#include <linux/slab.h>
> > > -#include <linux/delay.h>
> > > -#include <linux/time.h>
> > > -#include <linux/fb.h>
> > > -#include <linux/ioport.h>
> > > -#include <linux/init.h>
> > > -#include <linux/pci.h>
> > > -#include <linux/vmalloc.h>
> > > -#include <linux/device.h>
> > > -
> > > -#include <asm/io.h>
> > >  #include <asm/uaccess.h>
> > >
> > >   #ifdef CONFIG_PPC_OF
> > > diff --git a/drivers/video/aty/radeon_i2c.c b/drivers/video/aty/radeon_i2c.c
> > > index a9d0414..4855c0a 100644
> > > --- a/drivers/video/aty/radeon_i2c.c
> > > +++ b/drivers/video/aty/radeon_i2c.c
> > > @@ -1,9 +1,3 @@
> > > -#include <linux/config.h>
> > > -#include <linux/module.h>
> > > -#include <linux/kernel.h>
> > > -#include <linux/sched.h>
> > > -#include <linux/delay.h>
> > > -#include <linux/pci.h>
> > >   #include <linux/fb.h>

---
~Randy

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-06-27 17:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-27 16:19 [PATCH, trivial] Remove about 50 unneeded #includes in fbdev Jon Smirl
2006-06-27 16:51 ` [Linux-fbdev-devel] " Randy.Dunlap
     [not found]   ` <9e4733910606271001u2794d1e3ocb123f3cf9476266@mail.gmail.com>
2006-06-27 17:25     ` Randy.Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®