Re: [PATCH v5 2/3] platform: arm64: add Huawei Matebook E Go EC driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Pengyu,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 0907e7fb35756464aa34c35d6abb02998418164b]

url:    https://github.com/intel-lab-lkp/linux/commits/Pengyu-Luo/dt-bindings-platform-Add-Huawei-Matebook-E-Go-EC/20250117-220936
base:   0907e7fb35756464aa34c35d6abb02998418164b
patch link:    https://lore.kernel.org/r/20250117140348.180681-3-mitltlatltl%40gmail.com
patch subject: [PATCH v5 2/3] platform: arm64: add Huawei Matebook E Go EC driver
config: powerpc64-randconfig-r121-20250119 (https://download.01.org/0day-ci/archive/20250119/202501191043.a0w9KqJ6-lkp@xxxxxxxxx/config)
compiler: powerpc64-linux-gcc (GCC) 14.2.0
reproduce: (https://download.01.org/0day-ci/archive/20250119/202501191043.a0w9KqJ6-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501191043.a0w9KqJ6-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> drivers/platform/arm64/huawei-gaokun-ec.c:134:32: sparse: sparse: incorrect type in initializer (different modifiers) @@     expected unsigned char [usertype] *buf @@     got unsigned char const [usertype] *req @@
   drivers/platform/arm64/huawei-gaokun-ec.c:134:32: sparse:     expected unsigned char [usertype] *buf
   drivers/platform/arm64/huawei-gaokun-ec.c:134:32: sparse:     got unsigned char const [usertype] *req
>> drivers/platform/arm64/huawei-gaokun-ec.c:113:20: sparse: sparse: incorrect type in return expression (different modifiers) @@     expected void * @@     got unsigned char const [usertype] * @@
   drivers/platform/arm64/huawei-gaokun-ec.c:113:20: sparse:     expected void *
   drivers/platform/arm64/huawei-gaokun-ec.c:113:20: sparse:     got unsigned char const [usertype] *

vim +134 drivers/platform/arm64/huawei-gaokun-ec.c

   110	
   111	static inline void *extr_resp_shallow(const u8 *src)
   112	{
 > 113		return src + RESP_HDR_SIZE;
   114	}
   115	
   116	struct gaokun_ec {
   117		struct i2c_client *client;
   118		struct mutex lock; /* EC transaction lock */
   119		struct blocking_notifier_head notifier_list;
   120		struct device *hwmon_dev;
   121		struct input_dev *idev;
   122		bool suspended;
   123	};
   124	
   125	static int gaokun_ec_request(struct gaokun_ec *ec, const u8 *req,
   126				     size_t resp_len, u8 *resp)
   127	{
   128		struct i2c_client *client = ec->client;
   129		struct i2c_msg msgs[] = {
   130			{
   131				.addr = client->addr,
   132				.flags = client->flags,
   133				.len = REQ_LEN(req),
 > 134				.buf = req,
   135			}, {
   136				.addr = client->addr,
   137				.flags = client->flags | I2C_M_RD,
   138				.len = resp_len,
   139				.buf = resp,
   140			},
   141		};
   142		int ret;
   143	
   144		guard(mutex)(&ec->lock);
   145		ret = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs));
   146		if (ret != ARRAY_SIZE(msgs)) {
   147			dev_err(&client->dev, "I2C transfer error %d\n", ret);
   148			goto out_after_break;
   149		}
   150	
   151		ret = *resp;
   152		if (ret)
   153			dev_err(&client->dev, "EC transaction error %d\n", ret);
   154	
   155	out_after_break:
   156		usleep_range(2000, 2500); /* have a break, ACPI did this */
   157	
   158		return ret;
   159	}
   160	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux