From 22762ccb0ef02a8fbdde09046d7095d46f3b7095 Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Sat, 20 Sep 2014 12:07:37 +0200 Subject: [PATCH] i2c: rcar: remove sign-compare flaw gcc rightfully says: drivers/i2c/busses/i2c-rcar.c:198:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Signed-off-by: Wolfram Sang Acked-by: Laurent Pinchart Signed-off-by: Wolfram Sang --- drivers/i2c/busses/i2c-rcar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c index b694cba63807..d826e82dd997 100644 --- a/drivers/i2c/busses/i2c-rcar.c +++ b/drivers/i2c/busses/i2c-rcar.c @@ -195,7 +195,7 @@ static int rcar_i2c_clock_calculate(struct rcar_i2c_priv *priv, */ rate = clk_get_rate(priv->clk); cdf = rate / 20000000; - if (cdf >= 1 << cdf_width) { + if (cdf >= 1U << cdf_width) { dev_err(dev, "Input clock %lu too high\n", rate); return -EIO; } -- 2.20.1