All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [bvanassche:thread-safety 272/460] sound/soc/codecs/cs35l56-shared.c:515:27: error: implicit declaration of function 'to_spi_device'; did you mean 'to_rtc_device'?
Date: Thu, 19 Nov 2026 01:54:46 +0100	[thread overview]
Message-ID: <20261119015135.HKvs0tsR-lkp@intel.com> (raw)

tree:   https://github.com/bvanassche/linux thread-safety
head:   754c0efaaee1c85b67fd7f8a45f7be89900b661f
commit: b92d6bdb8a97a9e35c1baf80d282833e714e75de [272/460] spi: Convert to_spi_device() into an inline function
config: nios2-randconfig-2200-20261118 (https://download.01.org/0day-ci/archive/20261119/20261119015135.HKvs0tsR-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 8.5.0
smatch: v0.5.0-9187-g5189e3fb
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261119/20261119015135.HKvs0tsR-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/20261119015135.HKvs0tsR-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

   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
    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
    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
    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:27: error: implicit declaration of function 'to_spi_device'; did you mean 'to_rtc_device'? [-Werror=implicit-function-declaration]
     struct spi_device *spi = to_spi_device(cs35l56_base->dev);
                              ^~~~~~~~~~~~~
                              to_rtc_device
>> sound/soc/codecs/cs35l56-shared.c:515:27: warning: initialization of 'struct spi_device *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
   cc1: some warnings being treated as errors


vim +515 sound/soc/codecs/cs35l56-shared.c

769c1b79295c38 Richard Fitzgerald 2025-02-25  512  
769c1b79295c38 Richard Fitzgerald 2025-02-25  513  static void cs35l56_spi_system_reset(struct cs35l56_base *cs35l56_base)
769c1b79295c38 Richard Fitzgerald 2025-02-25  514  {
769c1b79295c38 Richard Fitzgerald 2025-02-25 @515  	struct spi_device *spi = to_spi_device(cs35l56_base->dev);
769c1b79295c38 Richard Fitzgerald 2025-02-25  516  	unsigned int val;
769c1b79295c38 Richard Fitzgerald 2025-02-25  517  	int read_ret, ret;
769c1b79295c38 Richard Fitzgerald 2025-02-25  518  
769c1b79295c38 Richard Fitzgerald 2025-02-25  519  	/*
769c1b79295c38 Richard Fitzgerald 2025-02-25  520  	 * There must not be any other SPI bus activity while the amp is
769c1b79295c38 Richard Fitzgerald 2025-02-25  521  	 * soft-resetting.
769c1b79295c38 Richard Fitzgerald 2025-02-25  522  	 */
f7a7818d7c687b Bart Van Assche    2026-11-02  523  	spi_bus_lock(spi->controller);
769c1b79295c38 Richard Fitzgerald 2025-02-25  524  
769c1b79295c38 Richard Fitzgerald 2025-02-25  525  	cs35l56_spi_issue_bus_locked_reset(cs35l56_base, spi);
769c1b79295c38 Richard Fitzgerald 2025-02-25  526  	spi_bus_unlock(spi->controller);
769c1b79295c38 Richard Fitzgerald 2025-02-25  527  
769c1b79295c38 Richard Fitzgerald 2025-02-25  528  	/*
769c1b79295c38 Richard Fitzgerald 2025-02-25  529  	 * Check firmware boot by testing for a response in MBOX_2.
769c1b79295c38 Richard Fitzgerald 2025-02-25  530  	 * HALO_STATE cannot be trusted yet because the reset sequence
769c1b79295c38 Richard Fitzgerald 2025-02-25  531  	 * can leave it with stale state. But MBOX is reset.
769c1b79295c38 Richard Fitzgerald 2025-02-25  532  	 * The regmap must remain in cache-only until the chip has
769c1b79295c38 Richard Fitzgerald 2025-02-25  533  	 * booted, so use a bypassed read.
769c1b79295c38 Richard Fitzgerald 2025-02-25  534  	 */
007699d278a655 Richard Fitzgerald 2026-06-11  535  	val = 0;
769c1b79295c38 Richard Fitzgerald 2025-02-25  536  	ret = read_poll_timeout(regmap_read_bypassed, read_ret,
769c1b79295c38 Richard Fitzgerald 2025-02-25  537  				(val > 0) && (val < 0xffffffff),
769c1b79295c38 Richard Fitzgerald 2025-02-25  538  				CS35L56_HALO_STATE_POLL_US,
769c1b79295c38 Richard Fitzgerald 2025-02-25  539  				CS35L56_HALO_STATE_TIMEOUT_US,
769c1b79295c38 Richard Fitzgerald 2025-02-25  540  				false,
769c1b79295c38 Richard Fitzgerald 2025-02-25  541  				cs35l56_base->regmap,
769c1b79295c38 Richard Fitzgerald 2025-02-25  542  				CS35L56_DSP_VIRTUAL1_MBOX_2,
769c1b79295c38 Richard Fitzgerald 2025-02-25  543  				&val);
769c1b79295c38 Richard Fitzgerald 2025-02-25  544  	if (ret) {
769c1b79295c38 Richard Fitzgerald 2025-02-25  545  		dev_err(cs35l56_base->dev, "SPI reboot timed out(%d): MBOX2=%#x\n",
769c1b79295c38 Richard Fitzgerald 2025-02-25  546  			read_ret, val);
769c1b79295c38 Richard Fitzgerald 2025-02-25  547  	}
769c1b79295c38 Richard Fitzgerald 2025-02-25  548  }
769c1b79295c38 Richard Fitzgerald 2025-02-25  549  

:::::: The code at line 515 was first introduced by commit
:::::: 769c1b79295c38d60fde4c0a8f5f31e01360c54f ASoC: cs35l56: Prevent races when soft-resetting using SPI control

:::::: TO: Richard Fitzgerald <rf@opensource.cirrus.com>
:::::: CC: Mark Brown <broonie@kernel.org>

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

                 reply	other threads:[~2026-11-19  0:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261119015135.HKvs0tsR-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bvanassche@acm.org \
    --cc=oe-kbuild-all@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.