* [PATCH 3.0]isdn add audit to request_region
@ 2011-10-25 8:18 Jimmy Pan
2011-10-25 9:22 ` Dan Carpenter
0 siblings, 1 reply; 2+ messages in thread
From: Jimmy Pan @ 2011-10-25 8:18 UTC (permalink / raw)
To: kernel-janitors
Add three audit for request_region() function.
Mere newbie here, I don't know if my style of posting and developing is correct.
If anything I've done wrong, please correct me.
--- linux-3.0_build/drivers/isdn/sc/init.c 2011-07-22 10:17:23.000000000 +0800
+++ linux-3.0/drivers/isdn/sc/init.c 2011-10-25 14:22:14.475039218 +0800
@@ -349,19 +349,22 @@ static int __init sc_init(void)
sc_adapter[cinst]->iobase = io[b];
for(i = 0 ; i < MAX_IO_REGS - 1 ; i++) {
sc_adapter[cinst]->ioport[i] = io[b] + i * 0x400;
- request_region(sc_adapter[cinst]->ioport[i], 1,
- interface->id);
+ if (!request_region(sc_adapter[cinst]->ioport[i], 1,
+ interface->id))
+ pr_debug("request_region failed\n");
pr_debug("Requesting I/O Port %#x\n",
sc_adapter[cinst]->ioport[i]);
}
sc_adapter[cinst]->ioport[IRQ_SELECT] = io[b] + 0x2;
- request_region(sc_adapter[cinst]->ioport[IRQ_SELECT], 1,
- interface->id);
+ if (!request_region(sc_adapter[cinst]->ioport[IRQ_SELECT], 1,
+ interface->id))
+ pr_debug("request_region failed\n");
pr_debug("Requesting I/O Port %#x\n",
sc_adapter[cinst]->ioport[IRQ_SELECT]);
sc_adapter[cinst]->rambase = ram[b];
- request_region(sc_adapter[cinst]->rambase, SRAM_PAGESIZE,
- interface->id);
+ if (!request_region(sc_adapter[cinst]->rambase, SRAM_PAGESIZE,
+ interface->id))
+ pr_debug("request_region failed\n");
pr_info(" %s (%d) - %s %d channels IRQ %d, I/O Base 0x%x, RAM Base
0x%lx\n",
sc_adapter[cinst]->devicename,
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 3.0]isdn add audit to request_region
2011-10-25 8:18 [PATCH 3.0]isdn add audit to request_region Jimmy Pan
@ 2011-10-25 9:22 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2011-10-25 9:22 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 938 bytes --]
On Tue, Oct 25, 2011 at 04:18:47PM +0800, Jimmy Pan wrote:
> Add three audit for request_region() function.
> Mere newbie here, I don't know if my style of posting and developing is correct.
> If anything I've done wrong, please correct me.
>
This patch doesn't really do anything worthwhile. It just adds some
debugging output that no one will ever see. If you really need this,
then can you explain why?
Other details:
1) The patch doesn't apply. Your email client line wrapped.
Read Documentation/email-clients.txt Send the patch to yourself.
Save the raw email (including headers). cat raw_email.txt | patch -p1
2) You need to add a Signed-off-by line.
3) CC the right maintainers. Use the ./scripts/get_maintainer.pl
Add kernel-janitors as a CC and we can give you any hints.
Don't worry that your first patch was not accepted. Everyone starts
as a newbie. Welcome. :)
regards,
dan carpenter
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-10-25 9:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-25 8:18 [PATCH 3.0]isdn add audit to request_region Jimmy Pan
2011-10-25 9:22 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox