From: kernel test robot <lkp@intel.com>
To: Christian Marangi <ansuelsmth@gmail.com>,
Wim Van Sebroeck <wim@linux-watchdog.org>,
Guenter Roeck <linux@roeck-us.net>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Lorenzo Bianconi <lorenzo@kernel.org>,
upstream@airoha.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH 2/2] watchdog: Add support for Airoha EN7851 watchdog
Date: Sun, 22 Sep 2024 14:16:00 +0800 [thread overview]
Message-ID: <202409221503.OVlRRuM7-lkp@intel.com> (raw)
In-Reply-To: <20240919122759.10456-2-ansuelsmth@gmail.com>
Hi Christian,
kernel test robot noticed the following build errors:
[auto build test ERROR on robh/for-next]
[also build test ERROR on groeck-staging/hwmon-next linus/master v6.11 next-20240920]
[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/Christian-Marangi/watchdog-Add-support-for-Airoha-EN7851-watchdog/20240919-203006
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link: https://lore.kernel.org/r/20240919122759.10456-2-ansuelsmth%40gmail.com
patch subject: [PATCH 2/2] watchdog: Add support for Airoha EN7851 watchdog
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20240922/202409221503.OVlRRuM7-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project 8663a75fa2f31299ab8d1d90288d9df92aadee88)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240922/202409221503.OVlRRuM7-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/202409221503.OVlRRuM7-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from drivers/watchdog/airoha_wdt.c:17:
In file included from include/linux/io.h:14:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:548:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
548 | val = __raw_readb(PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:561:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
561 | val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
| ^
In file included from drivers/watchdog/airoha_wdt.c:17:
In file included from include/linux/io.h:14:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:574:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
574 | val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
| ~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
| ^
In file included from drivers/watchdog/airoha_wdt.c:17:
In file included from include/linux/io.h:14:
In file included from arch/hexagon/include/asm/io.h:328:
include/asm-generic/io.h:585:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
585 | __raw_writeb(value, PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:595:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
595 | __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
include/asm-generic/io.h:605:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
605 | __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
| ~~~~~~~~~~ ^
>> drivers/watchdog/airoha_wdt.c:155:26: error: call to undeclared function 'FIELD_MAX'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
155 | wdog_dev->max_timeout = FIELD_MAX(WDT_TIMER_VAL) / airoha_wdt->wdt_freq;
| ^
6 warnings and 1 error generated.
vim +/FIELD_MAX +155 drivers/watchdog/airoha_wdt.c
125
126 static int airoha_wdt_probe(struct platform_device *pdev)
127 {
128 struct device *dev = &pdev->dev;
129 struct watchdog_device *wdog_dev;
130 struct airoha_wdt_desc *airoha_wdt;
131 int ret;
132
133 airoha_wdt = devm_kzalloc(dev, sizeof(*airoha_wdt), GFP_KERNEL);
134 if (!airoha_wdt)
135 return -ENOMEM;
136
137 airoha_wdt->base = devm_platform_ioremap_resource(pdev, 0);
138 if (IS_ERR(airoha_wdt->base))
139 return PTR_ERR(airoha_wdt->base);
140
141 ret = device_property_read_u32(dev, "clock-frequency",
142 &airoha_wdt->wdt_freq);
143 if (ret)
144 return -EINVAL;
145
146 /* Watchdog ticks at half the bus rate */
147 airoha_wdt->wdt_freq /= 2;
148
149 /* Initialize struct watchdog device */
150 wdog_dev = &airoha_wdt->wdog_dev;
151 wdog_dev->timeout = heartbeat;
152 wdog_dev->info = &airoha_wdt_info;
153 wdog_dev->ops = &airoha_wdt_ops;
154 /* Bus 300MHz, watchdog 150MHz, 28 seconds */
> 155 wdog_dev->max_timeout = FIELD_MAX(WDT_TIMER_VAL) / airoha_wdt->wdt_freq;
156 wdog_dev->parent = dev;
157
158 watchdog_set_drvdata(wdog_dev, airoha_wdt);
159 watchdog_set_nowayout(wdog_dev, nowayout);
160 watchdog_stop_on_unregister(wdog_dev);
161
162 ret = devm_watchdog_register_device(dev, wdog_dev);
163 if (ret)
164 return ret;
165
166 platform_set_drvdata(pdev, airoha_wdt);
167 return 0;
168 }
169
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-09-22 6:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-19 12:26 [PATCH 1/2] dt-bindings: watchdog: airoha: document watchdog for Airoha EN7581 Christian Marangi
2024-09-19 12:26 ` [PATCH 2/2] watchdog: Add support for Airoha EN7851 watchdog Christian Marangi
2024-09-21 17:17 ` kernel test robot
2024-09-22 6:16 ` kernel test robot [this message]
2024-09-19 12:35 ` [PATCH 1/2] dt-bindings: watchdog: airoha: document watchdog for Airoha EN7581 Krzysztof Kozlowski
2024-09-19 12:39 ` Christian Marangi
2024-09-19 12:42 ` Krzysztof Kozlowski
2024-09-25 8:53 ` Christian Marangi
2024-09-19 13:23 ` Guenter Roeck
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=202409221503.OVlRRuM7-lkp@intel.com \
--to=lkp@intel.com \
--cc=ansuelsmth@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=llvm@lists.linux.dev \
--cc=lorenzo@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=robh@kernel.org \
--cc=upstream@airoha.com \
--cc=wim@linux-watchdog.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).