Re: [PATCH v1 3/4] iio: afe: rescale: Re-use generic struct s32_fract
From: kernel test robot
Date: Wed Dec 04 2024 - 06:17:06 EST
Hi Andy,
kernel test robot noticed the following build errors:
[auto build test ERROR on jic23-iio/togreg]
[also build test ERROR on linus/master v6.13-rc1 next-20241203]
[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/Andy-Shevchenko/iio-afe-rescale-Don-t-use-for-booleans/20241204-124353
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
patch link: https://lore.kernel.org/r/20241204013620.862943-4-andriy.shevchenko%40linux.intel.com
patch subject: [PATCH v1 3/4] iio: afe: rescale: Re-use generic struct s32_fract
config: arm64-randconfig-001 (https://download.01.org/0day-ci/archive/20241204/202412041825.tYQkmq7d-lkp@xxxxxxxxx/config)
compiler: aarch64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241204/202412041825.tYQkmq7d-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412041825.tYQkmq7d-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
drivers/iio/test/iio-test-rescale.c: In function 'iio_rescale_test_scale':
>> drivers/iio/test/iio-test-rescale.c:655:16: error: 'struct rescale' has no member named 'numerator'
655 | rescale.numerator = t->numerator;
| ^
>> drivers/iio/test/iio-test-rescale.c:656:16: error: 'struct rescale' has no member named 'denominator'
656 | rescale.denominator = t->denominator;
| ^
drivers/iio/test/iio-test-rescale.c: In function 'iio_rescale_test_offset':
drivers/iio/test/iio-test-rescale.c:684:16: error: 'struct rescale' has no member named 'numerator'
684 | rescale.numerator = t->numerator;
| ^
drivers/iio/test/iio-test-rescale.c:685:16: error: 'struct rescale' has no member named 'denominator'
685 | rescale.denominator = t->denominator;
| ^
vim +655 drivers/iio/test/iio-test-rescale.c
8e74a48d17d509b Liam Beguin 2022-02-12 645
8e74a48d17d509b Liam Beguin 2022-02-12 646 static void iio_rescale_test_scale(struct kunit *test)
8e74a48d17d509b Liam Beguin 2022-02-12 647 {
8e74a48d17d509b Liam Beguin 2022-02-12 648 struct rescale_tc_data *t = (struct rescale_tc_data *)test->param_value;
8e74a48d17d509b Liam Beguin 2022-02-12 649 char *buff = kunit_kmalloc(test, PAGE_SIZE, GFP_KERNEL);
8e74a48d17d509b Liam Beguin 2022-02-12 650 struct rescale rescale;
8e74a48d17d509b Liam Beguin 2022-02-12 651 int values[2];
8e74a48d17d509b Liam Beguin 2022-02-12 652 int rel_ppm;
8e74a48d17d509b Liam Beguin 2022-02-12 653 int ret;
8e74a48d17d509b Liam Beguin 2022-02-12 654
8e74a48d17d509b Liam Beguin 2022-02-12 @655 rescale.numerator = t->numerator;
8e74a48d17d509b Liam Beguin 2022-02-12 @656 rescale.denominator = t->denominator;
8e74a48d17d509b Liam Beguin 2022-02-12 657 rescale.offset = t->offset;
8e74a48d17d509b Liam Beguin 2022-02-12 658 values[0] = t->schan_val;
8e74a48d17d509b Liam Beguin 2022-02-12 659 values[1] = t->schan_val2;
8e74a48d17d509b Liam Beguin 2022-02-12 660
8e74a48d17d509b Liam Beguin 2022-02-12 661 ret = rescale_process_scale(&rescale, t->schan_scale_type,
8e74a48d17d509b Liam Beguin 2022-02-12 662 &values[0], &values[1]);
8e74a48d17d509b Liam Beguin 2022-02-12 663
8e74a48d17d509b Liam Beguin 2022-02-12 664 ret = iio_format_value(buff, ret, 2, values);
8e74a48d17d509b Liam Beguin 2022-02-12 665 KUNIT_EXPECT_EQ(test, (int)strlen(buff), ret);
8e74a48d17d509b Liam Beguin 2022-02-12 666
8e74a48d17d509b Liam Beguin 2022-02-12 667 rel_ppm = iio_test_relative_error_ppm(buff, t->expected);
8e74a48d17d509b Liam Beguin 2022-02-12 668 KUNIT_EXPECT_GE_MSG(test, rel_ppm, 0, "failed to compute ppm\n");
8e74a48d17d509b Liam Beguin 2022-02-12 669
8e74a48d17d509b Liam Beguin 2022-02-12 670 KUNIT_EXPECT_EQ_MSG(test, rel_ppm, 0,
8e74a48d17d509b Liam Beguin 2022-02-12 671 "\t real=%s"
8e74a48d17d509b Liam Beguin 2022-02-12 672 "\texpected=%s\n",
8e74a48d17d509b Liam Beguin 2022-02-12 673 buff, t->expected);
8e74a48d17d509b Liam Beguin 2022-02-12 674 }
8e74a48d17d509b Liam Beguin 2022-02-12 675
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki