* [KJ] [PATCH 2.6.17-rc1-mm2] net: cleanup CONFIG_PCI from dgrs.c
@ 2006-04-09 17:23 Richard Knutsson
2006-04-10 7:08 ` Andrew Morton
2006-04-10 10:43 ` Richard Knutsson
0 siblings, 2 replies; 3+ messages in thread
From: Richard Knutsson @ 2006-04-09 17:23 UTC (permalink / raw)
To: kernel-janitors
From: Richard Knutsson <ricknu-0@student.ltu.se>
Removed (I believe) unnecessary CONFIG_PCI and an ugly (previous patch
of mine) empty struct if !CONFIG_PCI.
Compiled tested, with and without an "#undef CONFIG_PCI" in dgrs.c, with
no warnings/errors.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
---
dgrs.c | 8 +-------
1 files changed, 1 insertion(+), 7 deletions(-)
diff -Narup a/drivers/net/dgrs.c b/drivers/net/dgrs.c
--- a/drivers/net/dgrs.c 2006-04-09 15:47:43.000000000 +0200
+++ b/drivers/net/dgrs.c 2006-04-09 18:22:12.000000000 +0200
@@ -121,11 +121,11 @@ typedef unsigned int bool;
#include "dgrs_asstruct.h"
#include "dgrs_bcomm.h"
-#ifdef CONFIG_PCI
static struct pci_device_id dgrs_pci_tbl[] = {
{ SE6_PCI_VENDOR_ID, SE6_PCI_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID, },
{ } /* Terminating entry */
};
+#ifdef CONFIG_PCI
MODULE_DEVICE_TABLE(pci, dgrs_pci_tbl);
#endif
@@ -1381,7 +1381,6 @@ static void __devexit dgrs_remove(struct
}
}
-#ifdef CONFIG_PCI
static int __init dgrs_pci_probe(struct pci_dev *pdev,
const struct pci_device_id *ent)
{
@@ -1458,9 +1457,6 @@ static struct pci_driver dgrs_pci_driver
.probe = dgrs_pci_probe,
.remove = __devexit_p(dgrs_pci_remove),
};
-#else
-static struct pci_driver dgrs_pci_driver = {};
-#endif
#ifdef CONFIG_EISA
@@ -1608,9 +1604,7 @@ static void __exit dgrs_cleanup_module (
#ifdef CONFIG_EISA
eisa_driver_unregister (&dgrs_eisa_driver);
#endif
-#ifdef CONFIG_PCI
pci_unregister_driver (&dgrs_pci_driver);
-#endif
}
module_init(dgrs_init_module);
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [KJ] [PATCH 2.6.17-rc1-mm2] net: cleanup CONFIG_PCI from dgrs.c
2006-04-09 17:23 [KJ] [PATCH 2.6.17-rc1-mm2] net: cleanup CONFIG_PCI from dgrs.c Richard Knutsson
@ 2006-04-10 7:08 ` Andrew Morton
2006-04-10 10:43 ` Richard Knutsson
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2006-04-10 7:08 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 443 bytes --]
Richard Knutsson <ricknu-0@student.ltu.se> wrote:
>
> From: Richard Knutsson <ricknu-0@student.ltu.se>
>
> Removed (I believe) unnecessary CONFIG_PCI and an ugly (previous patch
> of mine) empty struct if !CONFIG_PCI.
>
> Compiled tested, with and without an "#undef CONFIG_PCI" in dgrs.c, with
> no warnings/errors.
>
If !CONFIG_PCI we don't want to be compiling that relatively large but
unused dgrs_pci_probe() into the object file.;
[-- Attachment #2: Type: text/plain, Size: 168 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [KJ] [PATCH 2.6.17-rc1-mm2] net: cleanup CONFIG_PCI from dgrs.c
2006-04-09 17:23 [KJ] [PATCH 2.6.17-rc1-mm2] net: cleanup CONFIG_PCI from dgrs.c Richard Knutsson
2006-04-10 7:08 ` Andrew Morton
@ 2006-04-10 10:43 ` Richard Knutsson
1 sibling, 0 replies; 3+ messages in thread
From: Richard Knutsson @ 2006-04-10 10:43 UTC (permalink / raw)
To: kernel-janitors
Andrew Morton wrote:
>Richard Knutsson <ricknu-0@student.ltu.se> wrote:
>
>
>>From: Richard Knutsson <ricknu-0@student.ltu.se>
>>
>>Removed (I believe) unnecessary CONFIG_PCI and an ugly (previous patch
>>of mine) empty struct if !CONFIG_PCI.
>>
>>Compiled tested, with and without an "#undef CONFIG_PCI" in dgrs.c, with
>>no warnings/errors.
>>
>>
>>
>
>If !CONFIG_PCI we don't want to be compiling that relatively large but
>unused dgrs_pci_probe() into the object file.;
>
>
Oh, sorry about that. Thought the compiler optimized those away.
Have looked through the Makefile now (better late then never, right?)
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-04-10 10:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-09 17:23 [KJ] [PATCH 2.6.17-rc1-mm2] net: cleanup CONFIG_PCI from dgrs.c Richard Knutsson
2006-04-10 7:08 ` Andrew Morton
2006-04-10 10:43 ` Richard Knutsson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.