From: kernel test robot <lkp@intel.com>
To: Zhang Xiaoxu <zhangxiaoxu@huaweicloud.com>,
zhangxiaoxu5@huawei.com, weiyongjun1@huawei.com,
broonie@kernel.org, rostedt@goodmis.org, mingo@redhat.com,
frowand.list@gmail.com, linux-spi@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH v3 -next 4/5] spi: mockup: Add speed and flags attribute support
Date: Sat, 4 Nov 2023 19:10:49 +0800 [thread overview]
Message-ID: <202311041823.CPs0Ymwh-lkp@intel.com> (raw)
In-Reply-To: <20231104064650.972687-5-zhangxiaoxu@huaweicloud.com>
Hi Zhang,
kernel test robot noticed the following build warnings:
[auto build test WARNING on next-20231103]
url: https://github.com/intel-lab-lkp/linux/commits/Zhang-Xiaoxu/spi-mockup-Add-SPI-controller-testing-driver/20231104-144859
base: next-20231103
patch link: https://lore.kernel.org/r/20231104064650.972687-5-zhangxiaoxu%40huaweicloud.com
patch subject: [PATCH v3 -next 4/5] spi: mockup: Add speed and flags attribute support
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20231104/202311041823.CPs0Ymwh-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231104/202311041823.CPs0Ymwh-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311041823.CPs0Ymwh-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/spi/spi-mockup.c:339:1: error: expected ',' or ';' before 'static'
339 | static ssize_t spi_mockup_ ## name ## _store(struct config_item *item, \
| ^~~~~~
drivers/spi/spi-mockup.c:364:1: note: in expansion of macro 'SPI_MOCKUP_ATTR'
364 | SPI_MOCKUP_ATTR(u32, max_speed)
| ^~~~~~~~~~~~~~~
In file included from drivers/spi/spi-mockup.c:15:
drivers/spi/spi-mockup.c:361:18: error: 'spi_mockup_max_speed_store' undeclared here (not in a function); did you mean 'spi_mockup_min_speed_store'?
361 | CONFIGFS_ATTR_WO(spi_mockup_, name) \
| ^~~~~~~~~~~
include/linux/configfs.h:145:27: note: in definition of macro 'CONFIGFS_ATTR_WO'
145 | .store = _pfx##_name##_store, \
| ^~~~
drivers/spi/spi-mockup.c:364:1: note: in expansion of macro 'SPI_MOCKUP_ATTR'
364 | SPI_MOCKUP_ATTR(u32, max_speed)
| ^~~~~~~~~~~~~~~
drivers/spi/spi-mockup.c:339:1: error: expected ',' or ';' before 'static'
339 | static ssize_t spi_mockup_ ## name ## _store(struct config_item *item, \
| ^~~~~~
drivers/spi/spi-mockup.c:365:1: note: in expansion of macro 'SPI_MOCKUP_ATTR'
365 | SPI_MOCKUP_ATTR(u16, flags)
| ^~~~~~~~~~~~~~~
drivers/spi/spi-mockup.c:361:18: error: 'spi_mockup_flags_store' undeclared here (not in a function); did you mean 'spi_mockup_enable_store'?
361 | CONFIGFS_ATTR_WO(spi_mockup_, name) \
| ^~~~~~~~~~~
include/linux/configfs.h:145:27: note: in definition of macro 'CONFIGFS_ATTR_WO'
145 | .store = _pfx##_name##_store, \
| ^~~~
drivers/spi/spi-mockup.c:365:1: note: in expansion of macro 'SPI_MOCKUP_ATTR'
365 | SPI_MOCKUP_ATTR(u16, flags)
| ^~~~~~~~~~~~~~~
drivers/spi/spi-mockup.c:339:1: error: expected ',' or ';' before 'static'
339 | static ssize_t spi_mockup_ ## name ## _store(struct config_item *item, \
| ^~~~~~
drivers/spi/spi-mockup.c:366:1: note: in expansion of macro 'SPI_MOCKUP_ATTR'
366 | SPI_MOCKUP_ATTR(u16, num_cs)
| ^~~~~~~~~~~~~~~
drivers/spi/spi-mockup.c:361:18: error: 'spi_mockup_num_cs_store' undeclared here (not in a function); did you mean 'spi_mockup_enable_store'?
361 | CONFIGFS_ATTR_WO(spi_mockup_, name) \
| ^~~~~~~~~~~
include/linux/configfs.h:145:27: note: in definition of macro 'CONFIGFS_ATTR_WO'
145 | .store = _pfx##_name##_store, \
| ^~~~
drivers/spi/spi-mockup.c:366:1: note: in expansion of macro 'SPI_MOCKUP_ATTR'
366 | SPI_MOCKUP_ATTR(u16, num_cs)
| ^~~~~~~~~~~~~~~
drivers/spi/spi-mockup.c:368:1: error: expected ',' or ';' before 'static'
368 | static struct configfs_attribute *spi_mockup_configfs_attrs[] = {
| ^~~~~~
drivers/spi/spi-mockup.c:380:27: error: 'spi_mockup_configfs_attrs' undeclared here (not in a function); did you mean 'spi_mockup_attrs'?
380 | .ct_attrs = spi_mockup_configfs_attrs,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| spi_mockup_attrs
>> drivers/spi/spi-mockup.c:361:18: warning: 'spi_mockup_attr_num_cs' defined but not used [-Wunused-variable]
361 | CONFIGFS_ATTR_WO(spi_mockup_, name) \
| ^~~~~~~~~~~
include/linux/configfs.h:141:34: note: in definition of macro 'CONFIGFS_ATTR_WO'
141 | static struct configfs_attribute _pfx##attr_##_name = { \
| ^~~~
drivers/spi/spi-mockup.c:366:1: note: in expansion of macro 'SPI_MOCKUP_ATTR'
366 | SPI_MOCKUP_ATTR(u16, num_cs)
| ^~~~~~~~~~~~~~~
>> drivers/spi/spi-mockup.c:361:18: warning: 'spi_mockup_attr_flags' defined but not used [-Wunused-variable]
361 | CONFIGFS_ATTR_WO(spi_mockup_, name) \
| ^~~~~~~~~~~
include/linux/configfs.h:141:34: note: in definition of macro 'CONFIGFS_ATTR_WO'
141 | static struct configfs_attribute _pfx##attr_##_name = { \
| ^~~~
drivers/spi/spi-mockup.c:365:1: note: in expansion of macro 'SPI_MOCKUP_ATTR'
365 | SPI_MOCKUP_ATTR(u16, flags)
| ^~~~~~~~~~~~~~~
>> drivers/spi/spi-mockup.c:361:18: warning: 'spi_mockup_attr_max_speed' defined but not used [-Wunused-variable]
361 | CONFIGFS_ATTR_WO(spi_mockup_, name) \
| ^~~~~~~~~~~
include/linux/configfs.h:141:34: note: in definition of macro 'CONFIGFS_ATTR_WO'
141 | static struct configfs_attribute _pfx##attr_##_name = { \
| ^~~~
drivers/spi/spi-mockup.c:364:1: note: in expansion of macro 'SPI_MOCKUP_ATTR'
364 | SPI_MOCKUP_ATTR(u32, max_speed)
| ^~~~~~~~~~~~~~~
>> drivers/spi/spi-mockup.c:361:18: warning: 'spi_mockup_attr_min_speed' defined but not used [-Wunused-variable]
361 | CONFIGFS_ATTR_WO(spi_mockup_, name) \
| ^~~~~~~~~~~
include/linux/configfs.h:141:34: note: in definition of macro 'CONFIGFS_ATTR_WO'
141 | static struct configfs_attribute _pfx##attr_##_name = { \
| ^~~~
drivers/spi/spi-mockup.c:363:1: note: in expansion of macro 'SPI_MOCKUP_ATTR'
363 | SPI_MOCKUP_ATTR(u32, min_speed)
| ^~~~~~~~~~~~~~~
>> drivers/spi/spi-mockup.c:336:18: warning: 'spi_mockup_attr_disable' defined but not used [-Wunused-variable]
336 | CONFIGFS_ATTR_WO(spi_mockup_, disable);
| ^~~~~~~~~~~
include/linux/configfs.h:141:34: note: in definition of macro 'CONFIGFS_ATTR_WO'
141 | static struct configfs_attribute _pfx##attr_##_name = { \
| ^~~~
>> drivers/spi/spi-mockup.c:316:18: warning: 'spi_mockup_attr_enable' defined but not used [-Wunused-variable]
316 | CONFIGFS_ATTR_WO(spi_mockup_, enable);
| ^~~~~~~~~~~
include/linux/configfs.h:141:34: note: in definition of macro 'CONFIGFS_ATTR_WO'
141 | static struct configfs_attribute _pfx##attr_##_name = { \
| ^~~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for BPF_EVENTS
Depends on [n]: FTRACE [=n] && BPF_SYSCALL [=y] && (KPROBE_EVENTS [=n] || UPROBE_EVENTS [=n]) && PERF_EVENTS [=n]
Selected by [y]:
- SPI_MOCKUP [=y] && SPI [=y] && SPI_MASTER [=y] && OF [=y]
vim +/spi_mockup_attr_num_cs +361 drivers/spi/spi-mockup.c
287
288 static ssize_t
289 spi_mockup_enable_store(struct config_item *item, const char *page, size_t len)
290 {
291 int ret = len;
292 struct platform_device_info pdevinfo = {0};
293 struct spi_mockup_device *dev = to_spi_mockup_dev(item);
294
295 mutex_lock(&dev->lock);
296 if (dev->pdev) {
297 ret = -EEXIST;
298 goto out;
299 }
300
301 pdevinfo.name = "spi-mockup";
302 pdevinfo.id = dev->bus_nr;
303 pdevinfo.data = &dev->data;
304 pdevinfo.size_data = sizeof(dev->data);
305
306 dev->pdev = platform_device_register_full(&pdevinfo);
307 if (IS_ERR(dev->pdev)) {
308 ret = PTR_ERR(dev->pdev);
309 dev->pdev = NULL;
310 goto out;
311 }
312 out:
313 mutex_unlock(&dev->lock);
314 return ret;
315 }
> 316 CONFIGFS_ATTR_WO(spi_mockup_, enable);
317
318 static ssize_t
319 spi_mockup_disable_store(struct config_item *item, const char *page, size_t len)
320 {
321 int ret = len;
322 struct spi_mockup_device *dev = to_spi_mockup_dev(item);
323
324 mutex_lock(&dev->lock);
325 if (!dev->pdev) {
326 ret = -ENODEV;
327 goto out;
328 }
329
330 platform_device_unregister(dev->pdev);
331 dev->pdev = NULL;
332 out:
333 mutex_unlock(&dev->lock);
334 return ret;
335 }
> 336 CONFIGFS_ATTR_WO(spi_mockup_, disable);
337
338 #define SPI_MOCKUP_ATTR(type, name) \
339 static ssize_t spi_mockup_ ## name ## _store(struct config_item *item, \
340 const char *page, size_t len) \
341 { \
342 int ret; \
343 type val; \
344 struct spi_mockup_device *dev = to_spi_mockup_dev(item); \
345 \
346 mutex_lock(&dev->lock); \
347 if (dev->pdev) { \
348 ret = -EBUSY; \
349 goto out; \
350 } \
351 \
352 ret = kstrto ## type(page, 0, &val); \
353 if (ret) \
354 goto out; \
355 \
356 dev->data.name = val; \
357 out: \
358 mutex_unlock(&dev->lock); \
359 return ret ? ret : len; \
360 } \
> 361 CONFIGFS_ATTR_WO(spi_mockup_, name) \
362
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2023-11-04 11:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-04 6:46 [PATCH -next 0/5] spi: Introduce BPF based SPI mockup controller Zhang Xiaoxu
2023-11-04 6:46 ` [PATCH v3 -next 1/5] spi: mockup: Add SPI controller testing driver Zhang Xiaoxu
2023-11-06 11:59 ` Mark Brown
2023-11-18 11:07 ` huaweicloud
2023-11-04 6:46 ` [PATCH v3 -next 2/5] spi: mockup: Add writeable tracepoint for spi transfer Zhang Xiaoxu
2023-11-04 9:58 ` kernel test robot
2023-11-04 11:10 ` kernel test robot
2023-11-04 6:46 ` [PATCH v3 -next 3/5] spi: mockup: Add support register the device through configfs Zhang Xiaoxu
2023-11-04 6:46 ` [PATCH v3 -next 4/5] spi: mockup: Add speed and flags attribute support Zhang Xiaoxu
2023-11-04 11:10 ` kernel test robot [this message]
2023-11-04 6:46 ` [PATCH v3 -next 5/5] spi: mockup: Add documentation Zhang Xiaoxu
2023-11-06 13:09 ` Mark Brown
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=202311041823.CPs0Ymwh-lkp@intel.com \
--to=lkp@intel.com \
--cc=broonie@kernel.org \
--cc=frowand.list@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=rostedt@goodmis.org \
--cc=weiyongjun1@huawei.com \
--cc=zhangxiaoxu5@huawei.com \
--cc=zhangxiaoxu@huaweicloud.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