Commit 22762ccb authored by Wolfram Sang's avatar Wolfram Sang Committed by Wolfram Sang

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: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 8b57cebe
...@@ -195,7 +195,7 @@ static int rcar_i2c_clock_calculate(struct rcar_i2c_priv *priv, ...@@ -195,7 +195,7 @@ static int rcar_i2c_clock_calculate(struct rcar_i2c_priv *priv,
*/ */
rate = clk_get_rate(priv->clk); rate = clk_get_rate(priv->clk);
cdf = rate / 20000000; cdf = rate / 20000000;
if (cdf >= 1 << cdf_width) { if (cdf >= 1U << cdf_width) {
dev_err(dev, "Input clock %lu too high\n", rate); dev_err(dev, "Input clock %lu too high\n", rate);
return -EIO; return -EIO;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment