Skip to contentSkip to conversation

request_region - arm/mach_footbridge/netwinder-hw.c

PATCH In review Ron Gage 2 participants 2 messages Feb 4, 2006 Kernel janitors

lore
Share & tools
lore

Ron Gage

author
#0 lore raw

PATCH 1/1 request_region - arm/mach_footbridge/netwinder-hw.c

This patch adds return value checking to request_region.  No other structural changes included...  Using kmail->message->insert file to post patch. diff -ur linux-2.6.15.orig/arch/arm/mach-footbridge/netwinder-hw.c linux-2.6.15/arch/arm/mach-footbridge/netwinder-hw.c
--- linux-2.6.15.orig/arch/arm/mach-footbridge/netwinder-hw.c 2006-02-04
11:00:21.000000000 -0500
+++ linux-2.6.15/arch/arm/mach-footbridge/netwinder-hw.c 2006-02-04
15:33:37.000000000 -0500
@@ -333,7 +333,12 @@
*/
static void __init wb977_init(void)
{
- request_region(0x370, 2, "W83977AF configuration");
+ struct resource *region;
+ region = request_region(0x370, 2, "W83977AF configuration");
+ if (!region) {
+ printk(KERN_ERR "Could not allocate region for W83977AF");
+ return;
+ }

/*
* Open up the SuperIO chip

Signature · 8 lines
Ron Gage 
(LPIC1, MCP, A+, Net+)
Westland Michigan

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
#1 lore raw
Quoted 2 lines · Ron Gage

This patch adds return value checking to request_region. No other structural changes included... Using kmail->message->insert file to post patch.

One small nit :

Review line 336

Quoted 12 lines

diff -ur linux-2.6.15.orig/arch/arm/mach-footbridge/netwinder-hw.c linux-2.6.15/arch/arm/mach-footbridge/netwinder-hw.c
--- linux-2.6.15.orig/arch/arm/mach-footbridge/netwinder-hw.c 2006-02-04
11:00:21.000000000 -0500
+++ linux-2.6.15/arch/arm/mach-footbridge/netwinder-hw.c 2006-02-04
15:33:37.000000000 -0500

(quoted diff) +1 -1
@@ -333,7 +333,12 @@
  */
 static void __init wb977_init(void)
 {
-       request_region(0x370, 2, "W83977AF configuration");
+       struct resource *region;

The prefered style for kernel code is that a blank line is placed between variable declarations and first actual code statement.

Review line 337

Quoted 1 line
(quoted diff) +1 -0
+       region = request_region(0x370, 2, "W83977AF configuration");

[...]

beyond that the patch looks fine to me.

--
Jesper Juhl <[email protected]>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors