lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202502260805.jPVNYTZ0-lkp@intel.com>
Date: Wed, 26 Feb 2025 08:49:04 +0800
From: kernel test robot <lkp@...el.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	Guenter Roeck <linux@...ck-us.net>, linux-watchdog@...r.kernel.org,
	linux-kernel@...r.kernel.org
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
	Wim Van Sebroeck <wim@...ux-watchdog.org>
Subject: Re: [PATCH v1 1/1] watchdog: nic7018_wdt: tidy up ACPI ID table

Hi Andy,

kernel test robot noticed the following build errors:

[auto build test ERROR on groeck-staging/hwmon-next]
[also build test ERROR on linus/master v6.14-rc4 next-20250225]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/watchdog-nic7018_wdt-tidy-up-ACPI-ID-table/20250225-180908
base:   https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
patch link:    https://lore.kernel.org/r/20250225095804.360899-1-andriy.shevchenko%40linux.intel.com
patch subject: [PATCH v1 1/1] watchdog: nic7018_wdt: tidy up ACPI ID table
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20250226/202502260805.jPVNYTZ0-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250226/202502260805.jPVNYTZ0-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202502260805.jPVNYTZ0-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/watchdog/nic7018_wdt.c:7:
   In file included from include/linux/device.h:32:
   In file included from include/linux/device/driver.h:21:
   In file included from include/linux/module.h:19:
   In file included from include/linux/elf.h:6:
   In file included from arch/s390/include/asm/elf.h:181:
   In file included from arch/s390/include/asm/mmu_context.h:11:
   In file included from arch/s390/include/asm/pgalloc.h:18:
   In file included from include/linux/mm.h:2224:
   include/linux/vmstat.h:504:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     504 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     505 |                            item];
         |                            ~~~~
   include/linux/vmstat.h:511:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     511 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     512 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
   include/linux/vmstat.h:524:43: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum numa_stat_item') [-Wenum-enum-conversion]
     524 |         return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~ ^
     525 |                            NR_VM_NUMA_EVENT_ITEMS +
         |                            ~~~~~~~~~~~~~~~~~~~~~~
>> drivers/watchdog/nic7018_wdt.c:209:2: error: call to '_outb' declared with 'error' attribute: outb() requires CONFIG_HAS_IOPORT
     209 |         outb(UNLOCK, wdt->io_base + WDT_REG_LOCK);
         |         ^
   include/asm-generic/io.h:655:14: note: expanded from macro 'outb'
     655 | #define outb _outb
         |              ^
   include/asm-generic/io.h:596:15: note: expanded from macro '_outb'
     596 | #define _outb _outb
         |               ^
   drivers/watchdog/nic7018_wdt.c:213:3: error: call to '_outb' declared with 'error' attribute: outb() requires CONFIG_HAS_IOPORT
     213 |                 outb(LOCK, wdt->io_base + WDT_REG_LOCK);
         |                 ^
   include/asm-generic/io.h:655:14: note: expanded from macro 'outb'
     655 | #define outb _outb
         |              ^
   include/asm-generic/io.h:596:15: note: expanded from macro '_outb'
     596 | #define _outb _outb
         |               ^
   drivers/watchdog/nic7018_wdt.c:229:2: error: call to '_outb' declared with 'error' attribute: outb() requires CONFIG_HAS_IOPORT
     229 |         outb(LOCK, wdt->io_base + WDT_REG_LOCK);
         |         ^
   include/asm-generic/io.h:655:14: note: expanded from macro 'outb'
     655 | #define outb _outb
         |              ^
   include/asm-generic/io.h:596:15: note: expanded from macro '_outb'
     596 | #define _outb _outb
         |               ^
   drivers/watchdog/nic7018_wdt.c:96:2: error: call to '_outb' declared with 'error' attribute: outb() requires CONFIG_HAS_IOPORT
      96 |         outb(counter << 4 | config->divider,
         |         ^
   include/asm-generic/io.h:655:14: note: expanded from macro 'outb'
     655 | #define outb _outb
         |              ^
   include/asm-generic/io.h:596:15: note: expanded from macro '_outb'
     596 | #define _outb _outb
         |               ^
>> drivers/watchdog/nic7018_wdt.c:112:12: error: call to '_inb' declared with 'error' attribute: inb()) requires CONFIG_HAS_IOPORT
     112 |         control = inb(wdt->io_base + WDT_RELOAD_CTRL);
         |                   ^
   include/asm-generic/io.h:643:13: note: expanded from macro 'inb'
     643 | #define inb _inb
         |             ^
   include/asm-generic/io.h:542:14: note: expanded from macro '_inb'
     542 | #define _inb _inb
         |              ^
   drivers/watchdog/nic7018_wdt.c:113:2: error: call to '_outb' declared with 'error' attribute: outb() requires CONFIG_HAS_IOPORT
     113 |         outb(control | WDT_RELOAD_PORT_EN, wdt->io_base + WDT_RELOAD_CTRL);
         |         ^
   include/asm-generic/io.h:655:14: note: expanded from macro 'outb'
     655 | #define outb _outb
         |              ^
   include/asm-generic/io.h:596:15: note: expanded from macro '_outb'
     596 | #define _outb _outb
         |               ^
   drivers/watchdog/nic7018_wdt.c:115:2: error: call to '_outb' declared with 'error' attribute: outb() requires CONFIG_HAS_IOPORT
     115 |         outb(1, wdt->io_base + WDT_RELOAD_PORT);
         |         ^
   include/asm-generic/io.h:655:14: note: expanded from macro 'outb'
     655 | #define outb _outb
         |              ^
   include/asm-generic/io.h:596:15: note: expanded from macro '_outb'
     596 | #define _outb _outb
         |               ^
   drivers/watchdog/nic7018_wdt.c:117:12: error: call to '_inb' declared with 'error' attribute: inb()) requires CONFIG_HAS_IOPORT
     117 |         control = inb(wdt->io_base + WDT_CTRL);
         |                   ^
   include/asm-generic/io.h:643:13: note: expanded from macro 'inb'
     643 | #define inb _inb
         |             ^
   include/asm-generic/io.h:542:14: note: expanded from macro '_inb'
     542 | #define _inb _inb
         |              ^
   drivers/watchdog/nic7018_wdt.c:118:2: error: call to '_outb' declared with 'error' attribute: outb() requires CONFIG_HAS_IOPORT
     118 |         outb(control | WDT_CTRL_RESET_EN, wdt->io_base + WDT_CTRL);
         |         ^
   include/asm-generic/io.h:655:14: note: expanded from macro 'outb'
     655 | #define outb _outb
         |              ^
   include/asm-generic/io.h:596:15: note: expanded from macro '_outb'
     596 | #define _outb _outb
         |               ^
   drivers/watchdog/nic7018_wdt.c:127:2: error: call to '_outb' declared with 'error' attribute: outb() requires CONFIG_HAS_IOPORT
     127 |         outb(0, wdt->io_base + WDT_CTRL);
         |         ^
   include/asm-generic/io.h:655:14: note: expanded from macro 'outb'
     655 | #define outb _outb
         |              ^
   include/asm-generic/io.h:596:15: note: expanded from macro '_outb'
     596 | #define _outb _outb
         |               ^
   drivers/watchdog/nic7018_wdt.c:128:2: error: call to '_outb' declared with 'error' attribute: outb() requires CONFIG_HAS_IOPORT
     128 |         outb(0, wdt->io_base + WDT_RELOAD_CTRL);
         |         ^
   include/asm-generic/io.h:655:14: note: expanded from macro 'outb'
     655 | #define outb _outb
         |              ^
   include/asm-generic/io.h:596:15: note: expanded from macro '_outb'
     596 | #define _outb _outb
         |               ^
   drivers/watchdog/nic7018_wdt.c:129:2: error: call to '_outb' declared with 'error' attribute: outb() requires CONFIG_HAS_IOPORT
     129 |         outb(0xF0, wdt->io_base + WDT_PRESET_PRESCALE);
         |         ^
   include/asm-generic/io.h:655:14: note: expanded from macro 'outb'
     655 | #define outb _outb
         |              ^
   include/asm-generic/io.h:596:15: note: expanded from macro '_outb'
     596 | #define _outb _outb
         |               ^
   drivers/watchdog/nic7018_wdt.c:138:2: error: call to '_outb' declared with 'error' attribute: outb() requires CONFIG_HAS_IOPORT
     138 |         outb(1, wdt->io_base + WDT_RELOAD_PORT);
         |         ^
   include/asm-generic/io.h:655:14: note: expanded from macro 'outb'
     655 | #define outb _outb
         |              ^
   include/asm-generic/io.h:596:15: note: expanded from macro '_outb'
     596 | #define _outb _outb
         |               ^
   drivers/watchdog/nic7018_wdt.c:96:2: error: call to '_outb' declared with 'error' attribute: outb() requires CONFIG_HAS_IOPORT
      96 |         outb(counter << 4 | config->divider,
         |         ^
   include/asm-generic/io.h:655:14: note: expanded from macro 'outb'
     655 | #define outb _outb
         |              ^
   include/asm-generic/io.h:596:15: note: expanded from macro '_outb'
     596 | #define _outb _outb
         |               ^
   drivers/watchdog/nic7018_wdt.c:148:10: error: call to '_inb' declared with 'error' attribute: inb()) requires CONFIG_HAS_IOPORT
     148 |         count = inb(wdt->io_base + WDT_COUNT) & 0xF;
         |                 ^
   include/asm-generic/io.h:643:13: note: expanded from macro 'inb'
     643 | #define inb _inb
         |             ^
   include/asm-generic/io.h:542:14: note: expanded from macro '_inb'
     542 | #define _inb _inb
         |              ^
   3 warnings and 15 errors generated.


vim +209 drivers/watchdog/nic7018_wdt.c

98078ca34a0a71 Hui Chun Ong 2016-12-28  104  
98078ca34a0a71 Hui Chun Ong 2016-12-28  105  static int nic7018_start(struct watchdog_device *wdd)
98078ca34a0a71 Hui Chun Ong 2016-12-28  106  {
98078ca34a0a71 Hui Chun Ong 2016-12-28  107  	struct nic7018_wdt *wdt = watchdog_get_drvdata(wdd);
98078ca34a0a71 Hui Chun Ong 2016-12-28  108  	u8 control;
98078ca34a0a71 Hui Chun Ong 2016-12-28  109  
98078ca34a0a71 Hui Chun Ong 2016-12-28  110  	nic7018_set_timeout(wdd, wdd->timeout);
98078ca34a0a71 Hui Chun Ong 2016-12-28  111  
98078ca34a0a71 Hui Chun Ong 2016-12-28 @112  	control = inb(wdt->io_base + WDT_RELOAD_CTRL);
98078ca34a0a71 Hui Chun Ong 2016-12-28  113  	outb(control | WDT_RELOAD_PORT_EN, wdt->io_base + WDT_RELOAD_CTRL);
98078ca34a0a71 Hui Chun Ong 2016-12-28  114  
98078ca34a0a71 Hui Chun Ong 2016-12-28  115  	outb(1, wdt->io_base + WDT_RELOAD_PORT);
98078ca34a0a71 Hui Chun Ong 2016-12-28  116  
98078ca34a0a71 Hui Chun Ong 2016-12-28  117  	control = inb(wdt->io_base + WDT_CTRL);
98078ca34a0a71 Hui Chun Ong 2016-12-28  118  	outb(control | WDT_CTRL_RESET_EN, wdt->io_base + WDT_CTRL);
98078ca34a0a71 Hui Chun Ong 2016-12-28  119  
98078ca34a0a71 Hui Chun Ong 2016-12-28  120  	return 0;
98078ca34a0a71 Hui Chun Ong 2016-12-28  121  }
98078ca34a0a71 Hui Chun Ong 2016-12-28  122  
98078ca34a0a71 Hui Chun Ong 2016-12-28  123  static int nic7018_stop(struct watchdog_device *wdd)
98078ca34a0a71 Hui Chun Ong 2016-12-28  124  {
98078ca34a0a71 Hui Chun Ong 2016-12-28  125  	struct nic7018_wdt *wdt = watchdog_get_drvdata(wdd);
98078ca34a0a71 Hui Chun Ong 2016-12-28  126  
98078ca34a0a71 Hui Chun Ong 2016-12-28  127  	outb(0, wdt->io_base + WDT_CTRL);
98078ca34a0a71 Hui Chun Ong 2016-12-28  128  	outb(0, wdt->io_base + WDT_RELOAD_CTRL);
98078ca34a0a71 Hui Chun Ong 2016-12-28  129  	outb(0xF0, wdt->io_base + WDT_PRESET_PRESCALE);
98078ca34a0a71 Hui Chun Ong 2016-12-28  130  
98078ca34a0a71 Hui Chun Ong 2016-12-28  131  	return 0;
98078ca34a0a71 Hui Chun Ong 2016-12-28  132  }
98078ca34a0a71 Hui Chun Ong 2016-12-28  133  
98078ca34a0a71 Hui Chun Ong 2016-12-28  134  static int nic7018_ping(struct watchdog_device *wdd)
98078ca34a0a71 Hui Chun Ong 2016-12-28  135  {
98078ca34a0a71 Hui Chun Ong 2016-12-28  136  	struct nic7018_wdt *wdt = watchdog_get_drvdata(wdd);
98078ca34a0a71 Hui Chun Ong 2016-12-28  137  
98078ca34a0a71 Hui Chun Ong 2016-12-28  138  	outb(1, wdt->io_base + WDT_RELOAD_PORT);
98078ca34a0a71 Hui Chun Ong 2016-12-28  139  
98078ca34a0a71 Hui Chun Ong 2016-12-28  140  	return 0;
98078ca34a0a71 Hui Chun Ong 2016-12-28  141  }
98078ca34a0a71 Hui Chun Ong 2016-12-28  142  
98078ca34a0a71 Hui Chun Ong 2016-12-28  143  static unsigned int nic7018_get_timeleft(struct watchdog_device *wdd)
98078ca34a0a71 Hui Chun Ong 2016-12-28  144  {
98078ca34a0a71 Hui Chun Ong 2016-12-28  145  	struct nic7018_wdt *wdt = watchdog_get_drvdata(wdd);
98078ca34a0a71 Hui Chun Ong 2016-12-28  146  	u8 count;
98078ca34a0a71 Hui Chun Ong 2016-12-28  147  
98078ca34a0a71 Hui Chun Ong 2016-12-28  148  	count = inb(wdt->io_base + WDT_COUNT) & 0xF;
98078ca34a0a71 Hui Chun Ong 2016-12-28  149  	if (!count)
98078ca34a0a71 Hui Chun Ong 2016-12-28  150  		return 0;
98078ca34a0a71 Hui Chun Ong 2016-12-28  151  
98078ca34a0a71 Hui Chun Ong 2016-12-28  152  	return nic7018_timeout(wdt->period, count);
98078ca34a0a71 Hui Chun Ong 2016-12-28  153  }
98078ca34a0a71 Hui Chun Ong 2016-12-28  154  
98078ca34a0a71 Hui Chun Ong 2016-12-28  155  static const struct watchdog_info nic7018_wdd_info = {
98078ca34a0a71 Hui Chun Ong 2016-12-28  156  	.options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING | WDIOF_MAGICCLOSE,
98078ca34a0a71 Hui Chun Ong 2016-12-28  157  	.identity = "NIC7018 Watchdog",
98078ca34a0a71 Hui Chun Ong 2016-12-28  158  };
98078ca34a0a71 Hui Chun Ong 2016-12-28  159  
98078ca34a0a71 Hui Chun Ong 2016-12-28  160  static const struct watchdog_ops nic7018_wdd_ops = {
98078ca34a0a71 Hui Chun Ong 2016-12-28  161  	.owner = THIS_MODULE,
98078ca34a0a71 Hui Chun Ong 2016-12-28  162  	.start = nic7018_start,
98078ca34a0a71 Hui Chun Ong 2016-12-28  163  	.stop = nic7018_stop,
98078ca34a0a71 Hui Chun Ong 2016-12-28  164  	.ping = nic7018_ping,
98078ca34a0a71 Hui Chun Ong 2016-12-28  165  	.set_timeout = nic7018_set_timeout,
98078ca34a0a71 Hui Chun Ong 2016-12-28  166  	.get_timeleft = nic7018_get_timeleft,
98078ca34a0a71 Hui Chun Ong 2016-12-28  167  };
98078ca34a0a71 Hui Chun Ong 2016-12-28  168  
98078ca34a0a71 Hui Chun Ong 2016-12-28  169  static int nic7018_probe(struct platform_device *pdev)
98078ca34a0a71 Hui Chun Ong 2016-12-28  170  {
98078ca34a0a71 Hui Chun Ong 2016-12-28  171  	struct device *dev = &pdev->dev;
98078ca34a0a71 Hui Chun Ong 2016-12-28  172  	struct watchdog_device *wdd;
98078ca34a0a71 Hui Chun Ong 2016-12-28  173  	struct nic7018_wdt *wdt;
98078ca34a0a71 Hui Chun Ong 2016-12-28  174  	struct resource *io_rc;
98078ca34a0a71 Hui Chun Ong 2016-12-28  175  	int ret;
98078ca34a0a71 Hui Chun Ong 2016-12-28  176  
98078ca34a0a71 Hui Chun Ong 2016-12-28  177  	wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL);
98078ca34a0a71 Hui Chun Ong 2016-12-28  178  	if (!wdt)
98078ca34a0a71 Hui Chun Ong 2016-12-28  179  		return -ENOMEM;
98078ca34a0a71 Hui Chun Ong 2016-12-28  180  
98078ca34a0a71 Hui Chun Ong 2016-12-28  181  	platform_set_drvdata(pdev, wdt);
98078ca34a0a71 Hui Chun Ong 2016-12-28  182  
98078ca34a0a71 Hui Chun Ong 2016-12-28  183  	io_rc = platform_get_resource(pdev, IORESOURCE_IO, 0);
98078ca34a0a71 Hui Chun Ong 2016-12-28  184  	if (!io_rc) {
98078ca34a0a71 Hui Chun Ong 2016-12-28  185  		dev_err(dev, "missing IO resources\n");
98078ca34a0a71 Hui Chun Ong 2016-12-28  186  		return -EINVAL;
98078ca34a0a71 Hui Chun Ong 2016-12-28  187  	}
98078ca34a0a71 Hui Chun Ong 2016-12-28  188  
98078ca34a0a71 Hui Chun Ong 2016-12-28  189  	if (!devm_request_region(dev, io_rc->start, resource_size(io_rc),
98078ca34a0a71 Hui Chun Ong 2016-12-28  190  				 KBUILD_MODNAME)) {
98078ca34a0a71 Hui Chun Ong 2016-12-28  191  		dev_err(dev, "failed to get IO region\n");
98078ca34a0a71 Hui Chun Ong 2016-12-28  192  		return -EBUSY;
98078ca34a0a71 Hui Chun Ong 2016-12-28  193  	}
98078ca34a0a71 Hui Chun Ong 2016-12-28  194  
98078ca34a0a71 Hui Chun Ong 2016-12-28  195  	wdt->io_base = io_rc->start;
98078ca34a0a71 Hui Chun Ong 2016-12-28  196  	wdd = &wdt->wdd;
98078ca34a0a71 Hui Chun Ong 2016-12-28  197  	wdd->info = &nic7018_wdd_info;
98078ca34a0a71 Hui Chun Ong 2016-12-28  198  	wdd->ops = &nic7018_wdd_ops;
98078ca34a0a71 Hui Chun Ong 2016-12-28  199  	wdd->min_timeout = WDT_MIN_TIMEOUT;
98078ca34a0a71 Hui Chun Ong 2016-12-28  200  	wdd->max_timeout = WDT_MAX_TIMEOUT;
98078ca34a0a71 Hui Chun Ong 2016-12-28  201  	wdd->timeout = WDT_DEFAULT_TIMEOUT;
98078ca34a0a71 Hui Chun Ong 2016-12-28  202  	wdd->parent = dev;
98078ca34a0a71 Hui Chun Ong 2016-12-28  203  
98078ca34a0a71 Hui Chun Ong 2016-12-28  204  	watchdog_set_drvdata(wdd, wdt);
98078ca34a0a71 Hui Chun Ong 2016-12-28  205  	watchdog_set_nowayout(wdd, nowayout);
14fad5d98d9043 Wolfram Sang 2019-04-19  206  	watchdog_init_timeout(wdd, timeout, dev);
98078ca34a0a71 Hui Chun Ong 2016-12-28  207  
98078ca34a0a71 Hui Chun Ong 2016-12-28  208  	/* Unlock WDT register */
98078ca34a0a71 Hui Chun Ong 2016-12-28 @209  	outb(UNLOCK, wdt->io_base + WDT_REG_LOCK);
98078ca34a0a71 Hui Chun Ong 2016-12-28  210  
98078ca34a0a71 Hui Chun Ong 2016-12-28  211  	ret = watchdog_register_device(wdd);
98078ca34a0a71 Hui Chun Ong 2016-12-28  212  	if (ret) {
98078ca34a0a71 Hui Chun Ong 2016-12-28  213  		outb(LOCK, wdt->io_base + WDT_REG_LOCK);
98078ca34a0a71 Hui Chun Ong 2016-12-28  214  		return ret;
98078ca34a0a71 Hui Chun Ong 2016-12-28  215  	}
98078ca34a0a71 Hui Chun Ong 2016-12-28  216  
98078ca34a0a71 Hui Chun Ong 2016-12-28  217  	dev_dbg(dev, "io_base=0x%04X, timeout=%d, nowayout=%d\n",
98078ca34a0a71 Hui Chun Ong 2016-12-28  218  		wdt->io_base, timeout, nowayout);
98078ca34a0a71 Hui Chun Ong 2016-12-28  219  	return 0;
98078ca34a0a71 Hui Chun Ong 2016-12-28  220  }
98078ca34a0a71 Hui Chun Ong 2016-12-28  221  

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ