Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp901501pxb; Thu, 5 Nov 2020 16:37:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJzUyhhUrZeEelFCckX02naa5+kH7fPRTZ5Be9SjlU88ROYLtm8j5zbIvJODFwN4KqDF3qz2 X-Received: by 2002:a17:906:3541:: with SMTP id s1mr5152641eja.413.1604623050621; Thu, 05 Nov 2020 16:37:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604623050; cv=none; d=google.com; s=arc-20160816; b=YPzu1UQY5Npv0GQJ1DPZGrsw2WhlrXcMvg1myycLIgAOnkq6Z3ZC+3hQ1iI8aMltCU AU4gf4ody1Ylzs732jINdVyC5aVHiGKzr/M2w+B60r05i3m/n+haLrq6WpLSzK90WKGT fUzV2UvVbOsBztLEgbTAHp187z/GlCwYdNChhPM8G0RKKnkC1gMJRwDh1MZ6g8cvh29V 3T0M+zlT9tN6JrfuURatCLoXZJ06YvMhFbs5sn6GeI5Hmdzvf2MrAjFWZPdFrtk0ttZ0 GVJPWC1k9+zQ0W+xvoeLcjGV3T7jXwR+lDUMOQAauAONTVivpw7/sakDrcrh1hbNhvHD MOBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dmarc-filter:sender:dkim-signature; bh=ufZqWwFwEAoXZDzC1GUn/lh8BW2WAqKihGPjVrV6X9E=; b=g81pExqBh9dDln6BOKaBZ278FmkclQJGpylqXllKSNrcMD3rM7Lo+m2xPVWkWMC5ZM Kft7S0ptOQ/M+4eSrs8gyU/v+Lo3JpvCBJv128EsRP0FSMECo6DULHp0YV0hw/g/dKFy SHuiuLb85gL/KF003kJigwL6A9mLC+L78wh0ZlDPAVfgXAvAq1EKimJl/XaIZIzmNcbn WQntwiaL7PsJSVWtLRpHIhMzV+v5ZpYu32yYr9PjFed9yQk2ZgsXZ0c/Sbv/L6RgAtCg 50t7B0aVS0vT1ih/LxQH4s9g5Kcm0f+/AqTCSmo/8O7oZmQo7koSuYlBMjoTOPayIKod b5mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=NWRhMGr8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m2si2271012eja.161.2020.11.05.16.37.07; Thu, 05 Nov 2020 16:37:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=NWRhMGr8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732792AbgKFAfM (ORCPT + 99 others); Thu, 5 Nov 2020 19:35:12 -0500 Received: from m42-4.mailgun.net ([69.72.42.4]:62055 "EHLO m42-4.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732743AbgKFAfL (ORCPT ); Thu, 5 Nov 2020 19:35:11 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1604622910; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=ufZqWwFwEAoXZDzC1GUn/lh8BW2WAqKihGPjVrV6X9E=; b=NWRhMGr8iE7dD6tPsPGNhRHd2UnmvzjkkUFo0SsjYxog9hrML/fHDos1wkxy/yaSRIlQbANP 2dJdb3ssO4MlCqu9x7dtd5loNBGHr5NQu3vquOXRnloJrwACf1NtK21/mfFx8mFcuNIvCrvU 8IO6dQka4IfZrWucNnsGVjP5f/0= X-Mailgun-Sending-Ip: 69.72.42.4 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n05.prod.us-east-1.postgun.com with SMTP id 5fa49a1e7ab6cf2d53bc0edb (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 06 Nov 2020 00:34:38 GMT Sender: bbhatt=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id E279EC433FF; Fri, 6 Nov 2020 00:34:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from malabar-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: bbhatt) by smtp.codeaurora.org (Postfix) with ESMTPSA id 219BBC433C8; Fri, 6 Nov 2020 00:34:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 219BBC433C8 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=bbhatt@codeaurora.org From: Bhaumik Bhatt To: manivannan.sadhasivam@linaro.org Cc: linux-arm-msm@vger.kernel.org, hemantk@codeaurora.org, jhugo@codeaurora.org, linux-kernel@vger.kernel.org, Bhaumik Bhatt Subject: [PATCH v1 1/6] bus: mhi: core: Remove unnecessary counter from mhi_firmware_copy() Date: Thu, 5 Nov 2020 16:34:24 -0800 Message-Id: <1604622869-40212-2-git-send-email-bbhatt@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1604622869-40212-1-git-send-email-bbhatt@codeaurora.org> References: <1604622869-40212-1-git-send-email-bbhatt@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is an extra 'i' counter in the mhi_firmware_copy() function which is unused. Remove it to clean-up code and reduce stack space as well as improve efficiency of the function. Fixes: cd457afb1667 ("bus: mhi: core: Add support for downloading firmware over BHIe") Reported-by: kernel test robot Signed-off-by: Bhaumik Bhatt --- drivers/bus/mhi/core/boot.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/bus/mhi/core/boot.c b/drivers/bus/mhi/core/boot.c index 24422f5..6b6fd96 100644 --- a/drivers/bus/mhi/core/boot.c +++ b/drivers/bus/mhi/core/boot.c @@ -365,7 +365,6 @@ static void mhi_firmware_copy(struct mhi_controller *mhi_cntrl, size_t remainder = firmware->size; size_t to_cpy; const u8 *buf = firmware->data; - int i = 0; struct mhi_buf *mhi_buf = img_info->mhi_buf; struct bhi_vec_entry *bhi_vec = img_info->bhi_vec; @@ -377,7 +376,6 @@ static void mhi_firmware_copy(struct mhi_controller *mhi_cntrl, buf += to_cpy; remainder -= to_cpy; - i++; bhi_vec++; mhi_buf++; } -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project