linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Chunyan Zhang <zhang.lyra@gmail.com>,
	Wolfram Sang <wsa-dev@sang-engineering.com>,
	Baolin Wang <baolin.wang7@gmail.com>,
	Orson Zhai <orsonzhai@gmail.com>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	Chunyan Zhang <zhang.lyra@gmail.com>,
	Linhua Xu <linhua.xu@unisoc.com>
Subject: Re: [PATCH] i2c: sprd: use a specific timeout to avoid system hang up issue
Date: Sat, 12 Dec 2020 00:46:54 +0800	[thread overview]
Message-ID: <202012120047.wDbENz5Y-lkp@intel.com> (raw)
In-Reply-To: <20201211102248.1018374-1-zhang.lyra@gmail.com>

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

Hi Chunyan,

I love your patch! Yet something to improve:

[auto build test ERROR on wsa/i2c/for-next]
[also build test ERROR on v5.10-rc7 next-20201211]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Chunyan-Zhang/i2c-sprd-use-a-specific-timeout-to-avoid-system-hang-up-issue/20201211-182817
base:   https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
config: arm-randconfig-r012-20201210 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 5ff35356f1af2bb92785b38c657463924d9ec386)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://github.com/0day-ci/linux/commit/725c61cfaa18f63c1fbc7f4a25a04a72c4fbda48
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Chunyan-Zhang/i2c-sprd-use-a-specific-timeout-to-avoid-system-hang-up-issue/20201211-182817
        git checkout 725c61cfaa18f63c1fbc7f4a25a04a72c4fbda48
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 

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

All errors (new ones prefixed by >>):

>> drivers/i2c/busses/i2c-sprd.c:249:43: error: use of undeclared identifier 'I2C_XFER_TIMEOUT'
           unsigned long timeout = msecs_to_jiffies(I2C_XFER_TIMEOUT);
                                                    ^
   1 error generated.

vim +/I2C_XFER_TIMEOUT +249 drivers/i2c/busses/i2c-sprd.c

   244	
   245	static int sprd_i2c_handle_msg(struct i2c_adapter *i2c_adap,
   246				       struct i2c_msg *msg, bool is_last_msg)
   247	{
   248		struct sprd_i2c *i2c_dev = i2c_adap->algo_data;
 > 249		unsigned long timeout = msecs_to_jiffies(I2C_XFER_TIMEOUT);
   250	
   251		i2c_dev->msg = msg;
   252		i2c_dev->buf = msg->buf;
   253		i2c_dev->count = msg->len;
   254	
   255		reinit_completion(&i2c_dev->complete);
   256		sprd_i2c_reset_fifo(i2c_dev);
   257		sprd_i2c_set_devaddr(i2c_dev, msg);
   258		sprd_i2c_set_count(i2c_dev, msg->len);
   259	
   260		if (msg->flags & I2C_M_RD) {
   261			sprd_i2c_opt_mode(i2c_dev, 1);
   262			sprd_i2c_send_stop(i2c_dev, 1);
   263		} else {
   264			sprd_i2c_opt_mode(i2c_dev, 0);
   265			sprd_i2c_send_stop(i2c_dev, !!is_last_msg);
   266		}
   267	
   268		/*
   269		 * We should enable rx fifo full interrupt to get data when receiving
   270		 * full data.
   271		 */
   272		if (msg->flags & I2C_M_RD)
   273			sprd_i2c_set_fifo_full_int(i2c_dev, 1);
   274		else
   275			sprd_i2c_data_transfer(i2c_dev);
   276	
   277		sprd_i2c_opt_start(i2c_dev);
   278	
   279		timeout = wait_for_completion_timeout(&i2c_dev->complete, timeout);
   280		if (!timeout)
   281			return -EIO;
   282	
   283		return i2c_dev->err;
   284	}
   285	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31402 bytes --]

      parent reply	other threads:[~2020-12-11 17:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-11 10:22 [PATCH] i2c: sprd: use a specific timeout to avoid system hang up issue Chunyan Zhang
2020-12-11 14:53 ` Wolfram Sang
2020-12-11 15:42 ` kernel test robot
2020-12-11 16:46 ` kernel test robot [this message]

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=202012120047.wDbENz5Y-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=baolin.wang7@gmail.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linhua.xu@unisoc.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=orsonzhai@gmail.com \
    --cc=wsa-dev@sang-engineering.com \
    --cc=zhang.lyra@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).