[xilinx-xlnx:xlnx_rebase_v5.15 484/907] drivers/clk/clk-xlnx-clock-wizard-v.c:229:20: warning: integer literal is too large to be represented in type 'long', interpreting as 'unsigned long' per C89; this literal will have type 'long long' in C99 onwards
by kernel test robot
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15
head: 423a108a01e05e84b59a4c4885c16bf3cd8c90c7
commit: 8b5383767cb4c856283824baee568f4286ecc0db [484/907] clocking-wizard: Add versal clocking wizard support
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220209/202202092332.Cshi6n5z-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project e8bff9ae54a55b4dbfeb6ba55f723abbd81bf494)
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/Xilinx/linux-xlnx/commit/8b5383767cb4c856283824baee568...
git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xilinx-xlnx xlnx_rebase_v5.15
git checkout 8b5383767cb4c856283824baee568f4286ecc0db
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/clk/ drivers/gpu/drm/xlnx/ drivers/net/ethernet/xilinx/ drivers/phy/xilinx/ drivers/ptp/ drivers/staging/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/clk/clk-xlnx-clock-wizard-v.c:164:9: error: implicit declaration of function 'FIELD_GET' [-Werror,-Wimplicit-function-declaration]
regl = FIELD_GET(WZRD_CLKFBOUT_L_MASK, reg);
^
>> drivers/clk/clk-xlnx-clock-wizard-v.c:229:20: warning: integer literal is too large to be represented in type 'long', interpreting as 'unsigned long' per C89; this literal will have type 'long long' in C99 onwards [-Wc99-compat]
if (vco_freq >= WZRD_VCO_MIN && vco_freq <= WZRD_VCO_MAX) {
^
drivers/clk/clk-xlnx-clock-wizard-v.c:78:24: note: expanded from macro 'WZRD_VCO_MIN'
#define WZRD_VCO_MIN 2160000000
^
drivers/clk/clk-xlnx-clock-wizard-v.c:276:12: error: implicit declaration of function 'FIELD_PREP' [-Werror,-Wimplicit-function-declaration]
regval1 = FIELD_PREP(WZRD_DIVCLK_EDGE, edged);
^
drivers/clk/clk-xlnx-clock-wizard-v.c:601:63: warning: variable 'i' is uninitialized when used here [-Wuninitialized]
if (of_property_read_string_index(np, "clock-output-names", i,
^
drivers/clk/clk-xlnx-clock-wizard-v.c:545:7: note: initialize the variable 'i' to silence this warning
int i, ret;
^
= 0
2 warnings and 2 errors generated.
vim +229 drivers/clk/clk-xlnx-clock-wizard-v.c
154
155 static unsigned long clk_wzrd_recalc_rate_all(struct clk_hw *hw,
156 unsigned long parent_rate)
157 {
158 struct clk_wzrd_divider *divider = to_clk_wzrd_divider(hw);
159 u32 edged, div, div2, p5en, edge, prediv2, all, regl, regh, mult, reg;
160
161 edge = !!(readl(divider->base + WZRD_CLK_CFG_REG(WZRD_CLKFBOUT_1)) & WZRD_CLKFBOUT_EDGE);
162
163 reg = readl(divider->base + WZRD_CLK_CFG_REG(WZRD_CLKFBOUT_2));
> 164 regl = FIELD_GET(WZRD_CLKFBOUT_L_MASK, reg);
165 regh = FIELD_GET(WZRD_CLKFBOUT_H_MASK, reg);
166
167 mult = regl + regh + edge;
168 if (!mult)
169 mult = 1;
170
171 regl = readl(divider->base + WZRD_CLK_CFG_REG(WZRD_CLKFBOUT_4)) &
172 WZRD_CLKFBOUT_FRAC_EN;
173 if (regl) {
174 regl = readl(divider->base + WZRD_CLK_CFG_REG(WZRD_CLKFBOUT_3)) &
175 WZRD_CLKFBOUT_FRAC_MASK;
176 mult = mult * WZRD_FRAC_GRADIENT + regl;
177 parent_rate = DIV_ROUND_CLOSEST((parent_rate * mult), WZRD_FRAC_GRADIENT);
178 } else {
179 parent_rate = parent_rate * mult;
180 }
181
182 /* O Calculation */
183 reg = readl(divider->base + WZRD_CLK_CFG_REG(WZRD_CLKOUT0_1));
184 edged = FIELD_GET(WZRD_CLKFBOUT_EDGE, reg);
185 p5en = FIELD_GET(WZRD_P5EN, reg);
186 prediv2 = FIELD_GET(WZRD_CLKOUT0_PREDIV2, reg);
187
188 reg = readl(divider->base + WZRD_CLK_CFG_REG(WZRD_CLKOUT0_2));
189 /* Low time */
190 regl = FIELD_GET(WZRD_CLKFBOUT_L_MASK, reg);
191 /* High time */
192 regh = FIELD_GET(WZRD_CLKFBOUT_H_MASK, reg);
193 all = regh + regl + edged;
194 if (!all)
195 all = 1;
196
197 if (prediv2)
198 div2 = PREDIV2_MULT * all + p5en;
199 else
200 div2 = all;
201
202 /* D calculation */
203 edged = !!(readl(divider->base + WZRD_CLK_CFG_REG(WZRD_DESKEW_2)) &
204 WZRD_DIVCLK_EDGE);
205 reg = readl(divider->base + WZRD_CLK_CFG_REG(WZRD_DIVCLK));
206 /* Low time */
207 regl = FIELD_GET(WZRD_CLKFBOUT_L_MASK, reg);
208 /* High time */
209 regh = FIELD_GET(WZRD_CLKFBOUT_H_MASK, reg);
210 div = regl + regh + edged;
211 if (!div)
212 div = 1;
213
214 div = div * div2;
215 return divider_recalc_rate(hw, parent_rate, div, divider->table,
216 divider->flags, divider->width);
217 }
218
219 static int clk_wzrd_get_divisors(struct clk_hw *hw, unsigned long rate,
220 unsigned long parent_rate)
221 {
222 struct clk_wzrd_divider *divider = to_clk_wzrd_divider(hw);
223 u64 vco_freq, freq, diff;
224 u32 m, d, o;
225
226 for (m = WZRD_M_MIN; m <= WZRD_M_MAX; m++) {
227 for (d = WZRD_D_MIN; d <= WZRD_D_MAX; d++) {
228 vco_freq = DIV_ROUND_CLOSEST((parent_rate * m), d);
> 229 if (vco_freq >= WZRD_VCO_MIN && vco_freq <= WZRD_VCO_MAX) {
230 for (o = WZRD_O_MIN; o <= WZRD_O_MAX; o++) {
231 freq = DIV_ROUND_CLOSEST(vco_freq, o);
232 diff = abs(freq - rate);
233
234 if (diff < WZRD_MIN_ERR) {
235 divider->valuem = m;
236 divider->valued = d;
237 divider->valueo = o;
238 return 0;
239 }
240 }
241 }
242 }
243 }
244 return -EBUSY;
245 }
246
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[ambarus:spi-nor/next 9/9] drivers/mtd/spi-nor/macronix.c:20: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
by kernel test robot
tree: https://github.com/ambarus/linux-0day spi-nor/next
head: 89a4d99e9d41b68d34943980943207b58c433256
commit: 89a4d99e9d41b68d34943980943207b58c433256 [9/9] mtd: spi-nor: macronix: Add support for mx66lm1g45g
config: i386-randconfig-a003 (https://download.01.org/0day-ci/archive/20220209/202202092342.YwAYnHF4-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/ambarus/linux-0day/commit/89a4d99e9d41b68d349439809432...
git remote add ambarus https://github.com/ambarus/linux-0day
git fetch --no-tags ambarus spi-nor/next
git checkout 89a4d99e9d41b68d34943980943207b58c433256
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/mtd/spi-nor/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/mtd/spi-nor/macronix.c:20: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* Macronix SPI NOR flash operations.
vim +20 drivers/mtd/spi-nor/macronix.c
18
19 /**
> 20 * Macronix SPI NOR flash operations.
21 */
22 #define SPI_NOR_MX_READ_CR2_OP(ndummy, buf, ndata) \
23 SPI_MEM_OP(SPI_MEM_OP_CMD(SPINOR_OP_READ_CR2, 0), \
24 SPI_MEM_OP_ADDR(4, SPINOR_REG_CR2_MODE_ADDR, 0), \
25 SPI_MEM_OP_DUMMY(ndummy, 0), \
26 SPI_MEM_OP_DATA_IN(ndata, buf, 0))
27
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[norov:bitmap-20220204 10/48] drivers/net/ethernet/qlogic/qed/qed_rdma.c:332:7: error: use of undeclared identifier 'idx'
by kernel test robot
tree: https://github.com/norov/linux bitmap-20220204
head: 6be3158022466595db078b4091472d0541e04bdc
commit: 8bca8c2ba1a83d9ebf601431dab6c4ab05d9ca27 [10/48] qed: rework qed_rdma_bmap_free()
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20220209/202202092311.nsDv5MPD-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project e8bff9ae54a55b4dbfeb6ba55f723abbd81bf494)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/norov/linux/commit/8bca8c2ba1a83d9ebf601431dab6c4ab05d...
git remote add norov https://github.com/norov/linux
git fetch --no-tags norov bitmap-20220204
git checkout 8bca8c2ba1a83d9ebf601431dab6c4ab05d9ca27
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/net/ethernet/qlogic/qed/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/net/ethernet/qlogic/qed/qed_rdma.c:332:7: error: use of undeclared identifier 'idx'
for (idx = 0; idx < bmap->max_count; idx += 512) {
^
drivers/net/ethernet/qlogic/qed/qed_rdma.c:332:16: error: use of undeclared identifier 'idx'
for (idx = 0; idx < bmap->max_count; idx += 512) {
^
drivers/net/ethernet/qlogic/qed/qed_rdma.c:332:39: error: use of undeclared identifier 'idx'
for (idx = 0; idx < bmap->max_count; idx += 512) {
^
drivers/net/ethernet/qlogic/qed/qed_rdma.c:333:37: error: use of undeclared identifier 'idx'
b = bmap->bitmap + BITS_TO_LONGS(idx);
^
drivers/net/ethernet/qlogic/qed/qed_rdma.c:334:33: error: use of undeclared identifier 'idx'
nbits = min(bmap->max_count - idx, 512);
^
drivers/net/ethernet/qlogic/qed/qed_rdma.c:334:33: error: use of undeclared identifier 'idx'
drivers/net/ethernet/qlogic/qed/qed_rdma.c:338:30: error: use of undeclared identifier 'idx'
"line 0x%04x: %*pb\n", idx / 512, nbits, b);
^
7 errors generated.
vim +/idx +332 drivers/net/ethernet/qlogic/qed/qed_rdma.c
318
319 void qed_rdma_bmap_free(struct qed_hwfn *p_hwfn,
320 struct qed_bmap *bmap, bool check)
321 {
322 unsigned int pos, weight, nbits;
323 unsigned long *b;
324
325 if (!check || !(weight = bitmap_weight(bmap->bitmap, bmap->max_count)))
326 goto end;
327
328 DP_NOTICE(p_hwfn,
329 "%s bitmap not free - size=%d, weight=%d, 512 bits per line\n",
330 bmap->name, bmap->max_count, weight);
331
> 332 for (idx = 0; idx < bmap->max_count; idx += 512) {
333 b = bmap->bitmap + BITS_TO_LONGS(idx);
334 nbits = min(bmap->max_count - idx, 512);
335
336 if (!bitmap_empty(b, nbits))
337 DP_NOTICE(p_hwfn,
338 "line 0x%04x: %*pb\n", idx / 512, nbits, b);
339 }
340
341 end:
342 kfree(bmap->bitmap);
343 bmap->bitmap = NULL;
344 }
345
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
Re: [PATCH v3 3/4] drivers/net/virtio_net: Added RSS hash report.
by kernel test robot
Hi Andrew,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on mst-vhost/linux-next]
[also build test WARNING on net/master horms-ipvs/master net-next/master linus/master v5.17-rc3 next-20220209]
[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]
url: https://github.com/0day-ci/linux/commits/Andrew-Melnychenko/RSS-support-f...
base: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next
config: arm64-randconfig-s032-20220208 (https://download.01.org/0day-ci/archive/20220209/202202092243.OLKO83i2-lk...)
compiler: aarch64-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/92ce7fd51cc1e4c8bd576ec4308641653...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Andrew-Melnychenko/RSS-support-for-VirtioNet/20220209-021715
git checkout 92ce7fd51cc1e4c8bd576ec43086416533212c26
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/net/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/net/virtio_net.c:1191:33: sparse: sparse: restricted __le16 degrades to integer
>> drivers/net/virtio_net.c:1191:33: sparse: sparse: restricted __le16 degrades to integer
>> drivers/net/virtio_net.c:1191:33: sparse: sparse: restricted __le16 degrades to integer
>> drivers/net/virtio_net.c:1191:33: sparse: sparse: restricted __le16 degrades to integer
>> drivers/net/virtio_net.c:1191:33: sparse: sparse: restricted __le16 degrades to integer
>> drivers/net/virtio_net.c:1191:33: sparse: sparse: restricted __le16 degrades to integer
>> drivers/net/virtio_net.c:1191:33: sparse: sparse: restricted __le16 degrades to integer
>> drivers/net/virtio_net.c:1191:33: sparse: sparse: restricted __le16 degrades to integer
>> drivers/net/virtio_net.c:1191:33: sparse: sparse: restricted __le16 degrades to integer
>> drivers/net/virtio_net.c:1209:43: sparse: sparse: incorrect type in argument 2 (different base types) @@ expected unsigned int [usertype] hash @@ got restricted __le32 [usertype] hash_value @@
drivers/net/virtio_net.c:1209:43: sparse: expected unsigned int [usertype] hash
drivers/net/virtio_net.c:1209:43: sparse: got restricted __le32 [usertype] hash_value
drivers/net/virtio_net.c:1568:13: sparse: sparse: context imbalance in 'virtnet_poll_cleantx' - different lock contexts for basic block
vim +1191 drivers/net/virtio_net.c
1151
1152 static void receive_buf(struct virtnet_info *vi, struct receive_queue *rq,
1153 void *buf, unsigned int len, void **ctx,
1154 unsigned int *xdp_xmit,
1155 struct virtnet_rq_stats *stats)
1156 {
1157 struct net_device *dev = vi->dev;
1158 struct sk_buff *skb;
1159 struct virtio_net_hdr_mrg_rxbuf *hdr;
1160 struct virtio_net_hdr_v1_hash *hdr_hash;
1161 enum pkt_hash_types rss_hash_type;
1162
1163 if (unlikely(len < vi->hdr_len + ETH_HLEN)) {
1164 pr_debug("%s: short packet %i\n", dev->name, len);
1165 dev->stats.rx_length_errors++;
1166 if (vi->mergeable_rx_bufs) {
1167 put_page(virt_to_head_page(buf));
1168 } else if (vi->big_packets) {
1169 give_pages(rq, buf);
1170 } else {
1171 put_page(virt_to_head_page(buf));
1172 }
1173 return;
1174 }
1175
1176 if (vi->mergeable_rx_bufs)
1177 skb = receive_mergeable(dev, vi, rq, buf, ctx, len, xdp_xmit,
1178 stats);
1179 else if (vi->big_packets)
1180 skb = receive_big(dev, vi, rq, buf, len, stats);
1181 else
1182 skb = receive_small(dev, vi, rq, buf, ctx, len, xdp_xmit, stats);
1183
1184 if (unlikely(!skb))
1185 return;
1186
1187 hdr = skb_vnet_hdr(skb);
1188 if (dev->features & NETIF_F_RXHASH && vi->has_rss_hash_report) {
1189 hdr_hash = (struct virtio_net_hdr_v1_hash *)(hdr);
1190
> 1191 switch (hdr_hash->hash_report) {
1192 case VIRTIO_NET_HASH_REPORT_TCPv4:
1193 case VIRTIO_NET_HASH_REPORT_UDPv4:
1194 case VIRTIO_NET_HASH_REPORT_TCPv6:
1195 case VIRTIO_NET_HASH_REPORT_UDPv6:
1196 case VIRTIO_NET_HASH_REPORT_TCPv6_EX:
1197 case VIRTIO_NET_HASH_REPORT_UDPv6_EX:
1198 rss_hash_type = PKT_HASH_TYPE_L4;
1199 break;
1200 case VIRTIO_NET_HASH_REPORT_IPv4:
1201 case VIRTIO_NET_HASH_REPORT_IPv6:
1202 case VIRTIO_NET_HASH_REPORT_IPv6_EX:
1203 rss_hash_type = PKT_HASH_TYPE_L3;
1204 break;
1205 case VIRTIO_NET_HASH_REPORT_NONE:
1206 default:
1207 rss_hash_type = PKT_HASH_TYPE_NONE;
1208 }
> 1209 skb_set_hash(skb, hdr_hash->hash_value, rss_hash_type);
1210 }
1211
1212 if (hdr->hdr.flags & VIRTIO_NET_HDR_F_DATA_VALID)
1213 skb->ip_summed = CHECKSUM_UNNECESSARY;
1214
1215 if (virtio_net_hdr_to_skb(skb, &hdr->hdr,
1216 virtio_is_little_endian(vi->vdev))) {
1217 net_warn_ratelimited("%s: bad gso: type: %u, size: %u\n",
1218 dev->name, hdr->hdr.gso_type,
1219 hdr->hdr.gso_size);
1220 goto frame_err;
1221 }
1222
1223 skb_record_rx_queue(skb, vq2rxq(rq->vq));
1224 skb->protocol = eth_type_trans(skb, dev);
1225 pr_debug("Receiving skb proto 0x%04x len %i type %i\n",
1226 ntohs(skb->protocol), skb->len, skb->pkt_type);
1227
1228 napi_gro_receive(&rq->napi, skb);
1229 return;
1230
1231 frame_err:
1232 dev->stats.rx_frame_errors++;
1233 dev_kfree_skb(skb);
1234 }
1235
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week