public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] hwspinlock/u8500: fix build error due to undefined label
@ 2011-11-06 13:14 Axel Lin
  2011-11-06 13:16 ` [PATCH 2/2] hwspinlock/u8500: include linux/module.h Axel Lin
  2011-11-06 16:27 ` [PATCH 1/2] hwspinlock/u8500: fix build error due to undefined label Ohad Ben-Cohen
  0 siblings, 2 replies; 4+ messages in thread
From: Axel Lin @ 2011-11-06 13:14 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ohad Ben-Cohen, Mathieu Poirier, Linus Walleij

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

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/hwspinlock/u8500_hsem.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/hwspinlock/u8500_hsem.c b/drivers/hwspinlock/u8500_hsem.c
index 143461a..a120f14 100644
--- a/drivers/hwspinlock/u8500_hsem.c
+++ b/drivers/hwspinlock/u8500_hsem.c
@@ -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);
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] hwspinlock/u8500: include linux/module.h
  2011-11-06 13:14 [PATCH 1/2] hwspinlock/u8500: fix build error due to undefined label Axel Lin
@ 2011-11-06 13:16 ` Axel Lin
  2011-11-07  8:08   ` Linus Walleij
  2011-11-06 16:27 ` [PATCH 1/2] hwspinlock/u8500: fix build error due to undefined label Ohad Ben-Cohen
  1 sibling, 1 reply; 4+ messages in thread
From: Axel Lin @ 2011-11-06 13:16 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ohad Ben-Cohen, Mathieu Poirier, Linus Walleij, Paul Gortmaker

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

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
I got the build error on linux-next 20111104.
Axel
 drivers/hwspinlock/u8500_hsem.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/hwspinlock/u8500_hsem.c b/drivers/hwspinlock/u8500_hsem.c
index a120f14..86980fe 100644
--- a/drivers/hwspinlock/u8500_hsem.c
+++ b/drivers/hwspinlock/u8500_hsem.c
@@ -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>
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] hwspinlock/u8500: fix build error due to undefined label
  2011-11-06 13:14 [PATCH 1/2] hwspinlock/u8500: fix build error due to undefined label Axel Lin
  2011-11-06 13:16 ` [PATCH 2/2] hwspinlock/u8500: include linux/module.h Axel Lin
@ 2011-11-06 16:27 ` Ohad Ben-Cohen
  1 sibling, 0 replies; 4+ messages in thread
From: Ohad Ben-Cohen @ 2011-11-06 16:27 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, Mathieu Poirier, Linus Walleij

On Sun, Nov 6, 2011 at 3:14 PM, Axel Lin <axel.lin@gmail.com> wrote:
> Fix below build error:

Applied both patches, thanks !

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] hwspinlock/u8500: include linux/module.h
  2011-11-06 13:16 ` [PATCH 2/2] hwspinlock/u8500: include linux/module.h Axel Lin
@ 2011-11-07  8:08   ` Linus Walleij
  0 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2011-11-07  8:08 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, Ohad Ben-Cohen, Mathieu Poirier, Paul Gortmaker

On Sun, Nov 6, 2011 at 2:16 PM, Axel Lin <axel.lin@gmail.com> wrote:

> Include module.h to fix below build error:

Thanks for always fixing our build errors Axel,
Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-11-07  8:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-06 13:14 [PATCH 1/2] hwspinlock/u8500: fix build error due to undefined label Axel Lin
2011-11-06 13:16 ` [PATCH 2/2] hwspinlock/u8500: include linux/module.h Axel Lin
2011-11-07  8:08   ` Linus Walleij
2011-11-06 16:27 ` [PATCH 1/2] hwspinlock/u8500: fix build error due to undefined label Ohad Ben-Cohen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox