All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ming Yu <a0282524688@gmail.com>,
	tmyu0@nuvoton.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: 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
Subject: Re: [PATCH v2 6/7] hwmon: Add Nuvoton NCT6694 HWMON support
Date: Sat, 23 Nov 2024 07:10:04 +0800	[thread overview]
Message-ID: <202411230620.ncqamorB-lkp@intel.com> (raw)
In-Reply-To: <20241121064046.3724726-7-tmyu0@nuvoton.com>

Hi Ming,

kernel test robot noticed the following build errors:

[auto build test ERROR on andi-shyti/i2c/i2c-host]
[also build test ERROR on mkl-can-next/testing groeck-staging/hwmon-next abelloni/rtc-next linus/master lee-mfd/for-mfd-fixes v6.12 next-20241122]
[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/Ming-Yu/mfd-Add-core-driver-for-Nuvoton-NCT6694/20241121-155723
base:   https://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git i2c/i2c-host
patch link:    https://lore.kernel.org/r/20241121064046.3724726-7-tmyu0%40nuvoton.com
patch subject: [PATCH v2 6/7] hwmon: Add Nuvoton NCT6694 HWMON support
config: hexagon-randconfig-r131-20241122 (https://download.01.org/0day-ci/archive/20241123/202411230620.ncqamorB-lkp@intel.com/config)
compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
reproduce: (https://download.01.org/0day-ci/archive/20241123/202411230620.ncqamorB-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/202411230620.ncqamorB-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/hwmon/nct6694-hwmon.c:263:15: error: call to undeclared function 'FIELD_GET'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
                   frac_part = FIELD_GET(NCT6694_LSB_REG_MASK, data->xmit_buf[1]);
                               ^
>> drivers/hwmon/nct6694-hwmon.c:508:10: error: call to undeclared function 'FIELD_PREP'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
                          FIELD_PREP(NCT6694_TIN_HYST_MASK, temp_hyst);
                          ^
   2 errors generated.


vim +/FIELD_GET +263 drivers/hwmon/nct6694-hwmon.c

   238	
   239	static int nct6694_temp_read(struct device *dev, u32 attr, int channel,
   240				     long *val)
   241	{
   242		struct nct6694_hwmon_data *data = dev_get_drvdata(dev);
   243		unsigned char temp_en, temp_hyst;
   244		int ret, int_part, frac_part;
   245		signed char temp_max;
   246	
   247		guard(mutex)(&data->lock);
   248	
   249		switch (attr) {
   250		case hwmon_temp_enable:
   251			temp_en = data->hwmon_en[NCT6694_TIN_EN(channel / 8)];
   252			*val = temp_en & BIT(channel % 8) ? 1 : 0;
   253	
   254			return 0;
   255		case hwmon_temp_input:
   256			ret = nct6694_read_msg(data->nct6694, NCT6694_RPT_MOD,
   257					       NCT6694_TIN_IDX(channel), 2,
   258					       data->xmit_buf);
   259			if (ret)
   260				return ret;
   261	
   262			int_part = sign_extend32(data->xmit_buf[0], 7);
 > 263			frac_part = FIELD_GET(NCT6694_LSB_REG_MASK, data->xmit_buf[1]);
   264			if (int_part < 0)
   265				*val = (int_part + 1) * 1000 - (8 - frac_part) * 125;
   266			else
   267				*val = int_part * 1000 + frac_part * 125;
   268	
   269			return 0;
   270		case hwmon_temp_max:
   271			ret = nct6694_read_msg(data->nct6694, NCT6694_HWMON_MOD,
   272					       NCT6694_HWMON_CMD2_OFFSET,
   273					       NCT6694_HWMON_CMD2_LEN,
   274					       data->xmit_buf);
   275			if (ret)
   276				return ret;
   277	
   278			*val = temp_from_reg(data->xmit_buf[NCT6694_TIN_HL(channel)]);
   279	
   280			return 0;
   281		case hwmon_temp_max_hyst:
   282			ret = nct6694_read_msg(data->nct6694, NCT6694_HWMON_MOD,
   283					       NCT6694_HWMON_CMD2_OFFSET,
   284					       NCT6694_HWMON_CMD2_LEN,
   285					       data->xmit_buf);
   286			if (ret)
   287				return ret;
   288	
   289			temp_max = (signed char)data->xmit_buf[NCT6694_TIN_HL(channel)];
   290			temp_hyst = FIELD_GET(NCT6694_TIN_HYST_MASK,
   291					      data->xmit_buf[NCT6694_TIN_HYST(channel)]);
   292			if (temp_max < 0)
   293				*val = temp_from_reg(temp_max + temp_hyst);
   294			else
   295				*val = temp_from_reg(temp_max - temp_hyst);
   296	
   297			return 0;
   298		case hwmon_temp_max_alarm:
   299			ret = nct6694_read_msg(data->nct6694, NCT6694_RPT_MOD,
   300					       NCT6694_TIN_STS(channel / 8), 1,
   301						   data->xmit_buf);
   302			if (ret)
   303				return ret;
   304	
   305			*val = !!(data->xmit_buf[0] & BIT(channel % 8));
   306	
   307			return 0;
   308		default:
   309			return -EOPNOTSUPP;
   310		}
   311	}
   312	

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

  parent reply	other threads:[~2024-11-22 23:10 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-21  6:40 [PATCH v2 0/7] Add Nuvoton NCT6694 MFD drivers Ming Yu
2024-11-21  6:40 ` [PATCH v2 1/7] mfd: Add core driver for Nuvoton NCT6694 Ming Yu
2024-11-21  6:40 ` [PATCH v2 2/7] gpio: Add Nuvoton NCT6694 GPIO support Ming Yu
2024-11-21  8:28   ` Bartosz Golaszewski
2024-11-22  7:20     ` Ming Yu
2024-11-21  6:40 ` [PATCH v2 3/7] i2c: Add Nuvoton NCT6694 I2C support Ming Yu
2024-11-21  6:40 ` [PATCH v2 4/7] can: Add Nuvoton NCT6694 CAN support Ming Yu
2024-11-21  7:47   ` Vincent Mailhol
2024-11-22  8:03     ` Ming Yu
2024-11-22  8:18       ` Vincent Mailhol
2024-11-22  9:51         ` Ming Yu
2024-11-21  6:40 ` [PATCH v2 5/7] watchdog: Add Nuvoton NCT6694 WDT support Ming Yu
2024-11-21 14:15   ` Guenter Roeck
2024-11-22  8:11     ` Ming Yu
2024-11-21  6:40 ` [PATCH v2 6/7] hwmon: Add Nuvoton NCT6694 HWMON support Ming Yu
2024-11-21 14:22   ` Guenter Roeck
2024-11-22  8:15     ` Ming Yu
2024-11-22 11:51   ` kernel test robot
2024-11-22 23:10   ` kernel test robot [this message]
2024-11-21  6:40 ` [PATCH v2 7/7] rtc: Add Nuvoton NCT6694 RTC support Ming Yu

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=202411230620.ncqamorB-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-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.