All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/bus/mhi/core/boot.c:222:3: warning: Variable 'i' is modified but its new value is never used.
Date: Tue, 27 Oct 2020 10:21:08 +0800	[thread overview]
Message-ID: <202010271003.lDZDlsUc-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3221 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
CC: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
CC: Sujeev Dias <sdias@codeaurora.org>
CC: Siddartha Mohanadoss <smohanad@codeaurora.org>
CC: Jeffrey Hugo <jhugo@codeaurora.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   4525c8781ec0701ce824e8bd379ae1b129e26568
commit: cd457afb16670501f00354eb0e705a7d8a50d79d bus: mhi: core: Add support for downloading firmware over BHIe
date:   7 months ago
:::::: branch date: 4 hours ago
:::::: commit date: 7 months ago
compiler: powerpc64le-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> drivers/bus/mhi/core/boot.c:222:3: warning: Variable 'i' is modified but its new value is never used. [unreadVariable]
     i++;
     ^

vim +/i +222 drivers/bus/mhi/core/boot.c

cd457afb166705 Manivannan Sadhasivam 2020-02-20  202  
cd457afb166705 Manivannan Sadhasivam 2020-02-20  203  static void mhi_firmware_copy(struct mhi_controller *mhi_cntrl,
cd457afb166705 Manivannan Sadhasivam 2020-02-20  204  			      const struct firmware *firmware,
cd457afb166705 Manivannan Sadhasivam 2020-02-20  205  			      struct image_info *img_info)
cd457afb166705 Manivannan Sadhasivam 2020-02-20  206  {
cd457afb166705 Manivannan Sadhasivam 2020-02-20  207  	size_t remainder = firmware->size;
cd457afb166705 Manivannan Sadhasivam 2020-02-20  208  	size_t to_cpy;
cd457afb166705 Manivannan Sadhasivam 2020-02-20  209  	const u8 *buf = firmware->data;
cd457afb166705 Manivannan Sadhasivam 2020-02-20  210  	int i = 0;
cd457afb166705 Manivannan Sadhasivam 2020-02-20  211  	struct mhi_buf *mhi_buf = img_info->mhi_buf;
cd457afb166705 Manivannan Sadhasivam 2020-02-20  212  	struct bhi_vec_entry *bhi_vec = img_info->bhi_vec;
cd457afb166705 Manivannan Sadhasivam 2020-02-20  213  
cd457afb166705 Manivannan Sadhasivam 2020-02-20  214  	while (remainder) {
cd457afb166705 Manivannan Sadhasivam 2020-02-20  215  		to_cpy = min(remainder, mhi_buf->len);
cd457afb166705 Manivannan Sadhasivam 2020-02-20  216  		memcpy(mhi_buf->buf, buf, to_cpy);
cd457afb166705 Manivannan Sadhasivam 2020-02-20  217  		bhi_vec->dma_addr = mhi_buf->dma_addr;
cd457afb166705 Manivannan Sadhasivam 2020-02-20  218  		bhi_vec->size = to_cpy;
cd457afb166705 Manivannan Sadhasivam 2020-02-20  219  
cd457afb166705 Manivannan Sadhasivam 2020-02-20  220  		buf += to_cpy;
cd457afb166705 Manivannan Sadhasivam 2020-02-20  221  		remainder -= to_cpy;
cd457afb166705 Manivannan Sadhasivam 2020-02-20 @222  		i++;
cd457afb166705 Manivannan Sadhasivam 2020-02-20  223  		bhi_vec++;
cd457afb166705 Manivannan Sadhasivam 2020-02-20  224  		mhi_buf++;
cd457afb166705 Manivannan Sadhasivam 2020-02-20  225  	}
cd457afb166705 Manivannan Sadhasivam 2020-02-20  226  }
cd457afb166705 Manivannan Sadhasivam 2020-02-20  227  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

             reply	other threads:[~2020-10-27  2:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-27  2:21 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-10-27  7:02 drivers/bus/mhi/core/boot.c:222:3: warning: Variable 'i' is modified but its new value is never used Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202010271003.lDZDlsUc-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.