[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202505072336.mhh6H9Ma-lkp@intel.com>
Date: Thu, 8 May 2025 00:18:37 +0800
From: kernel test robot <lkp@...el.com>
To: a0282524688@...il.com, lee@...nel.org, linus.walleij@...aro.org,
brgl@...ev.pl, andi.shyti@...nel.org, mkl@...gutronix.de,
mailhol.vincent@...adoo.fr, andrew+netdev@...n.ch,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, wim@...ux-watchdog.org, linux@...ck-us.net,
jdelvare@...e.com, alexandre.belloni@...tlin.com
Cc: llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org,
linux-i2c@...r.kernel.org, linux-can@...r.kernel.org,
netdev@...r.kernel.org, linux-watchdog@...r.kernel.org,
linux-hwmon@...r.kernel.org, linux-rtc@...r.kernel.org,
linux-usb@...r.kernel.org, Ming Yu <tmyu0@...oton.com>
Subject: Re: [PATCH v10 4/7] can: Add Nuvoton NCT6694 CANFD support
Hi,
kernel test robot noticed the following build errors:
[auto build test ERROR on lee-mfd/for-mfd-next]
[also build test ERROR on brgl/gpio/for-next andi-shyti/i2c/i2c-host mkl-can-next/testing groeck-staging/hwmon-next abelloni/rtc-next linus/master lee-mfd/for-mfd-fixes v6.15-rc5 next-20250507]
[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/a0282524688-gmail-com/mfd-Add-core-driver-for-Nuvoton-NCT6694/20250423-174637
base: https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next
patch link: https://lore.kernel.org/r/20250423094058.1656204-5-tmyu0%40nuvoton.com
patch subject: [PATCH v10 4/7] can: Add Nuvoton NCT6694 CANFD support
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20250507/202505072336.mhh6H9Ma-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250507/202505072336.mhh6H9Ma-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/202505072336.mhh6H9Ma-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/net/can/usb/nct6694_canfd.c:543:30: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
543 | setting->nbtp = cpu_to_le32(FIELD_PREP(NCT6694_CANFD_SETTING_NBTP_NSJW,
| ^
include/linux/byteorder/generic.h:88:21: note: expanded from macro 'cpu_to_le32'
88 | #define cpu_to_le32 __cpu_to_le32
| ^
1 error generated.
vim +/FIELD_PREP +543 drivers/net/can/usb/nct6694_canfd.c
512
513 static int nct6694_canfd_start(struct net_device *ndev)
514 {
515 struct nct6694_canfd_priv *priv = netdev_priv(ndev);
516 const struct can_bittiming *d_bt = &priv->can.data_bittiming;
517 const struct can_bittiming *n_bt = &priv->can.bittiming;
518 struct nct6694_canfd_setting *setting __free(kfree) = NULL;
519 const struct nct6694_cmd_header cmd_hd = {
520 .mod = NCT6694_CANFD_MOD,
521 .cmd = NCT6694_CANFD_SETTING,
522 .sel = ndev->dev_port,
523 .len = cpu_to_le16(sizeof(*setting))
524 };
525 int ret;
526
527 setting = kzalloc(sizeof(*setting), GFP_KERNEL);
528 if (!setting)
529 return -ENOMEM;
530
531 if (priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY)
532 setting->ctrl1 |= cpu_to_le16(NCT6694_CANFD_SETTING_CTRL1_MON);
533
534 if (priv->can.ctrlmode & CAN_CTRLMODE_FD_NON_ISO)
535 setting->ctrl1 |= cpu_to_le16(NCT6694_CANFD_SETTING_CTRL1_NISO);
536
537 if (priv->can.ctrlmode & CAN_CTRLMODE_LOOPBACK)
538 setting->ctrl1 |= cpu_to_le16(NCT6694_CANFD_SETTING_CTRL1_LBCK);
539
540 /* Disable clock divider */
541 setting->ctrl2 = 0;
542
> 543 setting->nbtp = cpu_to_le32(FIELD_PREP(NCT6694_CANFD_SETTING_NBTP_NSJW,
544 n_bt->sjw - 1) |
545 FIELD_PREP(NCT6694_CANFD_SETTING_NBTP_NBRP,
546 n_bt->brp - 1) |
547 FIELD_PREP(NCT6694_CANFD_SETTING_NBTP_NTSEG2,
548 n_bt->phase_seg2 - 1) |
549 FIELD_PREP(NCT6694_CANFD_SETTING_NBTP_NTSEG1,
550 n_bt->prop_seg + n_bt->phase_seg1 - 1));
551
552 setting->dbtp = cpu_to_le32(FIELD_PREP(NCT6694_CANFD_SETTING_DBTP_DSJW,
553 d_bt->sjw - 1) |
554 FIELD_PREP(NCT6694_CANFD_SETTING_DBTP_DBRP,
555 d_bt->brp - 1) |
556 FIELD_PREP(NCT6694_CANFD_SETTING_DBTP_DTSEG2,
557 d_bt->phase_seg2 - 1) |
558 FIELD_PREP(NCT6694_CANFD_SETTING_DBTP_DTSEG1,
559 d_bt->prop_seg + d_bt->phase_seg1 - 1));
560
561 setting->active = NCT6694_CANFD_SETTING_ACTIVE_CTRL1 |
562 NCT6694_CANFD_SETTING_ACTIVE_CTRL2 |
563 NCT6694_CANFD_SETTING_ACTIVE_NBTP_DBTP;
564
565 ret = nct6694_write_msg(priv->nct6694, &cmd_hd, setting);
566 if (ret)
567 return ret;
568
569 priv->can.state = CAN_STATE_ERROR_ACTIVE;
570
571 return 0;
572 }
573
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists