* Re: [PATCH v2 4/5] drivers: iio: adc: LTC2499 support
[not found] <20220901121700.1325733-4-ciprian.regus@analog.com>
@ 2022-09-01 20:00 ` kernel test robot
2022-09-04 15:08 ` Jonathan Cameron
2022-09-01 20:10 ` kernel test robot
1 sibling, 1 reply; 3+ messages in thread
From: kernel test robot @ 2022-09-01 20:00 UTC (permalink / raw)
To: Ciprian Regus, jic23, robh+dt, krzysztof.kozlowski+dt, linux-iio,
devicetree, linux-kernel
Cc: llvm, kbuild-all, Ciprian Regus
Hi Ciprian,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on jic23-iio/togreg]
[also build test ERROR on robh/for-next linus/master v6.0-rc3 next-20220901]
[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/Ciprian-Regus/dt-bindings-iio-adc-Add-docs-for-LTC2499/20220901-202115
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: hexagon-randconfig-r003-20220901 (https://download.01.org/0day-ci/archive/20220902/202209020359.vCYzjn4X-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project c55b41d5199d2394dd6cdb8f52180d8b81d809d4)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/08ff9ae09bfde86fc512e13a4ea2af894e4aa442
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Ciprian-Regus/dt-bindings-iio-adc-Add-docs-for-LTC2499/20220901-202115
git checkout 08ff9ae09bfde86fc512e13a4ea2af894e4aa442
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/iio/adc/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/iio/adc/ltc2497.c:60:12: error: call to undeclared function 'get_unaligned_be24'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
*val = (get_unaligned_be24(st->data.d8) >> st->sub_lsb)
^
drivers/iio/adc/ltc2497.c:122:4: error: field designator 'name' does not refer to any field in type 'const struct ltc2497_chip_info'
.name = NULL,
^
drivers/iio/adc/ltc2497.c:126:4: error: field designator 'name' does not refer to any field in type 'const struct ltc2497_chip_info'
.name = "ltc2499",
^
3 errors generated.
vim +/get_unaligned_be24 +60 drivers/iio/adc/ltc2497.c
34
35 static int ltc2497_result_and_measure(struct ltc2497core_driverdata *ddata,
36 u8 address, int *val)
37 {
38 struct ltc2497_driverdata *st =
39 container_of(ddata, struct ltc2497_driverdata, common_ddata);
40 int ret;
41
42 if (val) {
43 if (st->recv_size == 3)
44 ret = i2c_master_recv(st->client, (char *)&st->data.d8, st->recv_size);
45 else
46 ret = i2c_master_recv(st->client, (char *)&st->data.d32, st->recv_size);
47
48 if (ret < 0) {
49 dev_err(&st->client->dev, "i2c_master_recv failed\n");
50 return ret;
51 }
52
53 /*
54 * The data format is 16/24 bit 2s complement, but with an upper sign bit on the
55 * resolution + 1 position, which is set for positive values only. Given this
56 * bit's value, subtracting BIT(resolution + 1) from the ADC's result is
57 * equivalent to a sign extension.
58 */
59 if (st->recv_size == 3) {
> 60 *val = (get_unaligned_be24(st->data.d8) >> st->sub_lsb)
61 - BIT(ddata->chip_info->resolution + 1);
62 } else {
63 *val = (be32_to_cpu(st->data.d32) >> st->sub_lsb)
64 - BIT(ddata->chip_info->resolution + 1);
65 }
66 }
67
68 ret = i2c_smbus_write_byte(st->client,
69 LTC2497_ENABLE | address);
70 if (ret)
71 dev_err(&st->client->dev, "i2c transfer failed: %pe\n",
72 ERR_PTR(ret));
73 return ret;
74 }
75
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 4/5] drivers: iio: adc: LTC2499 support
[not found] <20220901121700.1325733-4-ciprian.regus@analog.com>
2022-09-01 20:00 ` [PATCH v2 4/5] drivers: iio: adc: LTC2499 support kernel test robot
@ 2022-09-01 20:10 ` kernel test robot
1 sibling, 0 replies; 3+ messages in thread
From: kernel test robot @ 2022-09-01 20:10 UTC (permalink / raw)
To: Ciprian Regus, jic23, robh+dt, krzysztof.kozlowski+dt, linux-iio,
devicetree, linux-kernel
Cc: llvm, kbuild-all, Ciprian Regus
Hi Ciprian,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on jic23-iio/togreg]
[also build test ERROR on robh/for-next linus/master v6.0-rc3 next-20220901]
[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/Ciprian-Regus/dt-bindings-iio-adc-Add-docs-for-LTC2499/20220901-202115
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: i386-randconfig-a015 (https://download.01.org/0day-ci/archive/20220902/202209020413.akDnDcLc-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/08ff9ae09bfde86fc512e13a4ea2af894e4aa442
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Ciprian-Regus/dt-bindings-iio-adc-Add-docs-for-LTC2499/20220901-202115
git checkout 08ff9ae09bfde86fc512e13a4ea2af894e4aa442
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/iio/adc/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/iio/adc/ltc2497.c:60:12: error: implicit declaration of function 'get_unaligned_be24' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
*val = (get_unaligned_be24(st->data.d8) >> st->sub_lsb)
^
drivers/iio/adc/ltc2497.c:122:4: error: field designator 'name' does not refer to any field in type 'const struct ltc2497_chip_info'
.name = NULL,
^
drivers/iio/adc/ltc2497.c:126:4: error: field designator 'name' does not refer to any field in type 'const struct ltc2497_chip_info'
.name = "ltc2499",
^
3 errors generated.
vim +/get_unaligned_be24 +60 drivers/iio/adc/ltc2497.c
34
35 static int ltc2497_result_and_measure(struct ltc2497core_driverdata *ddata,
36 u8 address, int *val)
37 {
38 struct ltc2497_driverdata *st =
39 container_of(ddata, struct ltc2497_driverdata, common_ddata);
40 int ret;
41
42 if (val) {
43 if (st->recv_size == 3)
44 ret = i2c_master_recv(st->client, (char *)&st->data.d8, st->recv_size);
45 else
46 ret = i2c_master_recv(st->client, (char *)&st->data.d32, st->recv_size);
47
48 if (ret < 0) {
49 dev_err(&st->client->dev, "i2c_master_recv failed\n");
50 return ret;
51 }
52
53 /*
54 * The data format is 16/24 bit 2s complement, but with an upper sign bit on the
55 * resolution + 1 position, which is set for positive values only. Given this
56 * bit's value, subtracting BIT(resolution + 1) from the ADC's result is
57 * equivalent to a sign extension.
58 */
59 if (st->recv_size == 3) {
> 60 *val = (get_unaligned_be24(st->data.d8) >> st->sub_lsb)
61 - BIT(ddata->chip_info->resolution + 1);
62 } else {
63 *val = (be32_to_cpu(st->data.d32) >> st->sub_lsb)
64 - BIT(ddata->chip_info->resolution + 1);
65 }
66 }
67
68 ret = i2c_smbus_write_byte(st->client,
69 LTC2497_ENABLE | address);
70 if (ret)
71 dev_err(&st->client->dev, "i2c transfer failed: %pe\n",
72 ERR_PTR(ret));
73 return ret;
74 }
75
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 4/5] drivers: iio: adc: LTC2499 support
2022-09-01 20:00 ` [PATCH v2 4/5] drivers: iio: adc: LTC2499 support kernel test robot
@ 2022-09-04 15:08 ` Jonathan Cameron
0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2022-09-04 15:08 UTC (permalink / raw)
To: kernel test robot
Cc: Ciprian Regus, robh+dt, krzysztof.kozlowski+dt, linux-iio,
devicetree, linux-kernel, llvm, kbuild-all
On Fri, 2 Sep 2022 04:00:05 +0800
kernel test robot <lkp@intel.com> wrote:
> Hi Ciprian,
>
> Thank you for the patch! Yet something to improve:
>
> [auto build test ERROR on jic23-iio/togreg]
> [also build test ERROR on robh/for-next linus/master v6.0-rc3 next-20220901]
> [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/Ciprian-Regus/dt-bindings-iio-adc-Add-docs-for-LTC2499/20220901-202115
> base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
> config: hexagon-randconfig-r003-20220901 (https://download.01.org/0day-ci/archive/20220902/202209020359.vCYzjn4X-lkp@intel.com/config)
> compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project c55b41d5199d2394dd6cdb8f52180d8b81d809d4)
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # https://github.com/intel-lab-lkp/linux/commit/08ff9ae09bfde86fc512e13a4ea2af894e4aa442
> git remote add linux-review https://github.com/intel-lab-lkp/linux
> git fetch --no-tags linux-review Ciprian-Regus/dt-bindings-iio-adc-Add-docs-for-LTC2499/20220901-202115
> git checkout 08ff9ae09bfde86fc512e13a4ea2af894e4aa442
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/iio/adc/
>
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> >> drivers/iio/adc/ltc2497.c:60:12: error: call to undeclared function 'get_unaligned_be24'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
> *val = (get_unaligned_be24(st->data.d8) >> st->sub_lsb)
> ^
> drivers/iio/adc/ltc2497.c:122:4: error: field designator 'name' does not refer to any field in type 'const struct ltc2497_chip_info'
> .name = NULL,
> ^
> drivers/iio/adc/ltc2497.c:126:4: error: field designator 'name' does not refer to any field in type 'const struct ltc2497_chip_info'
> .name = "ltc2499",
> ^
> 3 errors generated.
>
Ah. The power of automation proves itself again. I missed that you'd
not added
#include <asm/unaligned.h>
and that the .name field is introduced in a later patch.
Jonathan
>
> vim +/get_unaligned_be24 +60 drivers/iio/adc/ltc2497.c
>
> 34
> 35 static int ltc2497_result_and_measure(struct ltc2497core_driverdata *ddata,
> 36 u8 address, int *val)
> 37 {
> 38 struct ltc2497_driverdata *st =
> 39 container_of(ddata, struct ltc2497_driverdata, common_ddata);
> 40 int ret;
> 41
> 42 if (val) {
> 43 if (st->recv_size == 3)
> 44 ret = i2c_master_recv(st->client, (char *)&st->data.d8, st->recv_size);
> 45 else
> 46 ret = i2c_master_recv(st->client, (char *)&st->data.d32, st->recv_size);
> 47
> 48 if (ret < 0) {
> 49 dev_err(&st->client->dev, "i2c_master_recv failed\n");
> 50 return ret;
> 51 }
> 52
> 53 /*
> 54 * The data format is 16/24 bit 2s complement, but with an upper sign bit on the
> 55 * resolution + 1 position, which is set for positive values only. Given this
> 56 * bit's value, subtracting BIT(resolution + 1) from the ADC's result is
> 57 * equivalent to a sign extension.
> 58 */
> 59 if (st->recv_size == 3) {
> > 60 *val = (get_unaligned_be24(st->data.d8) >> st->sub_lsb)
> 61 - BIT(ddata->chip_info->resolution + 1);
> 62 } else {
> 63 *val = (be32_to_cpu(st->data.d32) >> st->sub_lsb)
> 64 - BIT(ddata->chip_info->resolution + 1);
> 65 }
> 66 }
> 67
> 68 ret = i2c_smbus_write_byte(st->client,
> 69 LTC2497_ENABLE | address);
> 70 if (ret)
> 71 dev_err(&st->client->dev, "i2c transfer failed: %pe\n",
> 72 ERR_PTR(ret));
> 73 return ret;
> 74 }
> 75
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-04 15:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20220901121700.1325733-4-ciprian.regus@analog.com>
2022-09-01 20:00 ` [PATCH v2 4/5] drivers: iio: adc: LTC2499 support kernel test robot
2022-09-04 15:08 ` Jonathan Cameron
2022-09-01 20:10 ` kernel test robot
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).