[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <521483CD.8050907@asianux.com>
Date: Wed, 21 Aug 2013 17:09:33 +0800
From: Chen Gang <gang.chen@...anux.com>
To: wg@...ndegger.com, mkl@...gutronix.de, anilkumar@...com,
Tony Lindgren <tony@...mide.com>, jg1.han@...sung.com
CC: David Miller <davem@...emloft.net>, linux-can@...r.kernel.org,
netdev <netdev@...r.kernel.org>
Subject: [PATCH next] drivers: net: can: c_can: add type cast from 'unsigned
int' to 'int'
'priv->instance' may less than zero, so need a type cast, the related
warnings (allmodconfig, "EXTRA_CFLAGS=-W"):
drivers/net/can/c_can/c_can_platform.c:198:3: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
Signed-off-by: Chen Gang <gang.chen@...anux.com>
---
drivers/net/can/c_can/c_can_platform.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/can/c_can/c_can_platform.c b/drivers/net/can/c_can/c_can_platform.c
index c6f838d..294ced3 100644
--- a/drivers/net/can/c_can/c_can_platform.c
+++ b/drivers/net/can/c_can/c_can_platform.c
@@ -195,7 +195,7 @@ static int c_can_plat_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
priv->raminit_ctrlreg = devm_ioremap_resource(&pdev->dev, res);
- if (IS_ERR(priv->raminit_ctrlreg) || priv->instance < 0)
+ if (IS_ERR(priv->raminit_ctrlreg) || (int)priv->instance < 0)
dev_info(&pdev->dev, "control memory is not used for raminit\n");
else
priv->raminit = c_can_hw_raminit;
--
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists