All of lore.kernel.org
 help / color / mirror / Atom feed
* [l1k:bcm2835_spi_limit 3/3] drivers/spi/spi-omap2-mcspi.c:1062:4: error: implicit declaration of function 'omap2_mcspi_cleanup'; did you mean 'omap2_mcspi_setup'?
@ 2021-05-25  4:03 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-05-25  4:03 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3851 bytes --]

tree:   https://github.com/l1k/linux bcm2835_spi_limit
head:   3d5ecff93d06ef97936ba4129888298cbdff3dcb
commit: 3d5ecff93d06ef97936ba4129888298cbdff3dcb [3/3] spi: Cleanup on failure of initial setup
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/l1k/linux/commit/3d5ecff93d06ef97936ba4129888298cbdff3dcb
        git remote add l1k https://github.com/l1k/linux
        git fetch --no-tags l1k bcm2835_spi_limit
        git checkout 3d5ecff93d06ef97936ba4129888298cbdff3dcb
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/spi/spi-omap2-mcspi.c: In function 'omap2_mcspi_setup':
>> drivers/spi/spi-omap2-mcspi.c:1062:4: error: implicit declaration of function 'omap2_mcspi_cleanup'; did you mean 'omap2_mcspi_setup'? [-Werror=implicit-function-declaration]
    1062 |    omap2_mcspi_cleanup(spi);
         |    ^~~~~~~~~~~~~~~~~~~
         |    omap2_mcspi_setup
   drivers/spi/spi-omap2-mcspi.c: At top level:
   drivers/spi/spi-omap2-mcspi.c:1077:13: warning: conflicting types for 'omap2_mcspi_cleanup'
    1077 | static void omap2_mcspi_cleanup(struct spi_device *spi)
         |             ^~~~~~~~~~~~~~~~~~~
>> drivers/spi/spi-omap2-mcspi.c:1077:13: error: static declaration of 'omap2_mcspi_cleanup' follows non-static declaration
   drivers/spi/spi-omap2-mcspi.c:1062:4: note: previous implicit declaration of 'omap2_mcspi_cleanup' was here
    1062 |    omap2_mcspi_cleanup(spi);
         |    ^~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +1062 drivers/spi/spi-omap2-mcspi.c

  1034	
  1035	static int omap2_mcspi_setup(struct spi_device *spi)
  1036	{
  1037		bool			initial_setup = false;
  1038		int			ret;
  1039		struct omap2_mcspi	*mcspi = spi_master_get_devdata(spi->master);
  1040		struct omap2_mcspi_regs	*ctx = &mcspi->ctx;
  1041		struct omap2_mcspi_cs	*cs = spi->controller_state;
  1042	
  1043		if (!cs) {
  1044			cs = kzalloc(sizeof *cs, GFP_KERNEL);
  1045			if (!cs)
  1046				return -ENOMEM;
  1047			cs->base = mcspi->base + spi->chip_select * 0x14;
  1048			cs->phys = mcspi->phys + spi->chip_select * 0x14;
  1049			cs->mode = 0;
  1050			cs->chconf0 = 0;
  1051			cs->chctrl0 = 0;
  1052			spi->controller_state = cs;
  1053			/* Link this to context save list */
  1054			list_add_tail(&cs->node, &ctx->cs);
  1055			initial_setup = true;
  1056		}
  1057	
  1058		ret = pm_runtime_get_sync(mcspi->dev);
  1059		if (ret < 0) {
  1060			pm_runtime_put_noidle(mcspi->dev);
  1061			if (initial_setup)
> 1062				omap2_mcspi_cleanup(spi);
  1063	
  1064			return ret;
  1065		}
  1066	
  1067		ret = omap2_mcspi_setup_transfer(spi, NULL);
  1068		if (ret && initial_setup)
  1069			omap2_mcspi_cleanup(spi);
  1070	
  1071		pm_runtime_mark_last_busy(mcspi->dev);
  1072		pm_runtime_put_autosuspend(mcspi->dev);
  1073	
  1074		return ret;
  1075	}
  1076	
> 1077	static void omap2_mcspi_cleanup(struct spi_device *spi)
  1078	{
  1079		struct omap2_mcspi_cs	*cs;
  1080	
  1081		if (spi->controller_state) {
  1082			/* Unlink controller state from context save list */
  1083			cs = spi->controller_state;
  1084			list_del(&cs->node);
  1085	
  1086			kfree(cs);
  1087		}
  1088	}
  1089	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 68141 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-25  4:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-25  4:03 [l1k:bcm2835_spi_limit 3/3] drivers/spi/spi-omap2-mcspi.c:1062:4: error: implicit declaration of function 'omap2_mcspi_cleanup'; did you mean 'omap2_mcspi_setup'? kernel test robot

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.