Skip to contentSkip to conversation

hwspinlock/u8500: fix build error due to undefined label

PATCH Applied Axel Lin 3 participants 4 messages Nov 6, 2011 – Nov 7, 2011 Hardware spinlock core

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/2 hwspinlock/u8500: fix build error due to undefined label

Fix below build error:

CC drivers/hwspinlock/u8500_hsem.o
drivers/hwspinlock/u8500_hsem.c: In function 'u8500_hsem_probe':
drivers/hwspinlock/u8500_hsem.c:113: error: label 'free_state' used but not defined

---
 drivers/hwspinlock/u8500_hsem.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
drivers/hwspinlock/u8500_hsem.c +2 -4
index 143461a..a120f14 100644
@@ -108,10 +108,8 @@ static int __devinit u8500_hsem_probe(struct platform_device *pdev)
 		return -ENODEV;
 
 	io_base = ioremap(res->start, resource_size(res));
-	if (!io_base) {
-		ret = -ENOMEM;
-		goto free_state;
-	}
+	if (!io_base)
+		return -ENOMEM;
 
 	/* make sure protocol 1 is selected */
 	val = readl(io_base + HSEM_CTRL_REG);
Signature · 1 line
1.7.5.4
author
#1 lore raw

PATCH 2/2 hwspinlock/u8500: include linux/module.h

Include module.h to fix below build error:

CC drivers/hwspinlock/u8500_hsem.o
drivers/hwspinlock/u8500_hsem.c:177: error: 'THIS_MODULE' undeclared here (not in a function) drivers/hwspinlock/u8500_hsem.c:194: error: expected declaration specifiers or '...' before string constant drivers/hwspinlock/u8500_hsem.c:194: warning: data definition has no type or storage class drivers/hwspinlock/u8500_hsem.c:194: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE' drivers/hwspinlock/u8500_hsem.c:194: warning: function declaration isn't a prototype drivers/hwspinlock/u8500_hsem.c:195: error: expected declaration specifiers or '...' before string constant drivers/hwspinlock/u8500_hsem.c:195: warning: data definition has no type or storage class drivers/hwspinlock/u8500_hsem.c:195: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION' drivers/hwspinlock/u8500_hsem.c:195: warning: function declaration isn't a prototype drivers/hwspinlock/u8500_hsem.c:196: error: expected declaration specifiers or '...' before string constant drivers/hwspinlock/u8500_hsem.c:196: warning: data definition has no type or storage class drivers/hwspinlock/u8500_hsem.c:196: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR' drivers/hwspinlock/u8500_hsem.c:196: warning: function declaration isn't a prototype make[2]: *** [drivers/hwspinlock/u8500_hsem.o] Error 1
make[1]: *** [drivers/hwspinlock] Error 2
make: *** [drivers] Error 2

---
I got the build error on linux-next 20111104.
Axel

 drivers/hwspinlock/u8500_hsem.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/hwspinlock/u8500_hsem.c +1 -0
index a120f14..86980fe 100644
@@ -21,6 +21,7 @@
  * General Public License for more details.
  */
 
+#include <linux/module.h>
 #include <linux/delay.h>
 #include <linux/io.h>
 #include <linux/pm_runtime.h>
Signature · 1 line
1.7.5.4
Acked-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] hwspinlock/u8500: include linux/module.h

Quoted 1 line · Axel Lin

Include module.h to fix below build error:

Thanks for always fixing our build errors Axel,

Yours,
Linus Walleij