From: kernel test robot <lkp@intel.com>
To: Leo Yang <leo.yang.sy0@gmail.com>,
jdelvare@suse.com, linux@roeck-us.net, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org, Leo-Yang@quantatw.com,
corbet@lwn.net, Delphine_CC_Chiu@wiwynn.com,
linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH 2/2] hwmon: Add driver for TI INA233 Current and Power Monitor
Date: Thu, 9 Jan 2025 22:59:00 +0800 [thread overview]
Message-ID: <202501092213.X9mbPW5Q-lkp@intel.com> (raw)
In-Reply-To: <20250106071337.3017926-3-Leo-Yang@quantatw.com>
Hi Leo,
kernel test robot noticed the following build errors:
[auto build test ERROR on groeck-staging/hwmon-next]
[also build test ERROR on linus/master v6.13-rc6 next-20250109]
[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/Leo-Yang/dt-bindings-Add-INA233-device/20250106-151934
base: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next
patch link: https://lore.kernel.org/r/20250106071337.3017926-3-Leo-Yang%40quantatw.com
patch subject: [PATCH 2/2] hwmon: Add driver for TI INA233 Current and Power Monitor
config: i386-randconfig-r072-20250109 (https://download.01.org/0day-ci/archive/20250109/202501092213.X9mbPW5Q-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250109/202501092213.X9mbPW5Q-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/202501092213.X9mbPW5Q-lkp@intel.com/
All errors (new ones prefixed by >>):
ld: drivers/hwmon/pmbus/ina233.o: in function `calculate_coef':
>> drivers/hwmon/pmbus/ina233.c:59: undefined reference to `__divdi3'
vim +59 drivers/hwmon/pmbus/ina233.c
23
24 static int calculate_coef(int *m, int *R, bool power)
25 {
26 s64 scaled_m;
27 int scale_factor = 0;
28 int scale_coef = 1;
29 int power_coef = 1;
30 bool is_integer = false;
31
32 if (*m == 0) {
33 *R = 0;
34 return -1;
35 }
36
37 if (power)
38 power_coef = 25;
39
40 if (1000000 % *m) {
41 /* Default value, Scaling to keep integer precision,
42 * Change it if you need
43 */
44 scale_factor = -3;
45 scale_coef = 1000;
46 } else {
47 is_integer = true;
48 }
49
50 /*
51 * Unit Conversion (Current_LSB A->uA) and use scaling(scale_factor)
52 * to keep integer precision.
53 * Formulae referenced from spec.
54 */
55 scaled_m = div_s64(1000000 * scale_coef, *m * power_coef);
56
57 /* Maximize while keeping it bounded.*/
58 while (scaled_m > MAX_M_VAL || scaled_m < MIN_M_VAL) {
> 59 scaled_m /= 10;
60 scale_factor++;
61 }
62 /* Scale up only if fractional part exists. */
63 while (scaled_m * 10 < MAX_M_VAL && scaled_m * 10 > MIN_M_VAL && !is_integer) {
64 scaled_m *= 10;
65 scale_factor--;
66 }
67
68 *m = scaled_m;
69 *R = scale_factor;
70 return 0;
71 }
72
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2025-01-09 14:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-06 7:13 [PATCH 0/2] hwmon: Add support for INA233 Leo Yang
2025-01-06 7:13 ` [PATCH 1/2] dt-bindings: Add INA233 device Leo Yang
2025-01-06 10:50 ` Krzysztof Kozlowski
2025-01-06 15:06 ` Guenter Roeck
2025-01-06 14:56 ` Rob Herring (Arm)
2025-01-06 7:13 ` [PATCH 2/2] hwmon: Add driver for TI INA233 Current and Power Monitor Leo Yang
2025-01-06 9:45 ` kernel test robot
2025-01-06 10:52 ` Krzysztof Kozlowski
2025-01-06 15:31 ` Guenter Roeck
2025-01-09 0:50 ` Leo Yang
2025-01-09 3:04 ` Guenter Roeck
2025-01-07 17:08 ` kernel test robot
2025-01-09 10:15 ` kernel test robot
2025-01-09 14:59 ` 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=202501092213.X9mbPW5Q-lkp@intel.com \
--to=lkp@intel.com \
--cc=Delphine_CC_Chiu@wiwynn.com \
--cc=Leo-Yang@quantatw.com \
--cc=conor+dt@kernel.org \
--cc=corbet@lwn.net \
--cc=devicetree@vger.kernel.org \
--cc=jdelvare@suse.com \
--cc=krzk+dt@kernel.org \
--cc=leo.yang.sy0@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=robh@kernel.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).