Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp45207imu; Wed, 7 Nov 2018 12:42:57 -0800 (PST) X-Google-Smtp-Source: AJdET5cZRWVWxOsEe9V84KHiO8UrdgQHyxveQME+MDigVBwBSiTc25T4Ny7JZ1sDWLufbos3gndd X-Received: by 2002:a63:608f:: with SMTP id u137mr1497621pgb.203.1541623377846; Wed, 07 Nov 2018 12:42:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541623377; cv=none; d=google.com; s=arc-20160816; b=Vjwl1nbDUShKR3DqbRFZgn3o7mwMna38p5Jdkwo+pETPRKTQh10bkBwAb9qmkSecpz 1w0sZ5ZHQEA8uCYxFzdIU6rGVxOASvdmW6xCUOpi9TsrVDk/FlQTeK4UGa+VnUfEeFDI WyxVHbQ+PQa++xNpVjBjEbIhqmcFobQxkd8J9rRJ82UOWnnyGegvyAPWOv1AX7xarvPY ZeZ1iwb+lskuB/AJkNlDlFiOgAIiQeLhTRJDkIH/bEggDDdrU43WkugJu5OeEz8TPWlh szPmkhScAMzPjtzGmXBjqFv6AJN54PW30VbSr7lizO4AWW1LRO2DK+FKtM8RNfHmFqTs XtCw== 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; bh=qMzvHrdBW9qBcYt9FMJp4MkBwXEuMNza9FXlX6fOKZ0=; b=kB6Qf8M+t0vp2GmuQ4ZrLjIumVkjUhszMbiWfm9ny0pQeaPVnSyTiFKTobrM45g2Of vZKW+y91HTjohiy+kknGbnfE843RmJAmNd7KCwzdfmovsLvKsNZshg6WGANwjc8MDjvo oaVY36wC0ARWQwC46nVIJqrZPTwygXfi7266FvaabpyW/ltKUvKZy9wMJ2NCrrywJyX5 Q+PTOzqGdXZ8sSJZAias/ZIK6Ppxa/fQW6f5LuMBq8/8stc1YXr4Ga80ueGFJAR3Jp4N HwfCTpcrsOSU22G5KiZlNkv465jhSn5kyycv9GvZGYb3U3Nnj+XMiGm4OT3wYvsvl9Kv 33mQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b22-v6si1850353pff.192.2018.11.07.12.42.42; Wed, 07 Nov 2018 12:42:57 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726927AbeKHGOO (ORCPT + 99 others); Thu, 8 Nov 2018 01:14:14 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:42402 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726517AbeKHGON (ORCPT ); Thu, 8 Nov 2018 01:14:13 -0500 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1gKUeP-0000GJ-91; Wed, 07 Nov 2018 20:42:09 +0000 From: Colin King To: Boris Brezillon , linux-i3c@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH][i3c-next] i3c: fix incorrect update to max_read_ds Date: Wed, 7 Nov 2018 20:42:08 +0000 Message-Id: <20181107204208.7411-1-colin.king@canonical.com> X-Mailer: git-send-email 2.19.1 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 From: Colin Ian King Currently max_read_ds is being updated twice, which is incorrect. The second assignment should be to max_write_ds instead. Fix this. Detected by CoverityScan, CID#1475379 ("Unused value") Fixes: 50cacdabeae1 ("i3c: Add core I3C infrastructure") Signed-off-by: Colin Ian King --- drivers/i3c/master.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c index 68d6553dbd75..0ea7bb045fad 100644 --- a/drivers/i3c/master.c +++ b/drivers/i3c/master.c @@ -1093,7 +1093,7 @@ static int i3c_master_getmxds_locked(struct i3c_master_controller *master, } info->max_read_ds = getmaxds->maxrd; - info->max_read_ds = getmaxds->maxwr; + info->max_write_ds = getmaxds->maxwr; if (dest.payload.len == 5) info->max_read_turnaround = getmaxds->maxrdturn[0] | ((u32)getmaxds->maxrdturn[1] << 8) | -- 2.19.1