* [PATCH] Obsolete config in kernel source (USB_HCD_DMA)
@ 2010-01-20 12:35 Christoph Egger
2010-01-20 14:20 ` Sergei Shtylyov
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Egger @ 2010-01-20 12:35 UTC (permalink / raw)
To: linux-kernel, linux-usb, ok, sarah.a.sharp; +Cc: siccegge, Reinhard.Tartler
[-- Attachment #1: Type: text/plain, Size: 537 bytes --]
Hi all!
As part of the VAMOS[0] research project at the University of
Erlangen we're checking referential integrity between kernel KConfig
options and in-code Conditional blocks.
Similar to the config Option USB_HCD_STAT there's another
Zombi called USB_HCD_DMA only present in
./drivers/usb/host/isp1362-hcd.c The attached patch would just drop
the unreachable parts if you agree that's the correct solution.
Please keep me informed of this patch getting confirmed /
merged so we can keep track of it.
Regards
Christoph Egger
[-- Attachment #2: 0001-The-configuration-Option-USB_HCD_DMA-is-not-reachabl.patch --]
[-- Type: text/x-diff, Size: 1329 bytes --]
>From 2e5a8a322a6cd74ecb77eda8f0a09a0a01c6dbc6 Mon Sep 17 00:00:00 2001
From: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>
Date: Wed, 20 Jan 2010 13:32:36 +0100
Subject: [PATCH] The configuration Option USB_HCD_DMA is not reachable in KConfig so
this piece of Code is effectively dead and useless. Remove it to avoid
confusion.
Signed-off-by: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>
---
drivers/usb/host/isp1362-hcd.c | 13 -------------
1 files changed, 0 insertions(+), 13 deletions(-)
diff --git a/drivers/usb/host/isp1362-hcd.c b/drivers/usb/host/isp1362-hcd.c
index 73352f3..341db2c 100644
--- a/drivers/usb/host/isp1362-hcd.c
+++ b/drivers/usb/host/isp1362-hcd.c
@@ -2716,24 +2716,11 @@ static int __init isp1362_probe(struct platform_device *pdev)
goto err1;
}
-#ifdef CONFIG_USB_HCD_DMA
- if (pdev->dev.dma_mask) {
- struct resource *dma_res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
-
- if (!dma_res) {
- retval = -ENODEV;
- goto err1;
- }
- isp1362_hcd->data_dma = dma_res->start;
- isp1362_hcd->max_dma_size = resource_len(dma_res);
- }
-#else
if (pdev->dev.dma_mask) {
DBG(1, "won't do DMA");
retval = -ENODEV;
goto err1;
}
-#endif
if (!request_mem_region(addr->start, resource_len(addr), hcd_name)) {
retval = -EBUSY;
--
1.6.3.3
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] Obsolete config in kernel source (USB_HCD_DMA)
2010-01-20 12:35 [PATCH] Obsolete config in kernel source (USB_HCD_DMA) Christoph Egger
@ 2010-01-20 14:20 ` Sergei Shtylyov
2010-01-20 16:38 ` Randy Dunlap
0 siblings, 1 reply; 4+ messages in thread
From: Sergei Shtylyov @ 2010-01-20 14:20 UTC (permalink / raw)
To: Christoph Egger
Cc: linux-kernel, linux-usb, ok, sarah.a.sharp, Reinhard.Tartler
Hello.
Christoph Egger wrote:
> From 2e5a8a322a6cd74ecb77eda8f0a09a0a01c6dbc6 Mon Sep 17 00:00:00 2001
> From: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>
> Date: Wed, 20 Jan 2010 13:32:36 +0100
> Subject: [PATCH] The configuration Option USB_HCD_DMA is not reachable in KConfig so
> this piece of Code is effectively dead and useless. Remove it to avoid
> confusion.
>
The patch's subject should be a terse description of change, not the
substitute for the lengthy description as in your case.
WBR, Sergei
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Obsolete config in kernel source (USB_HCD_DMA)
2010-01-20 14:20 ` Sergei Shtylyov
@ 2010-01-20 16:38 ` Randy Dunlap
2010-01-21 13:58 ` Christoph Egger
0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2010-01-20 16:38 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: Christoph Egger, linux-kernel, linux-usb, ok, sarah.a.sharp,
Reinhard.Tartler
On Wed, 20 Jan 2010 17:20:18 +0300 Sergei Shtylyov wrote:
> Hello.
>
> Christoph Egger wrote:
>
> > From 2e5a8a322a6cd74ecb77eda8f0a09a0a01c6dbc6 Mon Sep 17 00:00:00 2001
> > From: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>
> > Date: Wed, 20 Jan 2010 13:32:36 +0100
> > Subject: [PATCH] The configuration Option USB_HCD_DMA is not reachable in KConfig so
> > this piece of Code is effectively dead and useless. Remove it to avoid
> > confusion.
> >
>
> The patch's subject should be a terse description of change, not the
> substitute for the lengthy description as in your case.
Also please insert patches inline in the email body instead of using
attachments. mutt can surely do this -- people do it all the time
(though I don't use mutt, so please don't ask me how).
---
~Randy
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Obsolete config in kernel source (USB_HCD_DMA)
2010-01-20 16:38 ` Randy Dunlap
@ 2010-01-21 13:58 ` Christoph Egger
0 siblings, 0 replies; 4+ messages in thread
From: Christoph Egger @ 2010-01-21 13:58 UTC (permalink / raw)
To: Randy Dunlap
Cc: Sergei Shtylyov, linux-kernel, linux-usb, ok, sarah.a.sharp,
Reinhard.Tartler
On Wed, Jan 20, 2010 at 08:38:06AM -0800, Randy Dunlap wrote:
> On Wed, 20 Jan 2010 17:20:18 +0300 Sergei Shtylyov wrote:
> >
> > The patch's subject should be a terse description of change, not the
> > substitute for the lengthy description as in your case.
>
> Also please insert patches inline in the email body instead of using
> attachments. mutt can surely do this -- people do it all the time
> (though I don't use mutt, so please don't ask me how).
---
>From 2e5a8a322a6cd74ecb77eda8f0a09a0a01c6dbc6 Mon Sep 17 00:00:00 2001
From: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>
Date: Wed, 20 Jan 2010 13:32:36 +0100
Subject: [PATCH] remove code block depending on unreferenced config item USB_HCD_DMA
The configuration Option USB_HCD_DMA is not reachable in KConfig so
this piece of Code is effectively dead and useless. Remove it to avoid
confusion.
Signed-off-by: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>
---
drivers/usb/host/isp1362-hcd.c | 13 -------------
1 files changed, 0 insertions(+), 13 deletions(-)
diff --git a/drivers/usb/host/isp1362-hcd.c b/drivers/usb/host/isp1362-hcd.c
index 73352f3..341db2c 100644
--- a/drivers/usb/host/isp1362-hcd.c
+++ b/drivers/usb/host/isp1362-hcd.c
@@ -2716,24 +2716,11 @@ static int __init isp1362_probe(struct platform_device *pdev)
goto err1;
}
-#ifdef CONFIG_USB_HCD_DMA
- if (pdev->dev.dma_mask) {
- struct resource *dma_res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
-
- if (!dma_res) {
- retval = -ENODEV;
- goto err1;
- }
- isp1362_hcd->data_dma = dma_res->start;
- isp1362_hcd->max_dma_size = resource_len(dma_res);
- }
-#else
if (pdev->dev.dma_mask) {
DBG(1, "won't do DMA");
retval = -ENODEV;
goto err1;
}
-#endif
if (!request_mem_region(addr->start, resource_len(addr), hcd_name)) {
retval = -EBUSY;
--
1.6.3.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-01-21 13:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-20 12:35 [PATCH] Obsolete config in kernel source (USB_HCD_DMA) Christoph Egger
2010-01-20 14:20 ` Sergei Shtylyov
2010-01-20 16:38 ` Randy Dunlap
2010-01-21 13:58 ` Christoph Egger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox