From patchwork Sat Sep 20 10:07:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 4940941 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6ABD4BEEA5 for ; Sat, 20 Sep 2014 10:07:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9C859201FA for ; Sat, 20 Sep 2014 10:07:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8B1F320103 for ; Sat, 20 Sep 2014 10:07:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753168AbaITKHV (ORCPT ); Sat, 20 Sep 2014 06:07:21 -0400 Received: from sauhun.de ([89.238.76.85]:58631 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751503AbaITKHU (ORCPT ); Sat, 20 Sep 2014 06:07:20 -0400 Received: from [93.88.102.82] (port=56927 helo=localhost) by pokefinder.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XVHZU-0002wt-CA; Sat, 20 Sep 2014 12:07:16 +0200 From: Wolfram Sang To: linux-i2c@vger.kernel.org Cc: linux-sh@vger.kernel.org, Wolfram Sang , Magnus Damm , Simon Horman , Laurent Pinchart , Geert Uytterhoeven , Sergei Shtylyov Subject: [PATCH] i2c: rcar: remove sign-compare flaw Date: Sat, 20 Sep 2014 12:07:37 +0200 Message-Id: <1411207657-23707-1-git-send-email-wsa@the-dreams.de> X-Mailer: git-send-email 2.0.0 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wolfram Sang 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 --- 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 4c6fa78063fb..1eed463662c4 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; }