Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp4495100imb; Wed, 6 Mar 2019 15:05:10 -0800 (PST) X-Google-Smtp-Source: APXvYqz2qzNRQHULRJVYf4uqaXT55dGfZbQDKEd/4MFaSmIBlbNrRdKfjzJndCPzEMN2p+A3sKnV X-Received: by 2002:a63:fe58:: with SMTP id x24mr8549232pgj.255.1551913510061; Wed, 06 Mar 2019 15:05:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551913510; cv=none; d=google.com; s=arc-20160816; b=d8RF61Tf/t64fGnCZtcfxzWbfwkh6xd5MDwDJQXuM+s/UNhosjMquJvD3U1+/fMqrv S2U/f4TmcGQMA65BOeN6+ZtCE2H67DDB87A2FTjJE8O0ILXzSlqwrKStMkotaDIFyMEY p2+eALX0w8D8+XE6lH2tp9yU/VuXOxNHnPj+e4ZsKgmz+xJUEVqAIisG+dTO19BtRJq4 rew2XYJjfRarHvXEKZA77VLnRMk3y0cvb+Xw7K7ZN1JrevuYVs85PILadHJc7M9TBP9R BOijQr0bYpBS3Mu5uB0NrNco8LK+HVvYaCZgKGCEjh74n6NbaE05BGbzw8ng0saMCdeH WZtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=umWL5bo6d0jPWuDEmKqk7PAQdrtoKV2HYQaMhOhV1Rs=; b=prOmH6fI5XGCNd3tPfjZQSWfH+ia5Y7p5kvWkBO2QppG0rV+HpKUIKxKFwT8j6DShf wEZfwtws5yDBrkE5+KjiZuniblp/Ap1nRWtlJuJ7vrZQsklMQnvyVzcoCwkModBtk4FR ljuk1wV3Bs7hiSLzpcVfJEUfNtDvVgROm3FyizM0U4tZldRhPLY48MxeNQUkt/5cIapQ XILP2Fvn3+39ENuT9152VaFwwDUPT2Xb1BycosZyJRwSk2zR8nkJ1Fn1HScRJIUS+mWi 48p1X7aMYQprW//T65YvRWUDahtyjavcSHOyRjDNviqzPA4Mh62lbSpkTST3IGAkDexk kK6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=SC2dKtvX; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31si2718775pld.6.2019.03.06.15.04.52; Wed, 06 Mar 2019 15:05:10 -0800 (PST) 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=pass header.i=@synopsys.com header.s=mail header.b=SC2dKtvX; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726111AbfCFXEA (ORCPT + 99 others); Wed, 6 Mar 2019 18:04:00 -0500 Received: from us01smtprelay-2.synopsys.com ([198.182.60.111]:52446 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725790AbfCFXD7 (ORCPT ); Wed, 6 Mar 2019 18:03:59 -0500 Received: from mailhost1.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id 7A02F10C219C; Wed, 6 Mar 2019 15:03:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1551913439; bh=2dOsSpPrJjbl70kbZdlzeiIVCGoQmcGSgFFktrvm96o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SC2dKtvXh3uj7gF15oDUORFU+or7MyYOO2DMKysfIW5s+VY9DXJswkgUjgUY18bva YS09ucuPQlbqygPMRynbAKkggXc5S/q/9VG5+9qppVs2sJVYeZ7I7/+aK87PSimxg2 2Ab8TOLpiknxzd8NFh64mKNjwdmd2sEMOcUCrx6LeJ0r26n5a+ruO5A2m2QlbpJZeu nmWAS58CC0rwIh9JifZNrdyIY8871giAhGSlmPGyjdvNyQhTx8CwuYkv++Y4rcv0xo +VoZ0LiavQ8u2yIpwNg88LXm4hPrUK2BMs4du5DNPXbCX4G3WPPBT98cJQevhXT4cz OofOCydlOL+Aw== Received: from de02dwia024.internal.synopsys.com (de02dwia024.internal.synopsys.com [10.225.19.81]) by mailhost1.synopsys.com (Postfix) with ESMTP id 28DB555BB; Wed, 6 Mar 2019 15:03:57 -0800 (PST) From: Vitor Soares To: bbrezillon@kernel.org Cc: linux-i3c@lists.infradead.org, joao.pinto@synopsys.com, linux-kernel@vger.kernel.org, Vitor Soares Subject: [PATCH 3/7] i3c: master: dw: remove dead code from dw_i3c_master_*_xfers() Date: Thu, 7 Mar 2019 00:03:55 +0100 Message-Id: <6dcb0e17851cfb6913dda388d0960e0d1f15f853.1550587318.git.vitor.soares@synopsys.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <01dfc316793360cb601922caefe23153ca2db194.1550587318.git.vitor.soares@synopsys.com> References: <01dfc316793360cb601922caefe23153ca2db194.1550587318.git.vitor.soares@synopsys.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Detected by CoverityScan (Event result_independent_of_operands): "(i3c_xfers + i).len > 65536" is always false regardless of the values of its operands. This occurs as the logical operand of "if" "(i2c_xfers + i).len > 65536" is always false regardless of the values of its operands. This occurs as the logical operand of "if" Signed-off-by: Vitor Soares --- drivers/i3c/master/dw-i3c-master.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c index bb03079..eef6fae 100644 --- a/drivers/i3c/master/dw-i3c-master.c +++ b/drivers/i3c/master/dw-i3c-master.c @@ -840,11 +840,6 @@ static int dw_i3c_master_priv_xfers(struct i3c_dev_desc *dev, return -ENOTSUPP; for (i = 0; i < i3c_nxfers; i++) { - if (i3c_xfers[i].len > COMMAND_PORT_ARG_DATA_LEN_MAX) - return -ENOTSUPP; - } - - for (i = 0; i < i3c_nxfers; i++) { if (i3c_xfers[i].rnw) nrxwords += DIV_ROUND_UP(i3c_xfers[i].len, 4); else @@ -973,11 +968,6 @@ static int dw_i3c_master_i2c_xfers(struct i2c_dev_desc *dev, return -ENOTSUPP; for (i = 0; i < i2c_nxfers; i++) { - if (i2c_xfers[i].len > COMMAND_PORT_ARG_DATA_LEN_MAX) - return -ENOTSUPP; - } - - for (i = 0; i < i2c_nxfers; i++) { if (i2c_xfers[i].flags & I2C_M_RD) nrxwords += DIV_ROUND_UP(i2c_xfers[i].len, 4); else -- 2.7.4