From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com
Subject: [bvanassche:thread-safety 272/460] include/linux/spi/spi.h:284:1: error: attributes should be specified before the declarator in a function definition
Date: Thu, 19 Nov 2026 02:16:29 +0100 [thread overview]
Message-ID: <20261119020747.MyvHiLUM-lkp@intel.com> (raw)
::::::
:::::: Manual check reason: "too many reports for this commit"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Bart Van Assche <bvanassche@acm.org>
tree: https://github.com/bvanassche/linux thread-safety
head: 754c0efaaee1c85b67fd7f8a45f7be89900b661f
commit: b92d6bdb8a97a9e35c1baf80d282833e714e75de [272/460] spi: Convert to_spi_device() into an inline function
:::::: branch date: 11 hours ago
:::::: commit date: 11 hours ago
config: i386-randconfig-2200-20261118 (https://download.01.org/0day-ci/archive/20261119/20261119020747.MyvHiLUM-lkp@intel.com/config)
compiler: gcc-13 (Debian 13.3.0-16) 13.3.0
smatch: v0.5.0-9187-g5189e3fb
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261119/20261119020747.MyvHiLUM-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/r/20261119020747.MyvHiLUM-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
In file included from drivers/mux/adgs1408.c:12:
>> include/linux/spi/spi.h:284:1: error: attributes should be specified before the declarator in a function definition
284 | static inline struct spi_device *to_spi_device(struct device *dev)
| ^~~~~~
include/linux/spi/spi.h:290:1: error: attributes should be specified before the declarator in a function definition
290 | static inline struct spi_device *to_spi_device(void *dev)
| ^~~~~~
include/linux/spi/spi.h:296:1: error: attributes should be specified before the declarator in a function definition
296 | static inline const struct spi_device *to_spi_device(const struct device *dev)
| ^~~~~~
drivers/mux/adgs1408.c: In function 'adgs1408_set':
>> drivers/mux/adgs1408.c:37:34: error: implicit declaration of function 'to_spi_device'; did you mean 'to_acpi_device'? [-Werror=implicit-function-declaration]
37 | struct spi_device *spi = to_spi_device(mux->chip->dev.parent);
| ^~~~~~~~~~~~~
| to_acpi_device
>> drivers/mux/adgs1408.c:37:34: warning: initialization of 'struct spi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--
In file included from drivers/gpio/gpio-pisosr.c:14:
>> include/linux/spi/spi.h:284:1: error: attributes should be specified before the declarator in a function definition
284 | static inline struct spi_device *to_spi_device(struct device *dev)
| ^~~~~~
include/linux/spi/spi.h:290:1: error: attributes should be specified before the declarator in a function definition
290 | static inline struct spi_device *to_spi_device(void *dev)
| ^~~~~~
include/linux/spi/spi.h:296:1: error: attributes should be specified before the declarator in a function definition
296 | static inline const struct spi_device *to_spi_device(const struct device *dev)
| ^~~~~~
--
In file included from drivers/gpio/gpio-max3191x.c:39:
>> include/linux/spi/spi.h:284:1: error: attributes should be specified before the declarator in a function definition
284 | static inline struct spi_device *to_spi_device(struct device *dev)
| ^~~~~~
include/linux/spi/spi.h:290:1: error: attributes should be specified before the declarator in a function definition
290 | static inline struct spi_device *to_spi_device(void *dev)
| ^~~~~~
include/linux/spi/spi.h:296:1: error: attributes should be specified before the declarator in a function definition
296 | static inline const struct spi_device *to_spi_device(const struct device *dev)
| ^~~~~~
drivers/gpio/gpio-max3191x.c: In function 'max3191x_readout_locked':
>> drivers/gpio/gpio-max3191x.c:114:34: error: implicit declaration of function 'to_spi_device'; did you mean 'to_acpi_device'? [-Werror=implicit-function-declaration]
114 | struct spi_device *spi = to_spi_device(dev);
| ^~~~~~~~~~~~~
| to_acpi_device
>> drivers/gpio/gpio-max3191x.c:114:34: warning: initialization of 'struct spi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
--
In file included from drivers/gpio/gpio-max7301.c:15:
>> include/linux/spi/spi.h:284:1: error: attributes should be specified before the declarator in a function definition
284 | static inline struct spi_device *to_spi_device(struct device *dev)
| ^~~~~~
include/linux/spi/spi.h:290:1: error: attributes should be specified before the declarator in a function definition
290 | static inline struct spi_device *to_spi_device(void *dev)
| ^~~~~~
include/linux/spi/spi.h:296:1: error: attributes should be specified before the declarator in a function definition
296 | static inline const struct spi_device *to_spi_device(const struct device *dev)
| ^~~~~~
drivers/gpio/gpio-max7301.c: In function 'max7301_spi_write':
>> drivers/gpio/gpio-max7301.c:22:34: error: implicit declaration of function 'to_spi_device'; did you mean 'to_acpi_device'? [-Werror=implicit-function-declaration]
22 | struct spi_device *spi = to_spi_device(dev);
| ^~~~~~~~~~~~~
| to_acpi_device
>> drivers/gpio/gpio-max7301.c:22:34: warning: initialization of 'struct spi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
drivers/gpio/gpio-max7301.c: In function 'max7301_spi_read':
drivers/gpio/gpio-max7301.c:34:34: warning: initialization of 'struct spi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
34 | struct spi_device *spi = to_spi_device(dev);
| ^~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from drivers/bus/moxtet.c:18:
>> include/linux/spi/spi.h:284:1: error: attributes should be specified before the declarator in a function definition
284 | static inline struct spi_device *to_spi_device(struct device *dev)
| ^~~~~~
include/linux/spi/spi.h:290:1: error: attributes should be specified before the declarator in a function definition
290 | static inline struct spi_device *to_spi_device(void *dev)
| ^~~~~~
include/linux/spi/spi.h:296:1: error: attributes should be specified before the declarator in a function definition
296 | static inline const struct spi_device *to_spi_device(const struct device *dev)
| ^~~~~~
drivers/bus/moxtet.c: In function 'moxtet_find_topology':
>> drivers/bus/moxtet.c:341:24: error: implicit declaration of function 'to_spi_device'; did you mean 'to_acpi_device'? [-Werror=implicit-function-declaration]
341 | ret = spi_read(to_spi_device(moxtet->dev), buf, TURRIS_MOX_MAX_MODULES);
| ^~~~~~~~~~~~~
| to_acpi_device
>> drivers/bus/moxtet.c:341:24: warning: passing argument 1 of 'spi_read' makes pointer from integer without a cast [-Wint-conversion]
341 | ret = spi_read(to_spi_device(moxtet->dev), buf, TURRIS_MOX_MAX_MODULES);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
include/linux/spi/spi.h:1583:29: note: expected 'struct spi_device *' but argument is of type 'int'
1583 | spi_read(struct spi_device *spi, void *buf, size_t len)
| ~~~~~~~~~~~~~~~~~~~^~~
drivers/bus/moxtet.c: In function 'moxtet_spi_read':
>> drivers/bus/moxtet.c:397:33: warning: passing argument 1 of 'spi_sync_transfer' makes pointer from integer without a cast [-Wint-conversion]
397 | ret = spi_sync_transfer(to_spi_device(moxtet->dev), &xfer, 1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
include/linux/spi/spi.h:1537:38: note: expected 'struct spi_device *' but argument is of type 'int'
1537 | spi_sync_transfer(struct spi_device *spi, struct spi_transfer *xfers,
| ~~~~~~~~~~~~~~~~~~~^~~
drivers/bus/moxtet.c: In function 'moxtet_device_write':
>> drivers/bus/moxtet.c:435:25: warning: passing argument 1 of 'spi_write' makes pointer from integer without a cast [-Wint-conversion]
435 | ret = spi_write(to_spi_device(moxtet->dev), moxtet->tx,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
include/linux/spi/spi.h:1560:30: note: expected 'struct spi_device *' but argument is of type 'int'
1560 | spi_write(struct spi_device *spi, const void *buf, size_t len)
| ~~~~~~~~~~~~~~~~~~~^~~
drivers/bus/moxtet.c: In function 'output_write':
drivers/bus/moxtet.c:539:25: warning: passing argument 1 of 'spi_write' makes pointer from integer without a cast [-Wint-conversion]
539 | err = spi_write(to_spi_device(moxtet->dev), moxtet->tx,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| int
include/linux/spi/spi.h:1560:30: note: expected 'struct spi_device *' but argument is of type 'int'
1560 | spi_write(struct spi_device *spi, const void *buf, size_t len)
| ~~~~~~~~~~~~~~~~~~~^~~
cc1: some warnings being treated as errors
--
In file included from drivers/spi/spi.c:35:
>> include/linux/spi/spi.h:284:1: error: attributes should be specified before the declarator in a function definition
284 | static inline struct spi_device *to_spi_device(struct device *dev)
| ^~~~~~
include/linux/spi/spi.h:290:1: error: attributes should be specified before the declarator in a function definition
290 | static inline struct spi_device *to_spi_device(void *dev)
| ^~~~~~
include/linux/spi/spi.h:296:1: error: attributes should be specified before the declarator in a function definition
296 | static inline const struct spi_device *to_spi_device(const struct device *dev)
| ^~~~~~
drivers/spi/spi.c: In function 'spidev_release':
>> drivers/spi/spi.c:53:40: error: implicit declaration of function 'to_spi_device'; did you mean 'to_acpi_device'? [-Werror=implicit-function-declaration]
53 | struct spi_device *spi = to_spi_device(dev);
| ^~~~~~~~~~~~~
| to_acpi_device
>> drivers/spi/spi.c:53:40: warning: initialization of 'struct spi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
drivers/spi/spi.c: In function 'modalias_show':
>> drivers/spi/spi.c:63:40: warning: initialization of 'const struct spi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
63 | const struct spi_device *spi = to_spi_device(dev);
| ^~~~~~~~~~~~~
drivers/spi/spi.c: In function 'spi_device_messages_show':
drivers/spi/spi.c:154:34: warning: initialization of 'struct spi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
154 | struct spi_device *spi = to_spi_device(dev); \
| ^~~~~~~~~~~~~
drivers/spi/spi.c:169:1: note: in expansion of macro 'SPI_STATISTICS_ATTRS'
169 | SPI_STATISTICS_ATTRS(name, file)
| ^~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c:172:9: note: in expansion of macro 'SPI_STATISTICS_SHOW_NAME'
172 | SPI_STATISTICS_SHOW_NAME(field, __stringify(field), \
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c:175:1: note: in expansion of macro 'SPI_STATISTICS_SHOW'
175 | SPI_STATISTICS_SHOW(messages);
| ^~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c: In function 'spi_device_transfers_show':
drivers/spi/spi.c:154:34: warning: initialization of 'struct spi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
154 | struct spi_device *spi = to_spi_device(dev); \
| ^~~~~~~~~~~~~
drivers/spi/spi.c:169:1: note: in expansion of macro 'SPI_STATISTICS_ATTRS'
169 | SPI_STATISTICS_ATTRS(name, file)
| ^~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c:172:9: note: in expansion of macro 'SPI_STATISTICS_SHOW_NAME'
172 | SPI_STATISTICS_SHOW_NAME(field, __stringify(field), \
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c:176:1: note: in expansion of macro 'SPI_STATISTICS_SHOW'
176 | SPI_STATISTICS_SHOW(transfers);
| ^~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c: In function 'spi_device_errors_show':
drivers/spi/spi.c:154:34: warning: initialization of 'struct spi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
154 | struct spi_device *spi = to_spi_device(dev); \
| ^~~~~~~~~~~~~
drivers/spi/spi.c:169:1: note: in expansion of macro 'SPI_STATISTICS_ATTRS'
169 | SPI_STATISTICS_ATTRS(name, file)
| ^~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c:172:9: note: in expansion of macro 'SPI_STATISTICS_SHOW_NAME'
172 | SPI_STATISTICS_SHOW_NAME(field, __stringify(field), \
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c:177:1: note: in expansion of macro 'SPI_STATISTICS_SHOW'
177 | SPI_STATISTICS_SHOW(errors);
| ^~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c: In function 'spi_device_timedout_show':
drivers/spi/spi.c:154:34: warning: initialization of 'struct spi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
154 | struct spi_device *spi = to_spi_device(dev); \
| ^~~~~~~~~~~~~
drivers/spi/spi.c:169:1: note: in expansion of macro 'SPI_STATISTICS_ATTRS'
169 | SPI_STATISTICS_ATTRS(name, file)
| ^~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c:172:9: note: in expansion of macro 'SPI_STATISTICS_SHOW_NAME'
172 | SPI_STATISTICS_SHOW_NAME(field, __stringify(field), \
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c:178:1: note: in expansion of macro 'SPI_STATISTICS_SHOW'
178 | SPI_STATISTICS_SHOW(timedout);
| ^~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c: In function 'spi_device_spi_sync_show':
drivers/spi/spi.c:154:34: warning: initialization of 'struct spi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
154 | struct spi_device *spi = to_spi_device(dev); \
| ^~~~~~~~~~~~~
drivers/spi/spi.c:169:1: note: in expansion of macro 'SPI_STATISTICS_ATTRS'
169 | SPI_STATISTICS_ATTRS(name, file)
| ^~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c:172:9: note: in expansion of macro 'SPI_STATISTICS_SHOW_NAME'
172 | SPI_STATISTICS_SHOW_NAME(field, __stringify(field), \
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c:180:1: note: in expansion of macro 'SPI_STATISTICS_SHOW'
180 | SPI_STATISTICS_SHOW(spi_sync);
| ^~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c: In function 'spi_device_spi_sync_immediate_show':
drivers/spi/spi.c:154:34: warning: initialization of 'struct spi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
154 | struct spi_device *spi = to_spi_device(dev); \
| ^~~~~~~~~~~~~
drivers/spi/spi.c:169:1: note: in expansion of macro 'SPI_STATISTICS_ATTRS'
169 | SPI_STATISTICS_ATTRS(name, file)
| ^~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c:172:9: note: in expansion of macro 'SPI_STATISTICS_SHOW_NAME'
172 | SPI_STATISTICS_SHOW_NAME(field, __stringify(field), \
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c:181:1: note: in expansion of macro 'SPI_STATISTICS_SHOW'
181 | SPI_STATISTICS_SHOW(spi_sync_immediate);
| ^~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c: In function 'spi_device_spi_async_show':
drivers/spi/spi.c:154:34: warning: initialization of 'struct spi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
154 | struct spi_device *spi = to_spi_device(dev); \
| ^~~~~~~~~~~~~
drivers/spi/spi.c:169:1: note: in expansion of macro 'SPI_STATISTICS_ATTRS'
169 | SPI_STATISTICS_ATTRS(name, file)
| ^~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c:172:9: note: in expansion of macro 'SPI_STATISTICS_SHOW_NAME'
172 | SPI_STATISTICS_SHOW_NAME(field, __stringify(field), \
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c:182:1: note: in expansion of macro 'SPI_STATISTICS_SHOW'
182 | SPI_STATISTICS_SHOW(spi_async);
| ^~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c: In function 'spi_device_bytes_show':
drivers/spi/spi.c:154:34: warning: initialization of 'struct spi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
154 | struct spi_device *spi = to_spi_device(dev); \
| ^~~~~~~~~~~~~
drivers/spi/spi.c:169:1: note: in expansion of macro 'SPI_STATISTICS_ATTRS'
169 | SPI_STATISTICS_ATTRS(name, file)
| ^~~~~~~~~~~~~~~~~~~~
--
drivers/spi/spi.c:169:1: note: in expansion of macro 'SPI_STATISTICS_ATTRS'
169 | SPI_STATISTICS_ATTRS(name, file)
| ^~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c:189:9: note: in expansion of macro 'SPI_STATISTICS_SHOW_NAME'
189 | SPI_STATISTICS_SHOW_NAME(transfer_bytes_histo##index, \
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c:203:1: note: in expansion of macro 'SPI_STATISTICS_TRANSFER_BYTES_HISTO'
203 | SPI_STATISTICS_TRANSFER_BYTES_HISTO(11, "2048-4095");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c: In function 'spi_device_transfer_bytes_histo12_show':
drivers/spi/spi.c:154:34: warning: initialization of 'struct spi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
154 | struct spi_device *spi = to_spi_device(dev); \
| ^~~~~~~~~~~~~
drivers/spi/spi.c:169:1: note: in expansion of macro 'SPI_STATISTICS_ATTRS'
169 | SPI_STATISTICS_ATTRS(name, file)
| ^~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c:189:9: note: in expansion of macro 'SPI_STATISTICS_SHOW_NAME'
189 | SPI_STATISTICS_SHOW_NAME(transfer_bytes_histo##index, \
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c:204:1: note: in expansion of macro 'SPI_STATISTICS_TRANSFER_BYTES_HISTO'
204 | SPI_STATISTICS_TRANSFER_BYTES_HISTO(12, "4096-8191");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c: In function 'spi_device_transfer_bytes_histo13_show':
drivers/spi/spi.c:154:34: warning: initialization of 'struct spi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
154 | struct spi_device *spi = to_spi_device(dev); \
| ^~~~~~~~~~~~~
drivers/spi/spi.c:169:1: note: in expansion of macro 'SPI_STATISTICS_ATTRS'
169 | SPI_STATISTICS_ATTRS(name, file)
| ^~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c:189:9: note: in expansion of macro 'SPI_STATISTICS_SHOW_NAME'
189 | SPI_STATISTICS_SHOW_NAME(transfer_bytes_histo##index, \
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c:205:1: note: in expansion of macro 'SPI_STATISTICS_TRANSFER_BYTES_HISTO'
205 | SPI_STATISTICS_TRANSFER_BYTES_HISTO(13, "8192-16383");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c: In function 'spi_device_transfer_bytes_histo14_show':
drivers/spi/spi.c:154:34: warning: initialization of 'struct spi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
154 | struct spi_device *spi = to_spi_device(dev); \
| ^~~~~~~~~~~~~
drivers/spi/spi.c:169:1: note: in expansion of macro 'SPI_STATISTICS_ATTRS'
169 | SPI_STATISTICS_ATTRS(name, file)
| ^~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c:189:9: note: in expansion of macro 'SPI_STATISTICS_SHOW_NAME'
189 | SPI_STATISTICS_SHOW_NAME(transfer_bytes_histo##index, \
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c:206:1: note: in expansion of macro 'SPI_STATISTICS_TRANSFER_BYTES_HISTO'
206 | SPI_STATISTICS_TRANSFER_BYTES_HISTO(14, "16384-32767");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c: In function 'spi_device_transfer_bytes_histo15_show':
drivers/spi/spi.c:154:34: warning: initialization of 'struct spi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
154 | struct spi_device *spi = to_spi_device(dev); \
| ^~~~~~~~~~~~~
drivers/spi/spi.c:169:1: note: in expansion of macro 'SPI_STATISTICS_ATTRS'
169 | SPI_STATISTICS_ATTRS(name, file)
| ^~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c:189:9: note: in expansion of macro 'SPI_STATISTICS_SHOW_NAME'
189 | SPI_STATISTICS_SHOW_NAME(transfer_bytes_histo##index, \
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c:207:1: note: in expansion of macro 'SPI_STATISTICS_TRANSFER_BYTES_HISTO'
207 | SPI_STATISTICS_TRANSFER_BYTES_HISTO(15, "32768-65535");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c: In function 'spi_device_transfer_bytes_histo16_show':
drivers/spi/spi.c:154:34: warning: initialization of 'struct spi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
154 | struct spi_device *spi = to_spi_device(dev); \
| ^~~~~~~~~~~~~
drivers/spi/spi.c:169:1: note: in expansion of macro 'SPI_STATISTICS_ATTRS'
169 | SPI_STATISTICS_ATTRS(name, file)
| ^~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c:189:9: note: in expansion of macro 'SPI_STATISTICS_SHOW_NAME'
189 | SPI_STATISTICS_SHOW_NAME(transfer_bytes_histo##index, \
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c:208:1: note: in expansion of macro 'SPI_STATISTICS_TRANSFER_BYTES_HISTO'
208 | SPI_STATISTICS_TRANSFER_BYTES_HISTO(16, "65536+");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c: In function 'spi_device_transfers_split_maxsize_show':
drivers/spi/spi.c:154:34: warning: initialization of 'struct spi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
154 | struct spi_device *spi = to_spi_device(dev); \
| ^~~~~~~~~~~~~
drivers/spi/spi.c:169:1: note: in expansion of macro 'SPI_STATISTICS_ATTRS'
169 | SPI_STATISTICS_ATTRS(name, file)
| ^~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c:172:9: note: in expansion of macro 'SPI_STATISTICS_SHOW_NAME'
172 | SPI_STATISTICS_SHOW_NAME(field, __stringify(field), \
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c:210:1: note: in expansion of macro 'SPI_STATISTICS_SHOW'
210 | SPI_STATISTICS_SHOW(transfers_split_maxsize);
| ^~~~~~~~~~~~~~~~~~~
drivers/spi/spi.c: In function 'spi_match_device':
drivers/spi/spi.c:560:40: warning: initialization of 'const struct spi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
560 | const struct spi_device *spi = to_spi_device(dev);
| ^~~~~~~~~~~~~
drivers/spi/spi.c: In function 'spi_uevent':
drivers/spi/spi.c:585:48: warning: initialization of 'const struct spi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
585 | const struct spi_device *spi = to_spi_device(dev);
| ^~~~~~~~~~~~~
drivers/spi/spi.c: In function 'spi_probe':
drivers/spi/spi.c:598:48: warning: initialization of 'struct spi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
598 | struct spi_device *spi = to_spi_device(dev);
| ^~~~~~~~~~~~~
drivers/spi/spi.c: In function 'spi_remove':
>> drivers/spi/spi.c:631:30: warning: passing argument 1 of 'sdrv->remove' makes pointer from integer without a cast [-Wint-conversion]
631 | sdrv->remove(to_spi_device(dev));
| ^~~~~~~~~~~~~~~~~~
| |
| int
drivers/spi/spi.c:631:30: note: expected 'struct spi_device *' but argument is of type 'int'
drivers/spi/spi.c: In function 'spi_shutdown':
>> drivers/spi/spi.c:640:40: warning: passing argument 1 of 'sdrv->shutdown' makes pointer from integer without a cast [-Wint-conversion]
640 | sdrv->shutdown(to_spi_device(dev));
| ^~~~~~~~~~~~~~~~~~
| |
| int
drivers/spi/spi.c:640:40: note: expected 'struct spi_device *' but argument is of type 'int'
drivers/spi/spi.c: In function 'spi_dev_check':
drivers/spi/spi.c:836:34: warning: initialization of 'struct spi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
836 | struct spi_device *spi = to_spi_device(dev);
| ^~~~~~~~~~~~~
drivers/spi/spi.c: In function '__unregister':
>> drivers/spi/spi.c:3870:31: warning: passing argument 1 of 'spi_unregister_device' makes pointer from integer without a cast [-Wint-conversion]
3870 | spi_unregister_device(to_spi_device(dev));
| ^~~~~~~~~~~~~~~~~~
| |
| int
drivers/spi/spi.c:1069:47: note: expected 'struct spi_device *' but argument is of type 'int'
1069 | void spi_unregister_device(struct spi_device *spi)
| ~~~~~~~~~~~~~~~~~~~^~~
drivers/spi/spi.c: In function 'of_find_spi_device_by_node':
>> drivers/spi/spi.c:5272:41: warning: pointer/integer type mismatch in conditional expression
5272 | return dev ? to_spi_device(dev) : NULL;
| ^
drivers/spi/spi.c: In function 'acpi_spi_find_device_by_adev':
>> drivers/spi/spi.c:5359:16: warning: returning 'int' from a function with return type 'struct spi_device *' makes pointer from integer without a cast [-Wint-conversion]
5359 | return to_spi_device(dev);
| ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
..
vim +284 include/linux/spi/spi.h
8ae12a0d85987d David Brownell 2006-01-08 279
d962608ce2188a Dragos Bogdan 2020-12-21 280 /* Make sure that SPI_MODE_KERNEL_MASK & SPI_MODE_USER_MASK don't overlap */
d962608ce2188a Dragos Bogdan 2020-12-21 281 static_assert((SPI_MODE_KERNEL_MASK & SPI_MODE_USER_MASK) == 0,
d962608ce2188a Dragos Bogdan 2020-12-21 282 "SPI_MODE_USER_MASK & SPI_MODE_KERNEL_MASK must not overlap");
d962608ce2188a Dragos Bogdan 2020-12-21 283
b92d6bdb8a97a9 Bart Van Assche 2026-11-15 @284 static inline struct spi_device *to_spi_device(struct device *dev)
b92d6bdb8a97a9 Bart Van Assche 2026-11-15 285 __attribute__((overloadable))
b92d6bdb8a97a9 Bart Van Assche 2026-11-15 286 {
b92d6bdb8a97a9 Bart Van Assche 2026-11-15 287 return container_of(dev, struct spi_device, dev);
b92d6bdb8a97a9 Bart Van Assche 2026-11-15 288 }
b92d6bdb8a97a9 Bart Van Assche 2026-11-15 289
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2026-11-19 1:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 1:16 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-11-19 3:11 [bvanassche:thread-safety 272/460] include/linux/spi/spi.h:284:1: error: attributes should be specified before the declarator in a function definition kernel test robot
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=20261119020747.MyvHiLUM-lkp@intel.com \
--to=lkp@intel.com \
--cc=oe-kbuild@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.