lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202501191043.a0w9KqJ6-lkp@intel.com>
Date: Sun, 19 Jan 2025 11:10:57 +0800
From: kernel test robot <lkp@...el.com>
To: Pengyu Luo <mitltlatltl@...il.com>, Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Bjorn Andersson <andersson@...nel.org>,
	Konrad Dybcio <konradybcio@...nel.org>,
	Hans de Goede <hdegoede@...hat.com>,
	Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
	Bryan O'Donoghue <bryan.odonoghue@...aro.org>,
	Jean Delvare <jdelvare@...e.com>,
	Guenter Roeck <linux@...ck-us.net>
Cc: oe-kbuild-all@...ts.linux.dev, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
	platform-driver-x86@...r.kernel.org, linux-hwmon@...r.kernel.org,
	Pengyu Luo <mitltlatltl@...il.com>
Subject: Re: [PATCH v5 2/3] platform: arm64: add Huawei Matebook E Go EC
 driver

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@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 14.2.0
reproduce: (https://download.01.org/0day-ci/archive/20250119/202501191043.a0w9KqJ6-lkp@intel.com/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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501191043.a0w9KqJ6-lkp@intel.com/

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ