mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [watchdog-next:v5.18-rc1 12/13] drivers/watchdog/sp5100_tco.c:345:6: warning: assignment to 'struct resource *' from 'int' makes pointer from integer without a cast
@ 2022-03-27 20:50 kernel test robot
  2022-03-29 12:30 ` Jean Delvare
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2022-03-27 20:50 UTC (permalink / raw)
  To: Terry Bowman
  Cc: kbuild-all, linux-kernel, Wim Van Sebroeck, Robert Richter,
	Jean Delvare, Guenter Roeck

tree:   git://www.linux-watchdog.org/linux-watchdog-next.git v5.18-rc1
head:   826270373f17fd8ebd10753ca0a5fd2ceb1dc38e
commit: 0578fff4aae5bce3f09875f58e68e9ffbab8daf5 [12/13] Watchdog: sp5100_tco: Add initialization using EFCH MMIO
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220328/202203280446.sZhhsZYx-lkp@intel.com/config)
compiler: gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
reproduce (this is a W=1 build):
        git remote add watchdog-next git://www.linux-watchdog.org/linux-watchdog-next.git
        git fetch --no-tags watchdog-next v5.18-rc1
        git checkout 0578fff4aae5bce3f09875f58e68e9ffbab8daf5
        # save the config file to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/watchdog/

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

All warnings (new ones prefixed by >>):

   drivers/watchdog/sp5100_tco.c: In function 'sp5100_tco_setupdevice_mmio':
   drivers/watchdog/sp5100_tco.c:345:8: error: implicit declaration of function 'request_mem_region_muxed'; did you mean 'request_mem_region'? [-Werror=implicit-function-declaration]
     345 |  res = request_mem_region_muxed(EFCH_PM_ACPI_MMIO_PM_ADDR,
         |        ^~~~~~~~~~~~~~~~~~~~~~~~
         |        request_mem_region
>> drivers/watchdog/sp5100_tco.c:345:6: warning: assignment to 'struct resource *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
     345 |  res = request_mem_region_muxed(EFCH_PM_ACPI_MMIO_PM_ADDR,
         |      ^
   cc1: some warnings being treated as errors


vim +345 drivers/watchdog/sp5100_tco.c

   333	
   334	static int sp5100_tco_setupdevice_mmio(struct device *dev,
   335					       struct watchdog_device *wdd)
   336	{
   337		struct sp5100_tco *tco = watchdog_get_drvdata(wdd);
   338		const char *dev_name = SB800_DEVNAME;
   339		u32 mmio_addr = 0, alt_mmio_addr = 0;
   340		struct resource *res;
   341		void __iomem *addr;
   342		int ret;
   343		u32 val;
   344	
 > 345		res = request_mem_region_muxed(EFCH_PM_ACPI_MMIO_PM_ADDR,
   346					       EFCH_PM_ACPI_MMIO_PM_SIZE,
   347					       "sp5100_tco");
   348	
   349		if (!res) {
   350			dev_err(dev,
   351				"Memory region 0x%08x already in use\n",
   352				EFCH_PM_ACPI_MMIO_PM_ADDR);
   353			return -EBUSY;
   354		}
   355	
   356		addr = ioremap(EFCH_PM_ACPI_MMIO_PM_ADDR, EFCH_PM_ACPI_MMIO_PM_SIZE);
   357		if (!addr) {
   358			dev_err(dev, "Address mapping failed\n");
   359			ret = -ENOMEM;
   360			goto out;
   361		}
   362	
   363		/*
   364		 * EFCH_PM_DECODEEN_WDT_TMREN is dual purpose. This bitfield
   365		 * enables sp5100_tco register MMIO space decoding. The bitfield
   366		 * also starts the timer operation. Enable if not already enabled.
   367		 */
   368		val = efch_read_pm_reg8(addr, EFCH_PM_DECODEEN);
   369		if (!(val & EFCH_PM_DECODEEN_WDT_TMREN)) {
   370			efch_update_pm_reg8(addr, EFCH_PM_DECODEEN, 0xff,
   371					    EFCH_PM_DECODEEN_WDT_TMREN);
   372		}
   373	
   374		/* Error if the timer could not be enabled */
   375		val = efch_read_pm_reg8(addr, EFCH_PM_DECODEEN);
   376		if (!(val & EFCH_PM_DECODEEN_WDT_TMREN)) {
   377			dev_err(dev, "Failed to enable the timer\n");
   378			ret = -EFAULT;
   379			goto out;
   380		}
   381	
   382		mmio_addr = EFCH_PM_WDT_ADDR;
   383	
   384		/* Determine alternate MMIO base address */
   385		val = efch_read_pm_reg8(addr, EFCH_PM_ISACONTROL);
   386		if (val & EFCH_PM_ISACONTROL_MMIOEN)
   387			alt_mmio_addr = EFCH_PM_ACPI_MMIO_ADDR +
   388				EFCH_PM_ACPI_MMIO_WDT_OFFSET;
   389	
   390		ret = sp5100_tco_prepare_base(tco, mmio_addr, alt_mmio_addr, dev_name);
   391		if (!ret) {
   392			tco_timer_enable_mmio(addr);
   393			ret = sp5100_tco_timer_init(tco);
   394		}
   395	
   396	out:
   397		if (addr)
   398			iounmap(addr);
   399	
   400		release_resource(res);
   401	
   402		return ret;
   403	}
   404	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [watchdog-next:v5.18-rc1 12/13] drivers/watchdog/sp5100_tco.c:345:6: warning: assignment to 'struct resource *' from 'int' makes pointer from integer without a cast
  2022-03-27 20:50 [watchdog-next:v5.18-rc1 12/13] drivers/watchdog/sp5100_tco.c:345:6: warning: assignment to 'struct resource *' from 'int' makes pointer from integer without a cast kernel test robot
@ 2022-03-29 12:30 ` Jean Delvare
  0 siblings, 0 replies; 2+ messages in thread
From: Jean Delvare @ 2022-03-29 12:30 UTC (permalink / raw)
  To: kernel test robot, Wolfram Sang
  Cc: Terry Bowman, kbuild-all, linux-kernel, Wim Van Sebroeck,
	Robert Richter, Guenter Roeck

Hi all,

On Mon, 28 Mar 2022 04:50:02 +0800, kernel test robot wrote:
> tree:   git://www.linux-watchdog.org/linux-watchdog-next.git v5.18-rc1
> head:   826270373f17fd8ebd10753ca0a5fd2ceb1dc38e
> commit: 0578fff4aae5bce3f09875f58e68e9ffbab8daf5 [12/13] Watchdog: sp5100_tco: Add initialization using EFCH MMIO
> config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220328/202203280446.sZhhsZYx-lkp@intel.com/config)
> compiler: gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
> reproduce (this is a W=1 build):
>         git remote add watchdog-next git://www.linux-watchdog.org/linux-watchdog-next.git
>         git fetch --no-tags watchdog-next v5.18-rc1
>         git checkout 0578fff4aae5bce3f09875f58e68e9ffbab8daf5
>         # save the config file to linux build tree
>         mkdir build_dir
>         make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/watchdog/
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All warnings (new ones prefixed by >>):
> 
>    drivers/watchdog/sp5100_tco.c: In function 'sp5100_tco_setupdevice_mmio':
>    drivers/watchdog/sp5100_tco.c:345:8: error: implicit declaration of function 'request_mem_region_muxed'; did you mean 'request_mem_region'? [-Werror=implicit-function-declaration]
>      345 |  res = request_mem_region_muxed(EFCH_PM_ACPI_MMIO_PM_ADDR,
>          |        ^~~~~~~~~~~~~~~~~~~~~~~~
>          |        request_mem_region
> >> drivers/watchdog/sp5100_tco.c:345:6: warning: assignment to 'struct resource *' from 'int' makes pointer from integer without a cast [-Wint-conversion]  
>      345 |  res = request_mem_region_muxed(EFCH_PM_ACPI_MMIO_PM_ADDR,
>          |      ^
>    cc1: some warnings being treated as errors

This function is added in the i2c tree, that was supposed to be merged
before the watchdog tree for v5.18-rc1. Were the merge requests sent in
the wrong order maybe?

Either way, the problem will solve itself automatically as soon as
Wolfram's pull request for the i2c tree is processed (might have
already happened by now) so this can be ignored.

-- 
Jean Delvare
SUSE L3 Support

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-29 12:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-27 20:50 [watchdog-next:v5.18-rc1 12/13] drivers/watchdog/sp5100_tco.c:345:6: warning: assignment to 'struct resource *' from 'int' makes pointer from integer without a cast kernel test robot
2022-03-29 12:30 ` Jean Delvare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®