Received: by 10.192.165.156 with SMTP id m28csp2340579imm; Thu, 12 Apr 2018 12:36:58 -0700 (PDT) X-Google-Smtp-Source: AIpwx49JR217xi7naCsJoym/DYb3kzPoiQtQC29w6hmlPjpU8uHCjBM2AVeWsaphqwrOGho/Dz6u X-Received: by 2002:a17:902:6bc3:: with SMTP id m3-v6mr2312818plt.363.1523561818079; Thu, 12 Apr 2018 12:36:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523561818; cv=none; d=google.com; s=arc-20160816; b=ajxycZBVDPyUexTRnxST1XX6jljyqfPZ9lhSGaBY378rjB5tnR8pNbyId0w10a9LFw Z8USrPbeTjRrvltLWemqRQT4D12ZLS+pGJmJJ9mtopRMQcP0U0ssWfxQvB5RpsGPR4zd 3NLNtwpjFpF0o2RpDj0TlH/SFHyMQrAgG7Cq7R/PSf1HzPvs+khE86SV3+wQ8pInCngt SgJsRxbwQy3WtBkz4FNmYBX4e/nGnJtVN3r+Aqd3N7nXriksinj+7JwZbqMUqWoOhb5T iAA7mp/RUA5AJRibA8uaPKE8+jR+evwOyQgOQigTichcGRH8wTX7JirNYWKBX9nn+FGk S9dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=HvJkAZsfkj4saSoMI9f3QV8CwG4ES/ilS/cT7FVq7Bc=; b=bAj4vxovVvCT6o3U0Vz3vjrf1VD/C2LiWCAh83lYPoMKxC2eUSXHG1YKKUdP6OkEq8 KPCJML2JkpqoYN8rdNj8lyWkISdWRgWr6DR350iTffOYFZusWYkxIVNBfq+831vq64vI lRFEmCSNHTmkRglTfld2eZAvqPNc21Gswb64o6aEM6zOXbbEXiBvz36/rd01Sg/QYyD+ RZjSwxNNX180p7MTdY9GnWIHENA4i2I4mlevH6mC2He3HEmcmd9qRV2tOhivwriiz8bQ HcnyUE9tzQ2bPGwXGirQQ05kXUXa4zvYWfJKriiuIjKkY3qaRvJRixQ68Afft7tzkdzr R7FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=bYYaOq9+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b73si2611580pga.788.2018.04.12.12.36.43; Thu, 12 Apr 2018 12:36:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=bYYaOq9+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754085AbeDLTdt (ORCPT + 99 others); Thu, 12 Apr 2018 15:33:49 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:54144 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753923AbeDLTdq (ORCPT ); Thu, 12 Apr 2018 15:33:46 -0400 Received: by mail-wm0-f65.google.com with SMTP id 66so468587wmd.3 for ; Thu, 12 Apr 2018 12:33:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HvJkAZsfkj4saSoMI9f3QV8CwG4ES/ilS/cT7FVq7Bc=; b=bYYaOq9+c1YdRpnFuMgsN6+VcwKJtWgxJfyoux37oe2e671JJs6HBuV10aGpPPH1BC dHcv+g6DN/juPkSIel3+Ohv8JkXKQu31e+o8Vq/TVbH+RPXzbin2BEglgc17Ew28ciX/ 0kuYP5zZR96Pa8S7uTeOmops8ZdP/CmoPRkTLksy1Vm8bdEW92KvL6ar5Xiv4zdv4P9P dg+4fH9Y0B7+wtyHqr0UHZ8zWYlkqOU18CJNr8nM5WQ25cO9MJwjk08JqL2D5ps2prih i85eZb0uQpf3gn914btFnEdlcVmWWW1xwmTFduQbQdzCXYb3LQ02R+bLR1au63NsDxD/ BW/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=HvJkAZsfkj4saSoMI9f3QV8CwG4ES/ilS/cT7FVq7Bc=; b=ITy4ZU6R+l57eFnBRaM+MuM2sMm7q0U998c6QepNzqEdTDwcOf9uoWZY3c910YRPZx MRT+Yb0kcZWHAxwi82MEQB7V+6nXZ8nwVUae1eA+GIPHjwBqQrNCGsqTG3oWdfnSOHK5 fBF6QWEsRRyU4gSZCUK8bufIdMAmbe3hYpZSTU69nNKT1Qx7oN1AkZd53LtjF7vo4lGk n/IIzBHUeUVxnhSW1rzuJNatfL5Jc/sgX6YXPbMzaD7ZQvgszoAVa4TLvs2pOg8NzkCv w0x4P8rX7BEptSoWd3/apfxdMfM8OAzILTemu2X6maWuAo/6D1XoFRlm0ehirnwG9dhn LSBA== X-Gm-Message-State: ALQs6tD1oX4QLn9CV4IycmSPv5tJml4cWeGdRRax9cP/P6xyKBk10EB/ hidgqFH2pMx8XVTDXTfH5CwYTn4R X-Received: by 10.28.114.15 with SMTP id n15mr1740606wmc.88.1523561624829; Thu, 12 Apr 2018 12:33:44 -0700 (PDT) Received: from macbookpro.malat.net (bru31-1-78-225-226-121.fbx.proxad.net. [78.225.226.121]) by smtp.gmail.com with ESMTPSA id q138sm174436wmd.1.2018.04.12.12.33.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Apr 2018 12:33:44 -0700 (PDT) Received: by macbookpro.malat.net (Postfix, from userid 1000) id 2494610C03DF; Thu, 12 Apr 2018 21:33:43 +0200 (CEST) From: Mathieu Malaterre To: Alex Deucher Cc: Mathieu Malaterre , =?UTF-8?q?Christian=20K=C3=B6nig?= , "David (ChunMing) Zhou" , David Airlie , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/radeon: change function signature to pass full range Date: Thu, 12 Apr 2018 21:33:33 +0200 Message-Id: <20180412193333.4951-1-malat@debian.org> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In function ‘radeon_process_i2c_ch’ a comparison of a u8 value against 255 is done. Since it is always false, change the signature of this function to use an `int` instead, which match the type used in caller: `radeon_atom_hw_i2c_xfer`. Fix the following warning triggered with W=1: CC [M] drivers/gpu/drm/radeon/atombios_i2c.o drivers/gpu/drm/radeon/atombios_i2c.c: In function ‘radeon_process_i2c_ch’: drivers/gpu/drm/radeon/atombios_i2c.c:71:11: warning: comparison is always false due to limited range of data type [-Wtype-limits] if (num > ATOM_MAX_HW_I2C_READ) { ^ Signed-off-by: Mathieu Malaterre --- drivers/gpu/drm/radeon/atombios_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/atombios_i2c.c b/drivers/gpu/drm/radeon/atombios_i2c.c index 4157780585a0..9022e9af11a0 100644 --- a/drivers/gpu/drm/radeon/atombios_i2c.c +++ b/drivers/gpu/drm/radeon/atombios_i2c.c @@ -35,7 +35,7 @@ static int radeon_process_i2c_ch(struct radeon_i2c_chan *chan, u8 slave_addr, u8 flags, - u8 *buf, u8 num) + u8 *buf, int num) { struct drm_device *dev = chan->dev; struct radeon_device *rdev = dev->dev_private; -- 2.11.0