* [PATCH 4 of 5 ] /drivers/char/rio ioremap balancing/ returncode check
@ 2007-08-13 4:05 Scott Thompson
2007-08-13 10:42 ` Alan Cox
2007-08-13 20:30 ` Jiri Slaby
0 siblings, 2 replies; 8+ messages in thread
From: Scott Thompson @ 2007-08-13 4:05 UTC (permalink / raw)
To: linux-kernel, kernel-janitors, dri-devel
patchset against 2.6.23-rc2 and this set is an audit of
/drivers/char/a*
through drivers/char .
this corrects missing ioremap return checks and balancing on
iounmap calls..
Signed-off-by: Scott Thompson <postfail <at> hushmail.com>
----------------------------------------------------------
diff --git a/drivers/char/rio/rio_linux.c
b/drivers/char/rio/rio_linux.c
index 0ce9667..fdaf44f 100644
--- a/drivers/char/rio/rio_linux.c
+++ b/drivers/char/rio/rio_linux.c
@@ -924,6 +924,11 @@ static void fix_rio_pci(struct pci_dev *pdev)
hwbase = pci_resource_start(pdev, 0);
rebase = ioremap(hwbase, 0x80);
+ if (!rebase) {
+ printk(KERN_DEBUG "rio: unable to perform cntrl reg fix as
ioremap call failed\n");
+ return;
+ }
+
t = readl(rebase + CNTRL_REG_OFFSET);
if (t != CNTRL_REG_GOODVALUE) {
printk(KERN_DEBUG "rio: performing cntrl reg fix: %08x ->
%08x\n", t, CNTRL_REG_GOODVALUE);
@@ -996,6 +1001,11 @@ static int __init rio_init(void)
if (((1 << hp->Ivec) & rio_irqmask) == 0)
hp->Ivec = 0;
hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP,
RIO_WINDOW_LEN);
+ if (!hp->Caddr) {
+ printk(KERN_ERR "RIO: Unable to ioremap.\n");
+ return -ENOMEM;
+ }
+
hp->CardP = (struct DpRam __iomem *) hp->Caddr;
hp->Type = RIO_PCI;
hp->Copy = rio_copy_to_card;
@@ -1049,6 +1059,10 @@ static int __init rio_init(void)
hp->Ivec = 0;
hp->Ivec |= 0x8000; /* Mark as non-sharable */
hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP,
RIO_WINDOW_LEN);
+ if (!hp->Caddr) {
+ printk(KERN_ERR "RIO: Unable to ioremap.\n");
+ return -ENOMEM;
+ }
hp->CardP = (struct DpRam __iomem *) hp->Caddr;
hp->Type = RIO_PCI;
hp->Copy = rio_copy_to_card;
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH 4 of 5 ] /drivers/char/rio ioremap balancing/ returncode check
2007-08-13 4:05 [PATCH 4 of 5 ] /drivers/char/rio ioremap balancing/ returncode check Scott Thompson
@ 2007-08-13 10:42 ` Alan Cox
2007-08-13 20:30 ` Jiri Slaby
1 sibling, 0 replies; 8+ messages in thread
From: Alan Cox @ 2007-08-13 10:42 UTC (permalink / raw)
To: postfail; +Cc: linux-kernel, kernel-janitors, dri-devel
On Mon, 13 Aug 2007 00:05:30 -0400
"Scott Thompson" <postfail@hushmail.com> wrote:
> patchset against 2.6.23-rc2 and this set is an audit of
> /drivers/char/a*
> through drivers/char .
>
> this corrects missing ioremap return checks and balancing on
> iounmap calls..
Your mail client has wrapped the patches. Please resend without wrapping
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 4 of 5 ] /drivers/char/rio ioremap balancing/ returncode check
2007-08-13 4:05 [PATCH 4 of 5 ] /drivers/char/rio ioremap balancing/ returncode check Scott Thompson
2007-08-13 10:42 ` Alan Cox
@ 2007-08-13 20:30 ` Jiri Slaby
1 sibling, 0 replies; 8+ messages in thread
From: Jiri Slaby @ 2007-08-13 20:30 UTC (permalink / raw)
To: postfail; +Cc: linux-kernel, kernel-janitors, dri-devel
why dri-devel@lists.sourceforge.net?
Scott Thompson napsal(a):
> patchset against 2.6.23-rc2 and this set is an audit of
> /drivers/char/a*
> through drivers/char .
>
> this corrects missing ioremap return checks and balancing on
> iounmap calls..
>
> Signed-off-by: Scott Thompson <postfail <at> hushmail.com>
> ----------------------------------------------------------
> diff --git a/drivers/char/rio/rio_linux.c
> b/drivers/char/rio/rio_linux.c
> index 0ce9667..fdaf44f 100644
> --- a/drivers/char/rio/rio_linux.c
> +++ b/drivers/char/rio/rio_linux.c
> @@ -924,6 +924,11 @@ static void fix_rio_pci(struct pci_dev *pdev)
>
> hwbase = pci_resource_start(pdev, 0);
> rebase = ioremap(hwbase, 0x80);
> + if (!rebase) {
> + printk(KERN_DEBUG "rio: unable to perform cntrl reg fix as
> ioremap call failed\n");
> + return;
> + }
> +
> t = readl(rebase + CNTRL_REG_OFFSET);
> if (t != CNTRL_REG_GOODVALUE) {
> printk(KERN_DEBUG "rio: performing cntrl reg fix: %08x ->
> %08x\n", t, CNTRL_REG_GOODVALUE);
> @@ -996,6 +1001,11 @@ static int __init rio_init(void)
> if (((1 << hp->Ivec) & rio_irqmask) == 0)
> hp->Ivec = 0;
> hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP,
> RIO_WINDOW_LEN);
> + if (!hp->Caddr) {
> + printk(KERN_ERR "RIO: Unable to ioremap.\n");
> + return -ENOMEM;
> + }
hmm, and what about the yet inited cards here?
> +
> hp->CardP = (struct DpRam __iomem *) hp->Caddr;
> hp->Type = RIO_PCI;
> hp->Copy = rio_copy_to_card;
> @@ -1049,6 +1059,10 @@ static int __init rio_init(void)
> hp->Ivec = 0;
> hp->Ivec |= 0x8000; /* Mark as non-sharable */
> hp->Caddr = ioremap(p->RIOHosts[p->RIONumHosts].PaddrP,
> RIO_WINDOW_LEN);
> + if (!hp->Caddr) {
> + printk(KERN_ERR "RIO: Unable to ioremap.\n");
> + return -ENOMEM;
> + }
And here.
> hp->CardP = (struct DpRam __iomem *) hp->Caddr;
> hp->Type = RIO_PCI;
> hp->Copy = rio_copy_to_card;
And what about the one on the line 1093?
--
Jiri Slaby (jirislaby@gmail.com)
Faculty of Informatics, Masaryk University
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 4 of 5 ] /drivers/char/rio ioremap balancing/ returncode check
@ 2007-08-13 12:50 Scott Thompson
2007-08-13 13:21 ` Alan Cox
0 siblings, 1 reply; 8+ messages in thread
From: Scott Thompson @ 2007-08-13 12:50 UTC (permalink / raw)
To: alan; +Cc: linux-kernel, kernel-janitors
On Mon, 13 Aug 2007 06:42:35 -0400 Alan Cox
<alan@lxorguk.ukuu.org.uk> wrote:
>Your mail client has wrapped the patches. Please resend without
>wrapping
Much as I'd love to blame my mail client for this one...
Patch 4 of the 5 I sent was the only one with wrapping, and that
wrapping existed in abundance in /drivers/char/rio/rio_linux.c file
long before I got there. Several lines in that file exceed 100
columns, I think the "winner" was around 142.
I think tackling all the wordwrap issues would belong in a
different patch as I'm just trying to clean up ioremap usage. And,
yes, I contributed *one more* wordwrap issue to the file, but when
in Rome...
---------------------------------------
Scott Thompson / postfail@hushmail.com
---------------------------------------
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 4 of 5 ] /drivers/char/rio ioremap balancing/ returncode check
2007-08-13 12:50 Scott Thompson
@ 2007-08-13 13:21 ` Alan Cox
0 siblings, 0 replies; 8+ messages in thread
From: Alan Cox @ 2007-08-13 13:21 UTC (permalink / raw)
To: postfail; +Cc: linux-kernel, kernel-janitors
> Patch 4 of the 5 I sent was the only one with wrapping, and that
> wrapping existed in abundance in /drivers/char/rio/rio_linux.c file
> long before I got there. Several lines in that file exceed 100
> columns, I think the "winner" was around 142.
Thats not the issue - the patch itself appears to be wrapped and mangled
and is not suitable for application.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 4 of 5 ] /drivers/char/rio ioremap balancing/ returncode check
@ 2007-08-14 4:01 Scott Thompson
2007-08-15 19:38 ` Jiri Slaby
0 siblings, 1 reply; 8+ messages in thread
From: Scott Thompson @ 2007-08-14 4:01 UTC (permalink / raw)
To: jirislaby; +Cc: linux-kernel, kernel-janitors, dri-devel
On Mon, 13 Aug 2007 16:30:14 -0400 Jiri Slaby <jirislaby@gmail.com>
wrote:
>why dri-devel@lists.sourceforge.net?
>
David Airlie was listed as the owner on several of the files and in
maintainers for "DRM", which was my best to: guess for
/drivers/char/drm (which was patch 3 in this series).
If there was a better list, or just to linux-kernel, please let me
know as tracking down the 'right' list for these kernel-janitor
kind of tasks can be tricky....
---------------------------------------
Scott Thompson / postfail@hushmail.com
---------------------------------------
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 4 of 5 ] /drivers/char/rio ioremap balancing/ returncode check
2007-08-14 4:01 Scott Thompson
@ 2007-08-15 19:38 ` Jiri Slaby
0 siblings, 0 replies; 8+ messages in thread
From: Jiri Slaby @ 2007-08-15 19:38 UTC (permalink / raw)
To: postfail; +Cc: linux-kernel, kernel-janitors, dri-devel
Scott Thompson napsal(a):
> On Mon, 13 Aug 2007 16:30:14 -0400 Jiri Slaby <jirislaby@gmail.com>
> wrote:
>> why dri-devel@lists.sourceforge.net?
>>
>
> David Airlie was listed as the owner on several of the files and in
> maintainers for "DRM", which was my best to: guess for
> /drivers/char/drm (which was patch 3 in this series).
>
> If there was a better list, or just to linux-kernel, please let me
> know as tracking down the 'right' list for these kernel-janitor
> kind of tasks can be tricky....
Ok. I was just curious, why did you CC drm people for char drivers changes.
BTW. is there anybody on janitors list, who collects all those patches and
forwards them upstream?
--
Jiri Slaby (jirislaby@gmail.com)
Faculty of Informatics, Masaryk University
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 4 of 5 ] /drivers/char/rio ioremap balancing/ returncode check
@ 2007-08-15 19:52 Scott Thompson
0 siblings, 0 replies; 8+ messages in thread
From: Scott Thompson @ 2007-08-15 19:52 UTC (permalink / raw)
To: jirislaby; +Cc: linux-kernel, kernel-janitors, dri-devel
On Wed, 15 Aug 2007 15:38:23 -0400 Jiri Slaby <jirislaby@gmail.com>
wrote:
>Ok. I was just curious, why did you CC drm people for char drivers
>changes.
>
>BTW. is there anybody on janitors list, who collects all those
>patches and
>forwards them upstream?
>
The "MAINTAINERS" list claims that there are "several" maintainers
for the kernel-janitors submitted patches and the readme on
kerneljanitors.org (http://www.kerneljanitors.org/README) lists a
few folks. Copying the originating maintainer/list is recommended
in one of the kerneljanitor faqs. Some groups seem more receptive
to these kind of fixes than others, though they may just be more
active maintainers.
I don't know if anyone does or doesn't roll these up collectively,
maybe the list can advise...
---------------------------------------
Scott Thompson / postfail@hushmail.com
---------------------------------------
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-08-15 19:53 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-13 4:05 [PATCH 4 of 5 ] /drivers/char/rio ioremap balancing/ returncode check Scott Thompson
2007-08-13 10:42 ` Alan Cox
2007-08-13 20:30 ` Jiri Slaby
-- strict thread matches above, loose matches on Subject: below --
2007-08-13 12:50 Scott Thompson
2007-08-13 13:21 ` Alan Cox
2007-08-14 4:01 Scott Thompson
2007-08-15 19:38 ` Jiri Slaby
2007-08-15 19:52 Scott Thompson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox