[staging:staging-testing 314/401] drivers/iio/common/hid-sensors/hid-sensor-attributes.c:312: undefined reference to `__udivdi3'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://kernel.googlesource.com/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing
head:   74eb9c06b1d722468db397595ac6834b9e4ac235
commit: 473d12f7638c93acbd9296a8cd455b203d5eb528 [314/401] iio: hid-sensor-attributes: Convert to use int_pow()
config: i386-randconfig-e004-201935 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-11) 7.4.0
reproduce:
        git checkout 473d12f7638c93acbd9296a8cd455b203d5eb528
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   ld: drivers/iio/common/hid-sensors/hid-sensor-attributes.o: in function `adjust_exponent_nano':
>> drivers/iio/common/hid-sensors/hid-sensor-attributes.c:312: undefined reference to `__udivdi3'
>> ld: drivers/iio/common/hid-sensors/hid-sensor-attributes.c:314: undefined reference to `__umoddi3'
>> ld: drivers/iio/common/hid-sensors/hid-sensor-attributes.c:324: undefined reference to `__udivdi3'
   ld: drivers/iio/common/hid-sensors/hid-sensor-attributes.c:325: undefined reference to `__umoddi3'
   ld: drivers/iio/common/hid-sensors/hid-sensor-attributes.c:328: undefined reference to `__udivdi3'
   ld: drivers/iio/common/hid-sensors/hid-sensor-attributes.c:330: undefined reference to `__umoddi3'
   ld: drivers/iio/common/hid-sensors/hid-sensor-attributes.o: in function `split_micro_fraction':
   drivers/iio/common/hid-sensors/hid-sensor-attributes.c:96: undefined reference to `__udivdi3'
   ld: drivers/iio/common/hid-sensors/hid-sensor-attributes.c:97: undefined reference to `__umoddi3'
   ld: drivers/iio/common/hid-sensors/hid-sensor-attributes.o: in function `convert_to_vtf_format':
   drivers/iio/common/hid-sensors/hid-sensor-attributes.c:140: undefined reference to `__udivdi3'
   ld: drivers/iio/common/hid-sensors/hid-sensor-attributes.c:142: undefined reference to `__udivdi3'
   ld: drivers/iio/common/hid-sensors/hid-sensor-attributes.o: in function `hid_sensor_write_samp_freq_value':
   drivers/iio/common/hid-sensors/hid-sensor-attributes.c:208: undefined reference to `__udivdi3'
   ld: drivers/iio/common/hid-sensors/hid-sensor-attributes.c:210: undefined reference to `__udivdi3'

vim +312 drivers/iio/common/hid-sensors/hid-sensor-attributes.c

   284	
   285	/*
   286	 * This fuction applies the unit exponent to the scale.
   287	 * For example:
   288	 * 9.806650000 ->exp:2-> val0[980]val1[665000000]
   289	 * 9.000806000 ->exp:2-> val0[900]val1[80600000]
   290	 * 0.174535293 ->exp:2-> val0[17]val1[453529300]
   291	 * 1.001745329 ->exp:0-> val0[1]val1[1745329]
   292	 * 1.001745329 ->exp:2-> val0[100]val1[174532900]
   293	 * 1.001745329 ->exp:4-> val0[10017]val1[453290000]
   294	 * 9.806650000 ->exp:-2-> val0[0]val1[98066500]
   295	 */
   296	static void adjust_exponent_nano(int *val0, int *val1, int scale0,
   297					  int scale1, int exp)
   298	{
   299		int i;
   300		int x;
   301		int res;
   302		int rem;
   303	
   304		if (exp > 0) {
   305			*val0 = scale0 * int_pow(10, exp);
   306			res = 0;
   307			if (exp > 9) {
   308				*val1 = 0;
   309				return;
   310			}
   311			for (i = 0; i < exp; ++i) {
 > 312				x = scale1 / int_pow(10, 8 - i);
   313				res += int_pow(10, exp - 1 - i) * x;
 > 314				scale1 = scale1 % int_pow(10, 8 - i);
   315			}
   316			*val0 += res;
   317			*val1 = scale1 * int_pow(10, exp);
   318		} else if (exp < 0) {
   319			exp = abs(exp);
   320			if (exp > 9) {
   321				*val0 = *val1 = 0;
   322				return;
   323			}
 > 324			*val0 = scale0 / int_pow(10, exp);
   325			rem = scale0 % int_pow(10, exp);
   326			res = 0;
   327			for (i = 0; i < (9 - exp); ++i) {
   328				x = scale1 / int_pow(10, 8 - i);
   329				res += int_pow(10, 8 - exp - i) * x;
   330				scale1 = scale1 % int_pow(10, 8 - i);
   331			}
   332			*val1 = rem * int_pow(10, 9 - exp) + res;
   333		} else {
   334			*val0 = scale0;
   335			*val1 = scale1;
   336		}
   337	}
   338	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux