From: kernel test robot <lkp@intel.com>
To: Medad CChien <medadyoung@gmail.com>,
rric@kernel.org, james.morse@arm.com, tony.luck@intel.com,
mchehab@kernel.org, bp@alien8.de, robh+dt@kernel.org,
benjaminfair@google.com, yuenn@google.com, venture@google.com,
KWLIU@nuvoton.com, YSCHU@nuvoton.com, JJLIU0@nuvoton.com,
KFTING@nuvoton.com, avifishman70@gmail.com, tmaimon77@gmail.com,
tali.perry1@gmail.com, ctcchien@nuvoton.com
Cc: kbuild-all@lists.01.org, linux-edac@vger.kernel.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
openbmc@lists.ozlabs.org
Subject: Re: [PATCH v3 3/3] EDAC: nuvoton: Add NPCM memory controller driver
Date: Sat, 12 Mar 2022 07:25:37 +0800 [thread overview]
Message-ID: <202203120713.ExrZZZo2-lkp@intel.com> (raw)
In-Reply-To: <20220311014245.4612-4-ctcchien@nuvoton.com>
Hi Medad,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on ras/edac-for-next]
[also build test ERROR on robh/for-next v5.17-rc7 next-20220310]
[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]
url: https://github.com/0day-ci/linux/commits/Medad-CChien/EDAC-nuvoton-Add-nuvoton-NPCM-memory-controller-driver/20220311-094500
base: https://git.kernel.org/pub/scm/linux/kernel/git/ras/ras.git edac-for-next
config: arm-allmodconfig (https://download.01.org/0day-ci/archive/20220312/202203120713.ExrZZZo2-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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/0day-ci/linux/commit/6cb0bb6039e1ce83a8d67c6d571abd2a45e82b10
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Medad-CChien/EDAC-nuvoton-Add-nuvoton-NPCM-memory-controller-driver/20220311-094500
git checkout 6cb0bb6039e1ce83a8d67c6d571abd2a45e82b10
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash arch/arm/kernel/ arch/arm/mach-imx/ arch/arm/mach-omap2/ arch/arm/mach-socfpga/ arch/arm/mach-tegra/ drivers/edac/
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/edac/npcm_edac.c: In function 'forced_ecc_error_store':
drivers/edac/npcm_edac.c:370:13: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Wparentheses]
370 | if (!readl(priv->reg + npcm_chip->ecc_ctl_en_reg) & npcm_chip->ecc_ctl_ecc_enable_mask)
>> drivers/edac/npcm_edac.c:386:92: error: macro "edac_printk" requires 4 arguments, but only 2 given
386 | edac_printk(KERN_INFO, "bit_no for checkcode must be 0~7\n");
| ^
In file included from drivers/edac/edac_module.h:14,
from drivers/edac/npcm_edac.c:15:
drivers/edac/edac_mc.h:48: note: macro "edac_printk" defined here
48 | #define edac_printk(level, prefix, fmt, arg...) \
|
>> drivers/edac/npcm_edac.c:386:33: error: 'edac_printk' undeclared (first use in this function); did you mean '_dev_printk'?
386 | edac_printk(KERN_INFO, "bit_no for checkcode must be 0~7\n");
| ^~~~~~~~~~~
| _dev_printk
drivers/edac/npcm_edac.c:386:33: note: each undeclared identifier is reported only once for each function it appears in
drivers/edac/npcm_edac.c:395:88: error: macro "edac_printk" requires 4 arguments, but only 2 given
395 | edac_printk(KERN_INFO, "bit_no for data must be 0~63\n");
| ^
In file included from drivers/edac/edac_module.h:14,
from drivers/edac/npcm_edac.c:15:
drivers/edac/edac_mc.h:48: note: macro "edac_printk" defined here
48 | #define edac_printk(level, prefix, fmt, arg...) \
|
drivers/edac/npcm_edac.c: In function 'npcm_edac_mc_probe':
drivers/edac/npcm_edac.c:583:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
583 | u32 ecc_en = readl(reg + npcm_chip->ecc_ctl_en_reg);
| ^~~
vim +/edac_printk +386 drivers/edac/npcm_edac.c
352
353 static ssize_t forced_ecc_error_store(struct device *dev,
354 struct device_attribute *mattr,
355 const char *data, size_t count)
356 {
357 struct mem_ctl_info *mci = to_mci(dev);
358 struct priv_data *priv = mci->pvt_info;
359 const struct npcm_edac_platform_data *npcm_chip = priv->npcm_chip;
360 int args_cnt;
361 int ret;
362 char **args;
363 u32 regval;
364 u8 bit_no;
365
366 /* Split string buffer into separate parameters */
367 args = argv_split(GFP_KERNEL, data, &args_cnt);
368
369 /* Check ecc enabled */
370 if (!readl(priv->reg + npcm_chip->ecc_ctl_en_reg) & npcm_chip->ecc_ctl_ecc_enable_mask)
371 return count;
372
373 /* Check no write operation pending to controller*/
374 while (readl(priv->reg + npcm_chip->ddr_ctl_controller_busy_reg) &
375 CTL_CONTROLLER_BUSY_FLAG) {
376 usleep_range(1000, 10000);
377 }
378
379 /* Write appropriate syndrome to xor_check_bit*/
380 if (!strcmp(args[0], "CE") && args_cnt == 3) {
381 ret = kstrtou8(args[2], 0, &bit_no);
382 if (ret)
383 return ret;
384 if (!strcmp(args[1], "checkcode")) {
385 if (bit_no > 7) {
> 386 edac_printk(KERN_INFO, "bit_no for checkcode must be 0~7\n");
387 return count;
388 }
389 regval = readl(priv->reg + npcm_chip->ecc_ctl_xor_check_bits_reg);
390 regval = (regval & ~(NPCM_ECC_CTL_XOR_BITS_MASK)) |
391 (check_synd[bit_no] << XOR_CHECK_BIT_SPLIT_WIDTH);
392 writel(regval, priv->reg + npcm_chip->ecc_ctl_xor_check_bits_reg);
393 } else if (!strcmp(args[1], "data")) {
394 if (bit_no > 63) {
395 edac_printk(KERN_INFO, "bit_no for data must be 0~63\n");
396 return count;
397 }
398 regval = readl(priv->reg + npcm_chip->ecc_ctl_xor_check_bits_reg);
399 regval = (regval & ~(NPCM_ECC_CTL_XOR_BITS_MASK)) |
400 (data_synd[bit_no] << XOR_CHECK_BIT_SPLIT_WIDTH);
401 writel(regval, priv->reg + npcm_chip->ecc_ctl_xor_check_bits_reg);
402 }
403 /* Enable the ECC writeback_en for corrected error */
404 regval = readl(priv->reg + npcm_chip->ecc_ctl_xor_check_bits_reg);
405 writel((regval | NPCM_ECC_CTL_AUTO_WRITEBACK_EN),
406 priv->reg + npcm_chip->ecc_ctl_xor_check_bits_reg);
407 } else if (!strcmp(args[0], "UE")) {
408 regval = readl(priv->reg + npcm_chip->ecc_ctl_xor_check_bits_reg);
409 regval = (regval & ~(NPCM_ECC_CTL_XOR_BITS_MASK)) |
410 (ECC_DOUBLE_MULTI_ERR_SYND << XOR_CHECK_BIT_SPLIT_WIDTH);
411 writel(regval, priv->reg + npcm_chip->ecc_ctl_xor_check_bits_reg);
412 }
413
414 /* Assert fwc */
415 writel((NPCM_ECC_CTL_FORCE_WC | readl(priv->reg + npcm_chip->ecc_ctl_xor_check_bits_reg)),
416 priv->reg + npcm_chip->ecc_ctl_xor_check_bits_reg);
417
418 return count;
419 }
420
---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
prev parent reply other threads:[~2022-03-11 23:26 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-11 1:42 [PATCH v3 0/3] EDAC: nuvoton: Add nuvoton NPCM memory controller driver Medad CChien
2022-03-11 1:42 ` [PATCH v3 1/3] ARM: dts: nuvoton: Add new device node Medad CChien
2022-03-11 8:58 ` Krzysztof Kozlowski
2022-03-14 5:22 ` Medad Young
2022-03-12 2:31 ` Jonathan Neuschäfer
2022-03-14 5:22 ` Medad Young
2022-03-11 1:42 ` [PATCH v3 2/3] dt-bindings: edac: nuvoton,npcm-memory-controller.yaml Medad CChien
2022-03-11 8:58 ` Krzysztof Kozlowski
2022-03-11 13:28 ` Rob Herring
2022-03-11 1:42 ` [PATCH v3 3/3] EDAC: nuvoton: Add NPCM memory controller driver Medad CChien
2022-03-11 9:15 ` Krzysztof Kozlowski
2022-03-13 20:22 ` Avi Fishman
2022-03-14 7:35 ` Krzysztof Kozlowski
2022-03-14 8:23 ` Medad Young
2022-03-14 5:32 ` Medad Young
2022-03-14 7:36 ` Krzysztof Kozlowski
2022-03-14 8:24 ` Medad Young
2022-03-11 23:25 ` kernel test robot [this message]
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=202203120713.ExrZZZo2-lkp@intel.com \
--to=lkp@intel.com \
--cc=JJLIU0@nuvoton.com \
--cc=KFTING@nuvoton.com \
--cc=KWLIU@nuvoton.com \
--cc=YSCHU@nuvoton.com \
--cc=avifishman70@gmail.com \
--cc=benjaminfair@google.com \
--cc=bp@alien8.de \
--cc=ctcchien@nuvoton.com \
--cc=devicetree@vger.kernel.org \
--cc=james.morse@arm.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=medadyoung@gmail.com \
--cc=openbmc@lists.ozlabs.org \
--cc=robh+dt@kernel.org \
--cc=rric@kernel.org \
--cc=tali.perry1@gmail.com \
--cc=tmaimon77@gmail.com \
--cc=tony.luck@intel.com \
--cc=venture@google.com \
--cc=yuenn@google.com \
/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).