All of lore.kernel.org
 help / color / mirror / Atom feed
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 04:11:53 +0100	[thread overview]
Message-ID: <20261119040205.imXaG5Cp-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: 13 hours ago
:::::: commit date: 13 hours ago
config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20261119/20261119040205.imXaG5Cp-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261119/20261119040205.imXaG5Cp-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/20261119040205.imXaG5Cp-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/rtc/rtc-ds3232.c:16:
>> 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/rtc/rtc-rx4581.c:31:
>> 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/rtc/rtc-rx4581.c: In function 'rx4581_set_reg':
>> drivers/rtc/rtc-rx4581.c:69:34: error: implicit declaration of function 'to_spi_device'; did you mean 'to_acpi_device'? [-Wimplicit-function-declaration]
      69 |         struct spi_device *spi = to_spi_device(dev);
         |                                  ^~~~~~~~~~~~~
         |                                  to_acpi_device
>> drivers/rtc/rtc-rx4581.c:69:34: error: initialization of 'struct spi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   drivers/rtc/rtc-rx4581.c: In function 'rx4581_get_reg':
   drivers/rtc/rtc-rx4581.c:82:34: error: initialization of 'struct spi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
      82 |         struct spi_device *spi = to_spi_device(dev);
         |                                  ^~~~~~~~~~~~~
   drivers/rtc/rtc-rx4581.c: In function 'rx4581_get_datetime':
   drivers/rtc/rtc-rx4581.c:96:34: error: initialization of 'struct spi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
      96 |         struct spi_device *spi = to_spi_device(dev);
         |                                  ^~~~~~~~~~~~~
   drivers/rtc/rtc-rx4581.c: In function 'rx4581_set_datetime':
   drivers/rtc/rtc-rx4581.c:172:34: error: initialization of 'struct spi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     172 |         struct spi_device *spi = to_spi_device(dev);
         |                                  ^~~~~~~~~~~~~
--
   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'? [-Wimplicit-function-declaration]
      53 |         struct spi_device       *spi = to_spi_device(dev);
         |                                        ^~~~~~~~~~~~~
         |                                        to_acpi_device
>> drivers/spi/spi.c:53:40: error: 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: error: 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: error: 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: error: 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: error: 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: error: 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: error: 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: error: 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: error: 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: error: 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: error: 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: error: 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: error: 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: error: 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: error: 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: error: 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: error: 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: error: 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: error: 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: error: 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: error: 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: error: 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: error: 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 'acpi_spi_find_device_by_adev':
>> drivers/spi/spi.c:5359:16: error: 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);
         |                ^~~~~~~~~~~~~~~~~~
--
   In file included from sound/soc/codecs/cs35l56-shared.c:20:
>> 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)
         | ^~~~~~
   sound/soc/codecs/cs35l56-shared.c: In function 'cs35l56_spi_system_reset':
>> sound/soc/codecs/cs35l56-shared.c:515:34: error: implicit declaration of function 'to_spi_device'; did you mean 'to_acpi_device'? [-Wimplicit-function-declaration]
     515 |         struct spi_device *spi = to_spi_device(cs35l56_base->dev);
         |                                  ^~~~~~~~~~~~~
         |                                  to_acpi_device
>> sound/soc/codecs/cs35l56-shared.c:515:34: error: initialization of 'struct spi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
..


vim +284 include/linux/spi/spi.h

8ae12a0d85987dc David Brownell  2006-01-08  279  
d962608ce2188a1 Dragos Bogdan   2020-12-21  280  /* Make sure that SPI_MODE_KERNEL_MASK & SPI_MODE_USER_MASK don't overlap */
d962608ce2188a1 Dragos Bogdan   2020-12-21  281  static_assert((SPI_MODE_KERNEL_MASK & SPI_MODE_USER_MASK) == 0,
d962608ce2188a1 Dragos Bogdan   2020-12-21  282  	      "SPI_MODE_USER_MASK & SPI_MODE_KERNEL_MASK must not overlap");
d962608ce2188a1 Dragos Bogdan   2020-12-21  283  
b92d6bdb8a97a9e Bart Van Assche 2026-11-15 @284  static inline struct spi_device *to_spi_device(struct device *dev)
b92d6bdb8a97a9e Bart Van Assche 2026-11-15  285  	__attribute__((overloadable))
b92d6bdb8a97a9e Bart Van Assche 2026-11-15  286  {
b92d6bdb8a97a9e Bart Van Assche 2026-11-15  287  	return container_of(dev, struct spi_device, dev);
b92d6bdb8a97a9e Bart Van Assche 2026-11-15  288  }
b92d6bdb8a97a9e Bart Van Assche 2026-11-15  289  

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

             reply	other threads:[~2026-11-19  3:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19  3:11 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-11-19  1:16 [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=20261119040205.imXaG5Cp-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.