devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
Cc: kbuild-all@01.org, Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, hs@denx.de,
	Zhu Yi <yi.zhu5@cn.bosch.com>,
	Mark Jonas <mark.jonas@de.bosch.com>
Subject: Re: [PATCH v3] Input: add bu21029 touch driver
Date: Mon, 18 Jun 2018 03:19:26 +0800	[thread overview]
Message-ID: <201806180153.010oE5tw%fengguang.wu@intel.com> (raw)
In-Reply-To: <1526048528-3613-1-git-send-email-mark.jonas@de.bosch.com>

Hi Zhu,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on v4.17-rc4]
[also build test WARNING on next-20180615]
[cannot apply to input/next]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Mark-Jonas/Input-add-bu21029-touch-driver/20180512-091305
reproduce:
        # apt-get install sparse
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> drivers/input/touchscreen/bu21029_ts.c:293:13: sparse: restricted __be16 degrades to integer

vim +293 drivers/input/touchscreen/bu21029_ts.c

   262	
   263	static int bu21029_start_chip(struct input_dev *dev)
   264	{
   265		struct bu21029_ts_data *bu21029 = input_get_drvdata(dev);
   266		struct i2c_client *i2c = bu21029->client;
   267		struct {
   268			u8 reg;
   269			u8 value;
   270		} init_table[] = {
   271			{BU21029_CFR0_REG, CFR0_VALUE},
   272			{BU21029_CFR1_REG, CFR1_VALUE},
   273			{BU21029_CFR2_REG, CFR2_VALUE},
   274			{BU21029_CFR3_REG, CFR3_VALUE},
   275			{BU21029_LDO_REG,  LDO_VALUE}
   276		};
   277		int error, i;
   278		u16 hwid;
   279	
   280		/* take chip out of reset */
   281		gpiod_set_value_cansleep(bu21029->reset_gpios, 0);
   282		mdelay(START_DELAY_MS);
   283	
   284		error = i2c_smbus_read_i2c_block_data(i2c,
   285						      BU21029_HWID_REG,
   286						      2,
   287						      (u8 *)&hwid);
   288		if (error < 0) {
   289			dev_err(&i2c->dev, "failed to read HW ID\n");
   290			goto out;
   291		}
   292	
 > 293		if (cpu_to_be16(hwid) != SUPPORTED_HWID) {
   294			dev_err(&i2c->dev, "unsupported HW ID 0x%x\n", hwid);
   295			error = -ENODEV;
   296			goto out;
   297		}
   298	
   299		for (i = 0; i < ARRAY_SIZE(init_table); ++i) {
   300			error = i2c_smbus_write_byte_data(i2c,
   301							  init_table[i].reg,
   302							  init_table[i].value);
   303			if (error < 0) {
   304				dev_err(&i2c->dev,
   305					"failed to write 0x%x to register 0x%x\n",
   306					init_table[i].value,
   307					init_table[i].reg);
   308				goto out;
   309			}
   310		}
   311	
   312		error = i2c_smbus_write_byte(i2c, BU21029_AUTOSCAN);
   313		if (error < 0) {
   314			dev_err(&i2c->dev, "failed to start autoscan\n");
   315			goto out;
   316		}
   317	
   318		enable_irq(bu21029->client->irq);
   319		return 0;
   320	
   321	out:
   322		bu21029_stop_chip(dev);
   323		return error;
   324	}
   325	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

  parent reply	other threads:[~2018-06-17 19:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-21 17:04 [PATCH] Input: add bu21029 touch driver Mark Jonas
2018-03-26 22:24 ` Rob Herring
2018-03-26 22:39   ` Dmitry Torokhov
2018-03-26 22:53 ` Dmitry Torokhov
2018-04-16 16:49 ` [PATCH v2] " Mark Jonas
2018-04-16 21:44   ` Rob Herring
2018-04-26  6:40   ` AW: " Jonas Mark (BT-FIR/ENG1)
2018-05-11 14:22 ` [PATCH v3] " Mark Jonas
2018-05-13 14:56   ` Andy Shevchenko
2018-05-16 13:24     ` AW: " Jonas Mark (BT-FIR/ENG1)
2018-05-16 17:43       ` Dmitry Torokhov
2018-05-17 20:10         ` AW: " Jonas Mark (BT-FIR/ENG1)
2018-06-17 19:19   ` kbuild test robot [this message]
2018-05-16 13:25 ` [PATCH v4] " Mark Jonas
2018-05-17 10:03   ` kbuild test robot
2018-05-17 20:06 ` [PATCH v5] " Mark Jonas
2018-06-18  9:35 [PATCH v3] " Jonas Mark (BT-FIR/ENG1)

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=201806180153.010oE5tw%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hs@denx.de \
    --cc=kbuild-all@01.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.jonas@de.bosch.com \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=yi.zhu5@cn.bosch.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).