linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: OMAP2: add type cast from 'unsigned' to 'signed'
@ 2013-08-21  8:26 Chen Gang
  2013-08-21  8:31 ` [PATCH] ARM: OMAP2: remove useless variable 'ret' Chen Gang
  2013-08-22  7:14 ` [PATCH] ARM: OMAP2: add type cast from 'unsigned' to 'signed' Tony Lindgren
  0 siblings, 2 replies; 27+ messages in thread
From: Chen Gang @ 2013-08-21  8:26 UTC (permalink / raw)
  To: linux-arm-kernel

Need add type cast, or can not notice the failure. The related warning
(allmodconfig, "EXTRA_CFLAGS=-W"):

  arch/arm/mach-omap2/gpmc.c:728:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]


Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 arch/arm/mach-omap2/gpmc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index f3fdd6a..62377b5 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -725,7 +725,7 @@ static int gpmc_setup_irq(void)
 		return -EINVAL;
 
 	gpmc_irq_start = irq_alloc_descs(-1, 0, GPMC_NR_IRQ, 0);
-	if (gpmc_irq_start < 0) {
+	if ((signed)gpmc_irq_start < 0) {
 		pr_err("irq_alloc_descs failed\n");
 		return gpmc_irq_start;
 	}
-- 
1.7.7.6

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

end of thread, other threads:[~2013-09-23  1:50 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-21  8:26 [PATCH] ARM: OMAP2: add type cast from 'unsigned' to 'signed' Chen Gang
2013-08-21  8:31 ` [PATCH] ARM: OMAP2: remove useless variable 'ret' Chen Gang
2013-08-22  7:17   ` Tony Lindgren
2013-08-22  7:24     ` Chen Gang
     [not found]   ` <52147E12.4060401@asianux.com>
2013-08-22  7:45     ` [Suggestion] ARM: allmodconfig: about cross compiling failure under i386 ubuntu Tony Lindgren
2013-08-22  9:19       ` Chen Gang
2013-08-22 10:15         ` Chen Gang
2013-08-22 10:22       ` Russell King - ARM Linux
2013-08-23  1:47         ` Chen Gang
2013-08-23  2:06           ` Chen Gang
2013-08-23  3:04             ` [PATCH] ARM: VExpress: Kconfig: avoid arm6 compatible for ARCH_VEXPRESS Chen Gang
2013-08-23  3:12               ` Chen Gang
2013-08-23  5:51                 ` Tony Lindgren
2013-08-23  7:02                   ` Chen Gang
2013-08-23  7:15                     ` Chen Gang
2013-08-23  8:02                       ` [PATCH v2] ARM: VExpress: Makefile: add armv7 flags for inline assmembly code compiling Chen Gang
2013-08-23  8:12                         ` Chen Gang
2013-09-23  1:50                           ` [PATCH v3] " Chen Gang
2013-08-22  7:14 ` [PATCH] ARM: OMAP2: add type cast from 'unsigned' to 'signed' Tony Lindgren
2013-08-22  7:43   ` Chen Gang
2013-08-22  7:47     ` [PATCH v2] ARM: OMAP2: use 'int' instead of 'unsigned' for variable 'gpmc_irq_start' Chen Gang
2013-08-22  7:57       ` Tony Lindgren
2013-08-22  8:01         ` Chen Gang
2013-08-22  8:32           ` Tony Lindgren
2013-08-22  8:59             ` Chen Gang F T
2013-08-23  5:48               ` Tony Lindgren
2013-08-23  6:14                 ` Chen Gang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).