linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/4] drivers/infiniband: Drop redundant includes of moduleparam.h
@ 2007-11-13 21:35 Julia Lawall
  2007-11-14 20:54 ` Roland Dreier
  0 siblings, 1 reply; 4+ messages in thread
From: Julia Lawall @ 2007-11-13 21:35 UTC (permalink / raw)
  To: rolandd, mshefty, halr, openib-general, linux-kernel, kernel-janitors

From: Julia Lawall <julia@diku.dk>

Drop #include <linux/moduleparam.h> in files that also include #include
<linux/module.h>.  module.h includes moduleparam.h already.

The semantic patch implementing this change is as follows:

@ includesmodule @
@@

#include <linux/module.h>

@ depends on includesmodule @
@@

- #include <linux/moduleparam.h>

Signed-off-by: Julia Lawall <julia@diku.dk>
---

diff -u -p -b -B a/drivers/infiniband/hw/amso1100/c2.c b/drivers/infiniband/hw/amso1100/c2.c
--- a/drivers/infiniband/hw/amso1100/c2.c 2007-10-22 11:25:09.000000000 +0200
+++ b/drivers/infiniband/hw/amso1100/c2.c 2007-11-13 17:50:03.000000000 +0100
@@ -31,7 +31,6 @@
   * SOFTWARE.
   */
  #include <linux/module.h>
-#include <linux/moduleparam.h>
  #include <linux/pci.h>
  #include <linux/netdevice.h>
  #include <linux/etherdevice.h>
diff -u -p -b -B a/drivers/infiniband/hw/amso1100/c2_provider.c b/drivers/infiniband/hw/amso1100/c2_provider.c
--- a/drivers/infiniband/hw/amso1100/c2_provider.c 2007-10-22 11:25:09.000000000 +0200
+++ b/drivers/infiniband/hw/amso1100/c2_provider.c 2007-11-13 17:50:05.000000000 +0100
@@ -33,7 +33,6 @@
   */

  #include <linux/module.h>
-#include <linux/moduleparam.h>
  #include <linux/pci.h>
  #include <linux/netdevice.h>
  #include <linux/etherdevice.h>
diff -u -p -b -B a/drivers/infiniband/hw/amso1100/c2_rnic.c b/drivers/infiniband/hw/amso1100/c2_rnic.c
--- a/drivers/infiniband/hw/amso1100/c2_rnic.c 2007-02-09 17:34:09.000000000 +0100
+++ b/drivers/infiniband/hw/amso1100/c2_rnic.c 2007-11-13 17:50:06.000000000 +0100
@@ -34,7 +34,6 @@


  #include <linux/module.h>
-#include <linux/moduleparam.h>
  #include <linux/pci.h>
  #include <linux/netdevice.h>
  #include <linux/etherdevice.h>
diff -u -p -b -B a/drivers/infiniband/hw/ehca/ehca_tools.h b/drivers/infiniband/hw/ehca/ehca_tools.h
--- a/drivers/infiniband/hw/ehca/ehca_tools.h 2007-10-22 11:25:09.000000000 +0200
+++ b/drivers/infiniband/hw/ehca/ehca_tools.h 2007-11-13 17:50:06.000000000 +0100
@@ -52,7 +52,6 @@
  #include <linux/mm.h>
  #include <linux/mman.h>
  #include <linux/module.h>
-#include <linux/moduleparam.h>
  #include <linux/vmalloc.h>
  #include <linux/version.h>
  #include <linux/notifier.h>
diff -u -p -b -B a/drivers/infiniband/hw/mthca/mthca_profile.c b/drivers/infiniband/hw/mthca/mthca_profile.c
--- a/drivers/infiniband/hw/mthca/mthca_profile.c 2007-06-02 22:32:12.000000000 +0200
+++ b/drivers/infiniband/hw/mthca/mthca_profile.c 2007-11-13 17:50:23.000000000 +0100
@@ -34,7 +34,6 @@
   */

  #include <linux/module.h>
-#include <linux/moduleparam.h>
  #include <linux/string.h>
  #include <linux/slab.h>

diff -u -p -b -B a/drivers/infiniband/hw/cxgb3/iwch.c b/drivers/infiniband/hw/cxgb3/iwch.c
--- a/drivers/infiniband/hw/cxgb3/iwch.c 2007-06-02 22:32:12.000000000 +0200
+++ b/drivers/infiniband/hw/cxgb3/iwch.c 2007-11-13 17:50:25.000000000 +0100
@@ -30,7 +30,6 @@
   * SOFTWARE.
   */
  #include <linux/module.h>
-#include <linux/moduleparam.h>

  #include <rdma/ib_verbs.h>

diff -u -p -b -B a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c
--- a/drivers/infiniband/hw/cxgb3/iwch_provider.c 2007-07-20 17:45:46.000000000 +0200
+++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c 2007-11-13 17:50:27.000000000 +0100
@@ -30,7 +30,6 @@
   * SOFTWARE.
   */
  #include <linux/module.h>
-#include <linux/moduleparam.h>
  #include <linux/device.h>
  #include <linux/netdevice.h>
  #include <linux/etherdevice.h>

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

* Re: [PATCH 3/4] drivers/infiniband: Drop redundant includes of moduleparam.h
  2007-11-13 21:35 [PATCH 3/4] drivers/infiniband: Drop redundant includes of moduleparam.h Julia Lawall
@ 2007-11-14 20:54 ` Roland Dreier
  2007-11-14 21:00   ` Randy Dunlap
  2007-11-14 21:18   ` Julia Lawall
  0 siblings, 2 replies; 4+ messages in thread
From: Roland Dreier @ 2007-11-14 20:54 UTC (permalink / raw)
  To: Julia Lawall
  Cc: rolandd, mshefty, halr, openib-general, linux-kernel, kernel-janitors

 > Drop #include <linux/moduleparam.h> in files that also include #include
 > <linux/module.h>.  module.h includes moduleparam.h already.

Do we want to make this sort of source code change?  I thought that
the consensus about the kernel was that we wanted to avoid relying of
implicit includes of <Y.h> by <X.h> -- in this case a better change
would actually seem to be to explicitly include moduleparam.h in files
using module parameters and then remove the include from module.h.

 - R.

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

* Re: [PATCH 3/4] drivers/infiniband: Drop redundant includes of moduleparam.h
  2007-11-14 20:54 ` Roland Dreier
@ 2007-11-14 21:00   ` Randy Dunlap
  2007-11-14 21:18   ` Julia Lawall
  1 sibling, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2007-11-14 21:00 UTC (permalink / raw)
  To: Roland Dreier
  Cc: Julia Lawall, rolandd, mshefty, halr, openib-general,
	linux-kernel, kernel-janitors

On Wed, 14 Nov 2007 12:54:52 -0800 Roland Dreier wrote:

>  > Drop #include <linux/moduleparam.h> in files that also include #include
>  > <linux/module.h>.  module.h includes moduleparam.h already.
> 
> Do we want to make this sort of source code change?  I thought that
> the consensus about the kernel was that we wanted to avoid relying of
> implicit includes of <Y.h> by <X.h> -- in this case a better change
> would actually seem to be to explicitly include moduleparam.h in files
> using module parameters and then remove the include from module.h.

That's correct AFAIK (what Roland said).

---
~Randy

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

* Re: [PATCH 3/4] drivers/infiniband: Drop redundant includes of moduleparam.h
  2007-11-14 20:54 ` Roland Dreier
  2007-11-14 21:00   ` Randy Dunlap
@ 2007-11-14 21:18   ` Julia Lawall
  1 sibling, 0 replies; 4+ messages in thread
From: Julia Lawall @ 2007-11-14 21:18 UTC (permalink / raw)
  To: Roland Dreier
  Cc: rolandd, mshefty, halr, openib-general, linux-kernel, kernel-janitors

On Wed, 14 Nov 2007, Roland Dreier wrote:

> > Drop #include <linux/moduleparam.h> in files that also include #include
> > <linux/module.h>.  module.h includes moduleparam.h already.
>
> Do we want to make this sort of source code change?  I thought that
> the consensus about the kernel was that we wanted to avoid relying of
> implicit includes of <Y.h> by <X.h> -- in this case a better change
> would actually seem to be to explicitly include moduleparam.h in files
> using module parameters and then remove the include from module.h.

Someone else made a similar comment, so it seems reasonable to forget 
about the patches.

I could easily make a patch to go the other way if there is an interest in 
that.  On the other hand, perhaps the concensus is to just leave things 
as they are.

julia


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

end of thread, other threads:[~2007-11-14 21:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-13 21:35 [PATCH 3/4] drivers/infiniband: Drop redundant includes of moduleparam.h Julia Lawall
2007-11-14 20:54 ` Roland Dreier
2007-11-14 21:00   ` Randy Dunlap
2007-11-14 21:18   ` Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).