netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: a0282524688@gmail.com, lee@kernel.org, linus.walleij@linaro.org,
	brgl@bgdev.pl, andi.shyti@kernel.org, mkl@pengutronix.de,
	mailhol.vincent@wanadoo.fr, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, wim@linux-watchdog.org, linux@roeck-us.net,
	jdelvare@suse.com, alexandre.belloni@bootlin.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
	linux-i2c@vger.kernel.org, linux-can@vger.kernel.org,
	netdev@vger.kernel.org, linux-watchdog@vger.kernel.org,
	linux-hwmon@vger.kernel.org, linux-rtc@vger.kernel.org,
	linux-usb@vger.kernel.org, Ming Yu <tmyu0@nuvoton.com>
Subject: Re: [PATCH v10 4/7] can: Add Nuvoton NCT6694 CANFD support
Date: Thu, 8 May 2025 00:18:37 +0800	[thread overview]
Message-ID: <202505072336.mhh6H9Ma-lkp@intel.com> (raw)
In-Reply-To: <20250423094058.1656204-5-tmyu0@nuvoton.com>

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@intel.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

  parent reply	other threads:[~2025-05-07 16:19 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-23  9:40 [PATCH v10 0/7] Add Nuvoton NCT6694 MFD drivers a0282524688
2025-04-23  9:40 ` [PATCH v10 1/7] mfd: Add core driver for Nuvoton NCT6694 a0282524688
2025-05-01 12:22   ` Lee Jones
2025-05-02  2:02     ` Ming Yu
2025-05-02  8:07       ` Lee Jones
2025-05-02  9:04         ` Ming Yu
2025-05-09 14:28           ` Lee Jones
2025-05-12  8:48             ` Ming Yu
2025-04-23  9:40 ` [PATCH v10 2/7] gpio: Add Nuvoton NCT6694 GPIO support a0282524688
2025-04-23  9:40 ` [PATCH v10 3/7] i2c: Add Nuvoton NCT6694 I2C support a0282524688
2025-04-25 11:13   ` Andi Shyti
2025-04-23  9:40 ` [PATCH v10 4/7] can: Add Nuvoton NCT6694 CANFD support a0282524688
2025-05-03 13:57   ` Marc Kleine-Budde
2025-05-08  3:26     ` Ming Yu
2025-05-08 15:08       ` Marc Kleine-Budde
2025-05-09  5:39         ` Ming Yu
2025-05-07 16:18   ` kernel test robot [this message]
2025-04-23  9:40 ` [PATCH v10 5/7] watchdog: Add Nuvoton NCT6694 WDT support a0282524688
2025-04-23  9:40 ` [PATCH v10 6/7] hwmon: Add Nuvoton NCT6694 HWMON support a0282524688
2025-04-23  9:40 ` [PATCH v10 7/7] rtc: Add Nuvoton NCT6694 RTC support a0282524688

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=202505072336.mhh6H9Ma-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=a0282524688@gmail.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andi.shyti@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=brgl@bgdev.pl \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jdelvare@suse.com \
    --cc=kuba@kernel.org \
    --cc=lee@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=llvm@lists.linux.dev \
    --cc=mailhol.vincent@wanadoo.fr \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=tmyu0@nuvoton.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).