linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jie Deng <jie.deng@intel.com>,
	linux-i2c@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, mst@redhat.com, wsa@kernel.org,
	jasowang@redhat.com, wsa+renesas@sang-engineering.com,
	andriy.shevchenko@linux.intel.com, conghui.chen@intel.com,
	arnd@arndb.de
Subject: Re: [PATCH v6] i2c: virtio: add a virtio i2c frontend driver
Date: Thu, 4 Mar 2021 13:40:26 +0800	[thread overview]
Message-ID: <202103041351.SQOxU5YB-lkp@intel.com> (raw)
In-Reply-To: <9a2086f37c0a62069b67c39a3f75941b78a0039c.1614749417.git.jie.deng@intel.com>

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

Hi Jie,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on wsa/i2c/for-next]
[also build test WARNING on vhost/linux-next linux/master linus/master v5.12-rc1 next-20210303]
[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/Jie-Deng/i2c-virtio-add-a-virtio-i2c-frontend-driver/20210304-100543
base:   https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
config: xtensa-randconfig-s031-20210304 (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-245-gacc5c298-dirty
        # https://github.com/0day-ci/linux/commit/bb645653b6d7750a026229726f8d9d0371457ac6
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Jie-Deng/i2c-virtio-add-a-virtio-i2c-frontend-driver/20210304-100543
        git checkout bb645653b6d7750a026229726f8d9d0371457ac6
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=xtensa 

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


"sparse warnings: (new ones prefixed by >>)"
>> drivers/i2c/busses/i2c-virtio.c:78:47: sparse: sparse: invalid assignment: |=
>> drivers/i2c/busses/i2c-virtio.c:78:47: sparse:    left side has type restricted __le32
>> drivers/i2c/busses/i2c-virtio.c:78:47: sparse:    right side has type int

vim +78 drivers/i2c/busses/i2c-virtio.c

    59	
    60	static int virtio_i2c_send_reqs(struct virtqueue *vq,
    61					struct virtio_i2c_req *reqs,
    62					struct i2c_msg *msgs, int nr)
    63	{
    64		struct scatterlist *sgs[3], out_hdr, msg_buf, in_hdr;
    65		int i, outcnt, incnt, err = 0;
    66		u8 *buf;
    67	
    68		for (i = 0; i < nr; i++) {
    69			if (!msgs[i].len)
    70				break;
    71	
    72			/* Only 7-bit mode supported for this moment. For the address format,
    73			 * Please check the Virtio I2C Specification.
    74			 */
    75			reqs[i].out_hdr.addr = cpu_to_le16(msgs[i].addr << 1);
    76	
    77			if (i != nr - 1)
  > 78				reqs[i].out_hdr.flags |= VIRTIO_I2C_FLAGS_FAIL_NEXT;
    79	
    80			outcnt = incnt = 0;
    81			sg_init_one(&out_hdr, &reqs[i].out_hdr, sizeof(reqs[i].out_hdr));
    82			sgs[outcnt++] = &out_hdr;
    83	
    84			buf = kzalloc(msgs[i].len, GFP_KERNEL);
    85			if (!buf)
    86				break;
    87	
    88			reqs[i].buf = buf;
    89			sg_init_one(&msg_buf, reqs[i].buf, msgs[i].len);
    90	
    91			if (msgs[i].flags & I2C_M_RD) {
    92				sgs[outcnt + incnt++] = &msg_buf;
    93			} else {
    94				memcpy(reqs[i].buf, msgs[i].buf, msgs[i].len);
    95				sgs[outcnt++] = &msg_buf;
    96			}
    97	
    98			sg_init_one(&in_hdr, &reqs[i].in_hdr, sizeof(reqs[i].in_hdr));
    99			sgs[outcnt + incnt++] = &in_hdr;
   100	
   101			err = virtqueue_add_sgs(vq, sgs, outcnt, incnt, &reqs[i], GFP_KERNEL);
   102			if (err < 0) {
   103				pr_err("failed to add msg[%d] to virtqueue.\n", i);
   104				kfree(reqs[i].buf);
   105				reqs[i].buf = NULL;
   106				break;
   107			}
   108		}
   109	
   110		return i;
   111	}
   112	

---
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: 23523 bytes --]

  parent reply	other threads:[~2021-03-04  5:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-04  1:59 [PATCH v6] i2c: virtio: add a virtio i2c frontend driver Jie Deng
2021-03-04  5:37 ` kernel test robot
2021-03-04  5:40 ` kernel test robot [this message]
2021-03-04  6:06 ` Viresh Kumar
2021-03-05  1:46   ` Jie Deng
2021-03-05  3:09     ` Viresh Kumar
2021-03-05  7:00       ` Jie Deng
2021-03-05  7:29         ` Viresh Kumar
2021-03-04  6:22 ` kernel test robot
2021-03-04  9:15 ` Jason Wang
2021-03-05  5:47   ` Jie Deng
2021-03-05  7:23     ` Jason Wang
2021-03-05  8:12       ` Jie Deng
2021-03-10  2:22   ` Jie Deng
2021-03-10  3:59     ` Jason Wang
2021-03-10  8:27       ` Arnd Bergmann
2021-03-11  5:59         ` Jie Deng

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=202103041351.SQOxU5YB-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=conghui.chen@intel.com \
    --cc=jasowang@redhat.com \
    --cc=jie.deng@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=wsa@kernel.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 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).