* [sashal-linux-stable:queue-5.4 43/132] drivers/iio/adc/ad_sigma_delta.c:73:3: error: implicit declaration of function 'put_unaligned_be24'
@ 2021-03-20 4:42 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-03-20 4:42 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 6262 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.4
head: d2c5af89e80c5b71f1da59879464a930947306a2
commit: e16974f4fabeef9d0431762b387da9f2374ffad8 [43/132] iio: adc: ad_sigma_delta: Use {get,put}_unaligned_be24()
config: arm-randconfig-r023-20210318 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 436c6c9c20cc522c92a923440a5fc509c342a7db)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/commit/?id=e16974f4fabeef9d0431762b387da9f2374ffad8
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-5.4
git checkout e16974f4fabeef9d0431762b387da9f2374ffad8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/iio/adc/ad_sigma_delta.c:73:3: error: implicit declaration of function 'put_unaligned_be24' [-Werror,-Wimplicit-function-declaration]
put_unaligned_be24(val, &data[1]);
^
drivers/iio/adc/ad_sigma_delta.c:73:3: note: did you mean 'put_unaligned_be64'?
include/linux/unaligned/be_byteshift.h:66:20: note: 'put_unaligned_be64' declared here
static inline void put_unaligned_be64(u64 val, void *p)
^
>> drivers/iio/adc/ad_sigma_delta.c:158:10: error: implicit declaration of function 'get_unaligned_be24' [-Werror,-Wimplicit-function-declaration]
*val = get_unaligned_be24(&sigma_delta->data[0]);
^
drivers/iio/adc/ad_sigma_delta.c:158:10: note: did you mean 'get_unaligned_be64'?
include/linux/unaligned/be_byteshift.h:51:19: note: 'get_unaligned_be64' declared here
static inline u64 get_unaligned_be64(const void *p)
^
2 errors generated.
vim +/put_unaligned_be24 +73 drivers/iio/adc/ad_sigma_delta.c
46
47 /**
48 * ad_sd_write_reg() - Write a register
49 *
50 * @sigma_delta: The sigma delta device
51 * @reg: Address of the register
52 * @size: Size of the register (0-3)
53 * @val: Value to write to the register
54 *
55 * Returns 0 on success, an error code otherwise.
56 **/
57 int ad_sd_write_reg(struct ad_sigma_delta *sigma_delta, unsigned int reg,
58 unsigned int size, unsigned int val)
59 {
60 uint8_t *data = sigma_delta->data;
61 struct spi_transfer t = {
62 .tx_buf = data,
63 .len = size + 1,
64 .cs_change = sigma_delta->keep_cs_asserted,
65 };
66 struct spi_message m;
67 int ret;
68
69 data[0] = (reg << sigma_delta->info->addr_shift) | sigma_delta->comm;
70
71 switch (size) {
72 case 3:
> 73 put_unaligned_be24(val, &data[1]);
74 break;
75 case 2:
76 put_unaligned_be16(val, &data[1]);
77 break;
78 case 1:
79 data[1] = val;
80 break;
81 case 0:
82 break;
83 default:
84 return -EINVAL;
85 }
86
87 spi_message_init(&m);
88 spi_message_add_tail(&t, &m);
89
90 if (sigma_delta->bus_locked)
91 ret = spi_sync_locked(sigma_delta->spi, &m);
92 else
93 ret = spi_sync(sigma_delta->spi, &m);
94
95 return ret;
96 }
97 EXPORT_SYMBOL_GPL(ad_sd_write_reg);
98
99 static int ad_sd_read_reg_raw(struct ad_sigma_delta *sigma_delta,
100 unsigned int reg, unsigned int size, uint8_t *val)
101 {
102 uint8_t *data = sigma_delta->data;
103 int ret;
104 struct spi_transfer t[] = {
105 {
106 .tx_buf = data,
107 .len = 1,
108 }, {
109 .rx_buf = val,
110 .len = size,
111 .cs_change = sigma_delta->bus_locked,
112 },
113 };
114 struct spi_message m;
115
116 spi_message_init(&m);
117
118 if (sigma_delta->info->has_registers) {
119 data[0] = reg << sigma_delta->info->addr_shift;
120 data[0] |= sigma_delta->info->read_mask;
121 data[0] |= sigma_delta->comm;
122 spi_message_add_tail(&t[0], &m);
123 }
124 spi_message_add_tail(&t[1], &m);
125
126 if (sigma_delta->bus_locked)
127 ret = spi_sync_locked(sigma_delta->spi, &m);
128 else
129 ret = spi_sync(sigma_delta->spi, &m);
130
131 return ret;
132 }
133
134 /**
135 * ad_sd_read_reg() - Read a register
136 *
137 * @sigma_delta: The sigma delta device
138 * @reg: Address of the register
139 * @size: Size of the register (1-4)
140 * @val: Read value
141 *
142 * Returns 0 on success, an error code otherwise.
143 **/
144 int ad_sd_read_reg(struct ad_sigma_delta *sigma_delta,
145 unsigned int reg, unsigned int size, unsigned int *val)
146 {
147 int ret;
148
149 ret = ad_sd_read_reg_raw(sigma_delta, reg, size, sigma_delta->data);
150 if (ret < 0)
151 goto out;
152
153 switch (size) {
154 case 4:
155 *val = get_unaligned_be32(sigma_delta->data);
156 break;
157 case 3:
> 158 *val = get_unaligned_be24(&sigma_delta->data[0]);
159 break;
160 case 2:
161 *val = get_unaligned_be16(sigma_delta->data);
162 break;
163 case 1:
164 *val = sigma_delta->data[0];
165 break;
166 default:
167 ret = -EINVAL;
168 break;
169 }
170
171 out:
172 return ret;
173 }
174 EXPORT_SYMBOL_GPL(ad_sd_read_reg);
175
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32997 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-20 4:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-20 4:42 [sashal-linux-stable:queue-5.4 43/132] drivers/iio/adc/ad_sigma_delta.c:73:3: error: implicit declaration of function 'put_unaligned_be24' kernel test robot
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.