Received: by 10.223.176.5 with SMTP id f5csp138103wra; Thu, 8 Feb 2018 18:18:00 -0800 (PST) X-Google-Smtp-Source: AH8x2264oOZczEoB9VnOLTuCJTg2+J6dajaLv/M9eGydEp2wDJC/P/N/RKXb5nFnND2a8Rt4dJIu X-Received: by 10.99.155.9 with SMTP id r9mr1008007pgd.333.1518142680519; Thu, 08 Feb 2018 18:18:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518142680; cv=none; d=google.com; s=arc-20160816; b=vV/Jfv2jZ/LQRQOB+cOuJfEIH5fmtpnDdSDDTivFV5NJlg3HodZQUGBGpHb5n/liGm XzknoTFL35APms47MeK1HxnQchPfg7Ng57K5XQm4J3iQnWxS/clSC2prWw7ieJA1uEB2 n6feVybjgMhC4/G00qOe1+xTCysr0T1vptr4TYH6nsN+D4PGZKtY6tk75+uoqEfgQXaH m8LbggXo5/TZ8iXEiz5iZ3ubbQ30b3qwOc5gpdY/cY87A1jObjpDxFF+EKIHEeJYn6JV L2zvY855fp1/ztL4QtezjtC/198r9ldaG/7yqNamDq/lBTCoJf6QgfvqoEqqz939Becx f4iQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature:dkim-signature:arc-authentication-results; bh=RiZ7XPnDZrcXZOgZKjlK4fELgW3I/+DMue5XjskNJZ4=; b=LqsZ3FdemWC9mHpKOvGuNod734m2phKNvPhlLHsCpes2w3uuWZrMQT3vtiWbaVXB4d cL4bbv6r2wLzqUoe+ZYvyAQ3MY2gCPIjr9IZcvvRPmVLkLFnUofObtxmxO7tef17EL5r 9ZYRzrf4nMX55zlkQtWjvM3TSssR20ooXvsLW/o1P1JY16EWg5FOnayduSwHWyXrOmVz J4Fiaeb0kfg56JD573aizwLSzKPF3SbtJQJ50EBOuF+QHuJ+d7lORIDC5rZ0KInJmH0h ZCm9cDFnBjvGAhxxVxCZ7ETW6NMXnMZ20AmDZv7QDbYabiHMKw3092Ovi9AQHRGPwXks 4Vzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=b2V7N8Hb; dkim=pass header.i=@codeaurora.org header.s=default header.b=Hy6AfJ0a; 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 28si922935pfl.53.2018.02.08.18.17.45; Thu, 08 Feb 2018 18:18:00 -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=@codeaurora.org header.s=default header.b=b2V7N8Hb; dkim=pass header.i=@codeaurora.org header.s=default header.b=Hy6AfJ0a; 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 S1752337AbeBICQU (ORCPT + 99 others); Thu, 8 Feb 2018 21:16:20 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:39784 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752056AbeBICQS (ORCPT ); Thu, 8 Feb 2018 21:16:18 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 124D060272; Fri, 9 Feb 2018 02:16:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1518142578; bh=jKBXvIuBxDZb4l6q0CEat7W6PhcXqgAJ596E3dMw/Sw=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=b2V7N8Hb85woPNfiKYJkfSa1/KAsKiKqeUyc53/22SWNUnr0M9FqJ2Ythl53fpVFC ivKqAFD7V/yuTGg3ZsjgSLCJ2oTLuBGsnWGcjZl5gncZkrWSeZZkgDCtXfN1teHyIf gQZ+yv4V2wOeYPkSn3wf81DZ15P/WrqNn0aIVMoE= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from [192.168.1.2] (unknown [171.60.224.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sricharan@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id F18D260272; Fri, 9 Feb 2018 02:16:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1518142577; bh=jKBXvIuBxDZb4l6q0CEat7W6PhcXqgAJ596E3dMw/Sw=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=Hy6AfJ0aAaV+MfB000/OuFV3SNL5sTV48n3WItD6xa6tbh+dtcCJlG01pX1iguqvw wyymwTEknT5Z91O5880RGPRFdqbX1PXUvcBoP9JjlLpaaxGCemcasWuUX0/+zFscXn Q1PyplShf95Etuv0GF5kLBCm+M7EQLJrdc/xtHa0= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org F18D260272 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sricharan@codeaurora.org Subject: Re: [PATCH 03/12] i2c: qup: remove redundant variables for BAM SG count To: Abhishek Sahu , Andy Gross , Wolfram Sang Cc: David Brown , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org References: <1517644697-30806-1-git-send-email-absahu@codeaurora.org> <1517644697-30806-4-git-send-email-absahu@codeaurora.org> From: Sricharan R Message-ID: Date: Fri, 9 Feb 2018 07:46:10 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1517644697-30806-4-git-send-email-absahu@codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Abhishek, On 2/3/2018 1:28 PM, Abhishek Sahu wrote: > The rx_nents and tx_nents are redundant. rx_buf and tx_buf can > be used for total number of SG entries. > > Signed-off-by: Abhishek Sahu > --- > drivers/i2c/busses/i2c-qup.c | 26 ++++++++++---------------- > 1 file changed, 10 insertions(+), 16 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c > index c68f433..bb83a2967 100644 > --- a/drivers/i2c/busses/i2c-qup.c > +++ b/drivers/i2c/busses/i2c-qup.c > @@ -692,7 +692,7 @@ static int qup_i2c_bam_do_xfer(struct qup_i2c_dev *qup, struct i2c_msg *msg, > struct dma_async_tx_descriptor *txd, *rxd = NULL; > int ret = 0, idx = 0, limit = QUP_READ_LIMIT; > dma_cookie_t cookie_rx, cookie_tx; > - u32 rx_nents = 0, tx_nents = 0, len, blocks, rem; > + u32 len, blocks, rem; > u32 i, tlen, tx_len, tx_buf = 0, rx_buf = 0, off = 0; > u8 *tags; > This is correct. Just a nit, may be rx/tx_buf can be changed to rx/tx_count to make it more clear. Regards, Sricharan -- "QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation