[lkundrak-linux-mmp:lr/ariel 43/63] drivers/gpu/drm/armada/armada_drv.c:134:22: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'struct drm_bridge
by kernel test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/lkundrak/linux-mmp.git lr/ariel
head: 72a56aed020b1fb0249195324c4f80a0cf25d72a
commit: cd7477aa54902b350e237cf41dd847ab129f91e6 [43/63] drm/armada: Use non-componentized bridges
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
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
git checkout cd7477aa54902b350e237cf41dd847ab129f91e6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
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/gpu/drm/armada/armada_drv.c: In function 'armada_drm_attach_bridge':
>> drivers/gpu/drm/armada/armada_drv.c:134:22: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'struct drm_bridge *' [-Wformat=]
134 | printk ("XXX XX %08x %pOFfcF\n", bridge, np);
| ~~~^ ~~~~~~
| | |
| unsigned int struct drm_bridge *
# https://git.kernel.org/pub/scm/linux/kernel/git/lkundrak/linux-mmp.git/co...
git remote add lkundrak-linux-mmp git://git.kernel.org/pub/scm/linux/kernel/git/lkundrak/linux-mmp.git
git fetch --no-tags lkundrak-linux-mmp lr/ariel
git checkout cd7477aa54902b350e237cf41dd847ab129f91e6
vim +134 drivers/gpu/drm/armada/armada_drv.c
122
123 static int armada_drm_attach_bridge(struct drm_device *drm, struct device_node *np)
124 {
125 struct drm_encoder *encoder;
126 struct drm_bridge *bridge;
127 int ret;
128
129 encoder = devm_kzalloc(drm->dev, sizeof(*encoder), GFP_KERNEL);
130 if (encoder == NULL)
131 return -ENOMEM;
132
133 bridge = of_drm_find_bridge(np);
> 134 printk ("XXX XX %08x %pOFfcF\n", bridge, np);
135 if (!bridge)
136 return -EINVAL;
137
138 encoder->possible_crtcs = drm_of_find_possible_crtcs(drm, np);
139 ret = drm_encoder_init(drm, encoder, &armada_drm_encoder_funcs,
140 DRM_MODE_ENCODER_TMDS, NULL);
141 if (ret)
142 return ret;
143
144 ret = drm_bridge_attach(encoder, bridge, NULL, 0);
145 if (ret)
146 drm_encoder_cleanup(encoder);
147
148 return ret;
149 }
150
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [Intel-gfx] [PATCH 3/3] dma-buf: Use struct dma_buf_map in dma_buf_vunmap() interfaces
by kernel test robot
Hi Thomas,
I love your patch! Yet something to improve:
[auto build test ERROR on next-20200914]
[also build test ERROR on v5.9-rc5]
[cannot apply to linuxtv-media/master drm-intel/for-linux-next tegra/for-next linus/master v5.9-rc5 v5.9-rc4 v5.9-rc3]
[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/Thomas-Zimmermann/dma-buf-Flag-v...
base: f965d3ec86fa89285db0fbb983da76ba9c398efa
config: x86_64-randconfig-a004-20200913 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b2c32c90bab09a6e2c1f370429db26017a182143)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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/dma-buf/heaps/heap-helpers.c:269:10: error: incompatible function pointer types initializing 'int (*)(struct dma_buf *, struct dma_buf_map *)' with an expression of type 'void *(struct dma_buf *)' [-Werror,-Wincompatible-function-pointer-types]
.vmap = dma_heap_dma_buf_vmap,
^~~~~~~~~~~~~~~~~~~~~
>> drivers/dma-buf/heaps/heap-helpers.c:270:12: error: incompatible function pointer types initializing 'void (*)(struct dma_buf *, struct dma_buf_map *)' with an expression of type 'void (struct dma_buf *, void *)' [-Werror,-Wincompatible-function-pointer-types]
.vunmap = dma_heap_dma_buf_vunmap,
^~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
# https://github.com/0day-ci/linux/commit/7fd403952126005980734501c5d0de5e1...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Thomas-Zimmermann/dma-buf-Flag-vmap-ed-memory-as-system-or-I-O-memory/20200914-192712
git checkout 7fd403952126005980734501c5d0de5e13b3673b
vim +270 drivers/dma-buf/heaps/heap-helpers.c
5248eb12fea890a John Stultz 2019-12-03 259
5248eb12fea890a John Stultz 2019-12-03 260 const struct dma_buf_ops heap_helper_ops = {
5248eb12fea890a John Stultz 2019-12-03 261 .map_dma_buf = dma_heap_map_dma_buf,
5248eb12fea890a John Stultz 2019-12-03 262 .unmap_dma_buf = dma_heap_unmap_dma_buf,
5248eb12fea890a John Stultz 2019-12-03 263 .mmap = dma_heap_mmap,
5248eb12fea890a John Stultz 2019-12-03 264 .release = dma_heap_dma_buf_release,
5248eb12fea890a John Stultz 2019-12-03 265 .attach = dma_heap_attach,
5248eb12fea890a John Stultz 2019-12-03 266 .detach = dma_heap_detach,
5248eb12fea890a John Stultz 2019-12-03 267 .begin_cpu_access = dma_heap_dma_buf_begin_cpu_access,
5248eb12fea890a John Stultz 2019-12-03 268 .end_cpu_access = dma_heap_dma_buf_end_cpu_access,
5248eb12fea890a John Stultz 2019-12-03 @269 .vmap = dma_heap_dma_buf_vmap,
5248eb12fea890a John Stultz 2019-12-03 @270 .vunmap = dma_heap_dma_buf_vunmap,
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[batman:batadv/net 6/9] net/batman-adv/soft-interface.c:367:10: error: implicit declaration of function 'batadv_mcast_forw_send_orig'
by kernel test robot
tree: https://git.open-mesh.org/linux-merge.git batadv/net
head: 11dcc3a7f22d3ee9535bb6c78b493ee002247dd7
commit: 8a75962cf0639f0bd908d46923dbfb2e7fddedf7 [6/9] batman-adv: mcast: fix duplicate mcast packets in BLA backbone from LAN
config: x86_64-randconfig-r021-20200914 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b2c32c90bab09a6e2c1f370429db26017a182143)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 8a75962cf0639f0bd908d46923dbfb2e7fddedf7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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 >>):
>> net/batman-adv/soft-interface.c:367:10: error: implicit declaration of function 'batadv_mcast_forw_send_orig' [-Werror,-Wimplicit-function-declaration]
ret = batadv_mcast_forw_send_orig(bat_priv, skb, vid,
^
net/batman-adv/soft-interface.c:367:10: note: did you mean 'batadv_mcast_forw_send'?
net/batman-adv/multicast.h:80:1: note: 'batadv_mcast_forw_send' declared here
batadv_mcast_forw_send(struct batadv_priv *bat_priv, struct sk_buff *skb,
^
1 error generated.
git remote add batman https://git.open-mesh.org/linux-merge.git
git fetch --no-tags batman batadv/net
git checkout 8a75962cf0639f0bd908d46923dbfb2e7fddedf7
vim +/batadv_mcast_forw_send_orig +367 net/batman-adv/soft-interface.c
179
180 static netdev_tx_t batadv_interface_tx(struct sk_buff *skb,
181 struct net_device *soft_iface)
182 {
183 struct ethhdr *ethhdr;
184 struct batadv_priv *bat_priv = netdev_priv(soft_iface);
185 struct batadv_hard_iface *primary_if = NULL;
186 struct batadv_bcast_packet *bcast_packet;
187 static const u8 stp_addr[ETH_ALEN] = {0x01, 0x80, 0xC2, 0x00,
188 0x00, 0x00};
189 static const u8 ectp_addr[ETH_ALEN] = {0xCF, 0x00, 0x00, 0x00,
190 0x00, 0x00};
191 enum batadv_dhcp_recipient dhcp_rcp = BATADV_DHCP_NO;
192 u8 *dst_hint = NULL, chaddr[ETH_ALEN];
193 struct vlan_ethhdr *vhdr;
194 unsigned int header_len = 0;
195 int data_len = skb->len, ret;
196 unsigned long brd_delay = 1;
197 bool do_bcast = false, client_added;
198 unsigned short vid;
199 u32 seqno;
200 int gw_mode;
201 enum batadv_forw_mode forw_mode = BATADV_FORW_SINGLE;
202 struct batadv_orig_node *mcast_single_orig = NULL;
203 int network_offset = ETH_HLEN;
204 __be16 proto;
205
206 if (atomic_read(&bat_priv->mesh_state) != BATADV_MESH_ACTIVE)
207 goto dropped;
208
209 /* reset control block to avoid left overs from previous users */
210 memset(skb->cb, 0, sizeof(struct batadv_skb_cb));
211
212 netif_trans_update(soft_iface);
213 vid = batadv_get_vid(skb, 0);
214
215 skb_reset_mac_header(skb);
216 ethhdr = eth_hdr(skb);
217
218 proto = ethhdr->h_proto;
219
220 switch (ntohs(proto)) {
221 case ETH_P_8021Q:
222 if (!pskb_may_pull(skb, sizeof(*vhdr)))
223 goto dropped;
224 vhdr = vlan_eth_hdr(skb);
225 proto = vhdr->h_vlan_encapsulated_proto;
226
227 /* drop batman-in-batman packets to prevent loops */
228 if (proto != htons(ETH_P_BATMAN)) {
229 network_offset += VLAN_HLEN;
230 break;
231 }
232
233 fallthrough;
234 case ETH_P_BATMAN:
235 goto dropped;
236 }
237
238 skb_set_network_header(skb, network_offset);
239
240 if (batadv_bla_tx(bat_priv, skb, vid))
241 goto dropped;
242
243 /* skb->data might have been reallocated by batadv_bla_tx() */
244 ethhdr = eth_hdr(skb);
245
246 /* Register the client MAC in the transtable */
247 if (!is_multicast_ether_addr(ethhdr->h_source) &&
248 !batadv_bla_is_loopdetect_mac(ethhdr->h_source)) {
249 client_added = batadv_tt_local_add(soft_iface, ethhdr->h_source,
250 vid, skb->skb_iif,
251 skb->mark);
252 if (!client_added)
253 goto dropped;
254 }
255
256 /* Snoop address candidates from DHCPACKs for early DAT filling */
257 batadv_dat_snoop_outgoing_dhcp_ack(bat_priv, skb, proto, vid);
258
259 /* don't accept stp packets. STP does not help in meshes.
260 * better use the bridge loop avoidance ...
261 *
262 * The same goes for ECTP sent at least by some Cisco Switches,
263 * it might confuse the mesh when used with bridge loop avoidance.
264 */
265 if (batadv_compare_eth(ethhdr->h_dest, stp_addr))
266 goto dropped;
267
268 if (batadv_compare_eth(ethhdr->h_dest, ectp_addr))
269 goto dropped;
270
271 gw_mode = atomic_read(&bat_priv->gw.mode);
272 if (is_multicast_ether_addr(ethhdr->h_dest)) {
273 /* if gw mode is off, broadcast every packet */
274 if (gw_mode == BATADV_GW_MODE_OFF) {
275 do_bcast = true;
276 goto send;
277 }
278
279 dhcp_rcp = batadv_gw_dhcp_recipient_get(skb, &header_len,
280 chaddr);
281 /* skb->data may have been modified by
282 * batadv_gw_dhcp_recipient_get()
283 */
284 ethhdr = eth_hdr(skb);
285 /* if gw_mode is on, broadcast any non-DHCP message.
286 * All the DHCP packets are going to be sent as unicast
287 */
288 if (dhcp_rcp == BATADV_DHCP_NO) {
289 do_bcast = true;
290 goto send;
291 }
292
293 if (dhcp_rcp == BATADV_DHCP_TO_CLIENT)
294 dst_hint = chaddr;
295 else if ((gw_mode == BATADV_GW_MODE_SERVER) &&
296 (dhcp_rcp == BATADV_DHCP_TO_SERVER))
297 /* gateways should not forward any DHCP message if
298 * directed to a DHCP server
299 */
300 goto dropped;
301
302 send:
303 if (do_bcast && !is_broadcast_ether_addr(ethhdr->h_dest)) {
304 forw_mode = batadv_mcast_forw_mode(bat_priv, skb,
305 &mcast_single_orig);
306 if (forw_mode == BATADV_FORW_NONE)
307 goto dropped;
308
309 if (forw_mode == BATADV_FORW_SINGLE ||
310 forw_mode == BATADV_FORW_SOME)
311 do_bcast = false;
312 }
313 }
314
315 batadv_skb_set_priority(skb, 0);
316
317 /* ethernet packet should be broadcasted */
318 if (do_bcast) {
319 primary_if = batadv_primary_if_get_selected(bat_priv);
320 if (!primary_if)
321 goto dropped;
322
323 /* in case of ARP request, we do not immediately broadcasti the
324 * packet, instead we first wait for DAT to try to retrieve the
325 * correct ARP entry
326 */
327 if (batadv_dat_snoop_outgoing_arp_request(bat_priv, skb))
328 brd_delay = msecs_to_jiffies(ARP_REQ_DELAY);
329
330 if (batadv_skb_head_push(skb, sizeof(*bcast_packet)) < 0)
331 goto dropped;
332
333 bcast_packet = (struct batadv_bcast_packet *)skb->data;
334 bcast_packet->version = BATADV_COMPAT_VERSION;
335 bcast_packet->ttl = BATADV_TTL;
336
337 /* batman packet type: broadcast */
338 bcast_packet->packet_type = BATADV_BCAST;
339 bcast_packet->reserved = 0;
340
341 /* hw address of first interface is the orig mac because only
342 * this mac is known throughout the mesh
343 */
344 ether_addr_copy(bcast_packet->orig,
345 primary_if->net_dev->dev_addr);
346
347 /* set broadcast sequence number */
348 seqno = atomic_inc_return(&bat_priv->bcast_seqno);
349 bcast_packet->seqno = htonl(seqno);
350
351 batadv_add_bcast_packet_to_list(bat_priv, skb, brd_delay, true);
352
353 /* a copy is stored in the bcast list, therefore removing
354 * the original skb.
355 */
356 consume_skb(skb);
357
358 /* unicast packet */
359 } else {
360 /* DHCP packets going to a server will use the GW feature */
361 if (dhcp_rcp == BATADV_DHCP_TO_SERVER) {
362 ret = batadv_gw_out_of_range(bat_priv, skb);
363 if (ret)
364 goto dropped;
365 ret = batadv_send_skb_via_gw(bat_priv, skb, vid);
366 } else if (mcast_single_orig) {
> 367 ret = batadv_mcast_forw_send_orig(bat_priv, skb, vid,
368 mcast_single_orig);
369 } else if (forw_mode == BATADV_FORW_SOME) {
370 ret = batadv_mcast_forw_send(bat_priv, skb, vid);
371 } else {
372 if (batadv_dat_snoop_outgoing_arp_request(bat_priv,
373 skb))
374 goto dropped;
375
376 batadv_dat_snoop_outgoing_arp_reply(bat_priv, skb);
377
378 ret = batadv_send_skb_via_tt(bat_priv, skb, dst_hint,
379 vid);
380 }
381 if (ret != NET_XMIT_SUCCESS)
382 goto dropped_freed;
383 }
384
385 batadv_inc_counter(bat_priv, BATADV_CNT_TX);
386 batadv_add_counter(bat_priv, BATADV_CNT_TX_BYTES, data_len);
387 goto end;
388
389 dropped:
390 kfree_skb(skb);
391 dropped_freed:
392 batadv_inc_counter(bat_priv, BATADV_CNT_TX_DROPPED);
393 end:
394 if (mcast_single_orig)
395 batadv_orig_node_put(mcast_single_orig);
396 if (primary_if)
397 batadv_hardif_put(primary_if);
398 return NETDEV_TX_OK;
399 }
400
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [PATCH v10 2/3] drm: bridge: Add support for Cadence MHDP8546 DPI/DP bridge
by kernel test robot
Hi Swapnil,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on robh/for-next]
[also build test WARNING on linus/master v5.9-rc5 next-20200914]
[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/Swapnil-Jakhade/drm-Add-support-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
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/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c: In function 'cdns_mhdp_fw_activate':
>> drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c:749:10: warning: conversion from 'long unsigned int' to 'unsigned int' changes value from '18446744073709551613' to '4294967293' [-Woverflow]
749 | writel(~CDNS_APB_INT_MASK_SW_EVENT_INT,
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c: In function 'cdns_mhdp_fill_host_caps':
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c:1359:30: error: 'struct phy_attrs' has no member named 'max_link_rate'
1359 | link_rate = mhdp->phy->attrs.max_link_rate;
| ^
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c: In function 'cdns_mhdp_attach':
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c:1690:10: warning: conversion from 'long unsigned int' to 'unsigned int' changes value from '18446744073709551613' to '4294967293' [-Woverflow]
1690 | writel(~CDNS_APB_INT_MASK_SW_EVENT_INT,
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c: In function 'cdns_mhdp_bridge_hpd_enable':
drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c:2123:10: warning: conversion from 'long unsigned int' to 'unsigned int' changes value from '18446744073709551613' to '4294967293' [-Woverflow]
2123 | writel(~CDNS_APB_INT_MASK_SW_EVENT_INT,
# https://github.com/0day-ci/linux/commit/747d94aa1dc15ccc7712116aa9161477b...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Swapnil-Jakhade/drm-Add-support-for-Cadence-MHDP8546-DPI-DP-bridge-and-J721E-wrapper/20200914-205242
git checkout 747d94aa1dc15ccc7712116aa9161477b0ff3e85
vim +749 drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c
692
693 static int cdns_mhdp_fw_activate(const struct firmware *fw,
694 struct cdns_mhdp_device *mhdp)
695 {
696 unsigned int reg;
697 int ret;
698
699 /* Release uCPU reset and stall it. */
700 writel(CDNS_CPU_STALL, mhdp->regs + CDNS_APB_CTRL);
701
702 memcpy_toio(mhdp->regs + CDNS_MHDP_IMEM, fw->data, fw->size);
703
704 /* Leave debug mode, release stall */
705 writel(0, mhdp->regs + CDNS_APB_CTRL);
706
707 /*
708 * Wait for the KEEP_ALIVE "message" on the first 8 bits.
709 * Updated each sched "tick" (~2ms)
710 */
711 ret = readl_poll_timeout(mhdp->regs + CDNS_KEEP_ALIVE, reg,
712 reg & CDNS_KEEP_ALIVE_MASK, 500,
713 CDNS_KEEP_ALIVE_TIMEOUT);
714 if (ret) {
715 dev_err(mhdp->dev,
716 "device didn't give any life sign: reg %d\n", reg);
717 return ret;
718 }
719
720 ret = cdns_mhdp_check_fw_version(mhdp);
721 if (ret)
722 return ret;
723
724 /* Init events to 0 as it's not cleared by FW at boot but on read */
725 readl(mhdp->regs + CDNS_SW_EVENT0);
726 readl(mhdp->regs + CDNS_SW_EVENT1);
727 readl(mhdp->regs + CDNS_SW_EVENT2);
728 readl(mhdp->regs + CDNS_SW_EVENT3);
729
730 /* Activate uCPU */
731 ret = cdns_mhdp_set_firmware_active(mhdp, true);
732 if (ret)
733 return ret;
734
735 spin_lock(&mhdp->start_lock);
736
737 mhdp->hw_state = MHDP_HW_READY;
738
739 /*
740 * Here we must keep the lock while enabling the interrupts
741 * since it would otherwise be possible that interrupt enable
742 * code is executed after the bridge is detached. The similar
743 * situation is not possible in attach()/detach() callbacks
744 * since the hw_state changes from MHDP_HW_READY to
745 * MHDP_HW_STOPPED happens only due to driver removal when
746 * bridge should already be detached.
747 */
748 if (mhdp->bridge_attached)
> 749 writel(~CDNS_APB_INT_MASK_SW_EVENT_INT,
750 mhdp->regs + CDNS_APB_INT_MASK);
751
752 spin_unlock(&mhdp->start_lock);
753
754 wake_up(&mhdp->fw_load_wq);
755 dev_dbg(mhdp->dev, "DP FW activated\n");
756
757 return 0;
758 }
759
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [Intel-gfx] [PATCH 2/3] dma-buf: Use struct dma_buf_map in dma_buf_vmap() interfaces
by kernel test robot
Hi Thomas,
I love your patch! Yet something to improve:
[auto build test ERROR on next-20200914]
[also build test ERROR on v5.9-rc5]
[cannot apply to linuxtv-media/master drm-intel/for-linux-next tegra/for-next linus/master v5.9-rc5 v5.9-rc4 v5.9-rc3]
[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/Thomas-Zimmermann/dma-buf-Flag-v...
base: f965d3ec86fa89285db0fbb983da76ba9c398efa
config: x86_64-randconfig-a004-20200913 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b2c32c90bab09a6e2c1f370429db26017a182143)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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/dma-buf/heaps/heap-helpers.c:269:10: error: incompatible function pointer types initializing 'int (*)(struct dma_buf *, struct dma_buf_map *)' with an expression of type 'void *(struct dma_buf *)' [-Werror,-Wincompatible-function-pointer-types]
.vmap = dma_heap_dma_buf_vmap,
^~~~~~~~~~~~~~~~~~~~~
1 error generated.
# https://github.com/0day-ci/linux/commit/b9513704e28f25636f00827154183df60...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Thomas-Zimmermann/dma-buf-Flag-vmap-ed-memory-as-system-or-I-O-memory/20200914-192712
git checkout b9513704e28f25636f00827154183df60a80d95c
vim +269 drivers/dma-buf/heaps/heap-helpers.c
5248eb12fea890a John Stultz 2019-12-03 259
5248eb12fea890a John Stultz 2019-12-03 260 const struct dma_buf_ops heap_helper_ops = {
5248eb12fea890a John Stultz 2019-12-03 261 .map_dma_buf = dma_heap_map_dma_buf,
5248eb12fea890a John Stultz 2019-12-03 262 .unmap_dma_buf = dma_heap_unmap_dma_buf,
5248eb12fea890a John Stultz 2019-12-03 263 .mmap = dma_heap_mmap,
5248eb12fea890a John Stultz 2019-12-03 264 .release = dma_heap_dma_buf_release,
5248eb12fea890a John Stultz 2019-12-03 265 .attach = dma_heap_attach,
5248eb12fea890a John Stultz 2019-12-03 266 .detach = dma_heap_detach,
5248eb12fea890a John Stultz 2019-12-03 267 .begin_cpu_access = dma_heap_dma_buf_begin_cpu_access,
5248eb12fea890a John Stultz 2019-12-03 268 .end_cpu_access = dma_heap_dma_buf_end_cpu_access,
5248eb12fea890a John Stultz 2019-12-03 @269 .vmap = dma_heap_dma_buf_vmap,
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [PATCH -next] dm integrity: convert to use le64_add_cpu()
by kernel test robot
Hi Liu,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on next-20200911]
url: https://github.com/0day-ci/linux/commits/Liu-Shixin/dm-integrity-convert-...
base: d5b2251d63b5344ee827d3680fa79bdb9f9ddfa1
config: x86_64-randconfig-s022-20200914 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-191-g10164920-dirty
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
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/md/dm-integrity.c:2672:25: sparse: sparse: cast to restricted __le64
drivers/md/dm-integrity.c:2712:25: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] sector_hi @@ got restricted __le32 [usertype] @@
drivers/md/dm-integrity.c:2712:25: sparse: expected unsigned int [usertype] sector_hi
drivers/md/dm-integrity.c:2712:25: sparse: got restricted __le32 [usertype]
drivers/md/dm-integrity.c:2784:38: sparse: sparse: restricted __le32 degrades to integer
drivers/md/dm-integrity.c:2945:31: sparse: sparse: invalid assignment: &=
drivers/md/dm-integrity.c:2945:31: sparse: left side has type unsigned int
drivers/md/dm-integrity.c:2945:31: sparse: right side has type restricted __le32
drivers/md/dm-integrity.c:2960:43: sparse: sparse: cast to restricted __le64
drivers/md/dm-integrity.c:2977:47: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] provided_data_sectors @@ got restricted __le64 [usertype] @@
drivers/md/dm-integrity.c:2977:47: sparse: expected unsigned long long [usertype] provided_data_sectors
drivers/md/dm-integrity.c:2977:47: sparse: got restricted __le64 [usertype]
drivers/md/dm-integrity.c:2983:29: sparse: sparse: restricted __le32 degrades to integer
drivers/md/dm-integrity.c:2993:55: sparse: sparse: invalid assignment: |=
drivers/md/dm-integrity.c:2993:55: sparse: left side has type unsigned int
drivers/md/dm-integrity.c:2993:55: sparse: right side has type restricted __le32
drivers/md/dm-integrity.c:2994:63: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] recalc_sector @@ got restricted __le64 [usertype] @@
drivers/md/dm-integrity.c:2994:63: sparse: expected unsigned long long [usertype] recalc_sector
drivers/md/dm-integrity.c:2994:63: sparse: got restricted __le64 [usertype]
drivers/md/dm-integrity.c:3005:47: sparse: sparse: invalid assignment: |=
drivers/md/dm-integrity.c:3005:47: sparse: left side has type unsigned int
drivers/md/dm-integrity.c:3005:47: sparse: right side has type restricted __le32
drivers/md/dm-integrity.c:3006:55: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] recalc_sector @@ got restricted __le64 [usertype] @@
drivers/md/dm-integrity.c:3006:55: sparse: expected unsigned long long [usertype] recalc_sector
drivers/md/dm-integrity.c:3006:55: sparse: got restricted __le64 [usertype]
drivers/md/dm-integrity.c:3011:47: sparse: sparse: invalid assignment: |=
drivers/md/dm-integrity.c:3011:47: sparse: left side has type unsigned int
drivers/md/dm-integrity.c:3011:47: sparse: right side has type restricted __le32
drivers/md/dm-integrity.c:3012:55: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] recalc_sector @@ got restricted __le64 [usertype] @@
drivers/md/dm-integrity.c:3012:55: sparse: expected unsigned long long [usertype] recalc_sector
drivers/md/dm-integrity.c:3012:55: sparse: got restricted __le64 [usertype]
drivers/md/dm-integrity.c:3016:39: sparse: sparse: invalid assignment: &=
drivers/md/dm-integrity.c:3016:39: sparse: left side has type unsigned int
drivers/md/dm-integrity.c:3016:39: sparse: right side has type restricted __le32
drivers/md/dm-integrity.c:3024:39: sparse: sparse: invalid assignment: |=
drivers/md/dm-integrity.c:3024:39: sparse: left side has type unsigned int
drivers/md/dm-integrity.c:3024:39: sparse: right side has type restricted __le32
drivers/md/dm-integrity.c:3033:45: sparse: sparse: restricted __le32 degrades to integer
drivers/md/dm-integrity.c:3034:29: sparse: sparse: cast to restricted __le64
drivers/md/dm-integrity.c:3035:66: sparse: sparse: cast to restricted __le64
drivers/md/dm-integrity.c:3036:77: sparse: sparse: cast to restricted __le64
drivers/md/dm-integrity.c:3037:72: sparse: sparse: cast to restricted __le64
drivers/md/dm-integrity.c:3038:77: sparse: sparse: cast to restricted __le64
drivers/md/dm-integrity.c:3039:75: sparse: sparse: cast to restricted __le64
drivers/md/dm-integrity.c:3040:77: sparse: sparse: cast to restricted __le64
drivers/md/dm-integrity.c:3048:29: sparse: sparse: restricted __le32 degrades to integer
drivers/md/dm-integrity.c:3049:36: sparse: sparse: cast to restricted __le64
drivers/md/dm-integrity.c:3054:47: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] recalc_sector @@ got restricted __le64 [usertype] @@
drivers/md/dm-integrity.c:3054:47: sparse: expected unsigned long long [usertype] recalc_sector
drivers/md/dm-integrity.c:3054:47: sparse: got restricted __le64 [usertype]
drivers/md/dm-integrity.c:3082:37: sparse: sparse: restricted __le32 degrades to integer
drivers/md/dm-integrity.c:3083:25: sparse: sparse: cast to restricted __le64
drivers/md/dm-integrity.c:3095:49: sparse: sparse: restricted __le32 degrades to integer
drivers/md/dm-integrity.c:3104:47: sparse: sparse: restricted __le32 degrades to integer
drivers/md/dm-integrity.c:3111:37: sparse: sparse: restricted __le32 degrades to integer
drivers/md/dm-integrity.c:3126:38: sparse: sparse: restricted __le32 degrades to integer
drivers/md/dm-integrity.c:3171:32: sparse: sparse: cast to restricted __le32
drivers/md/dm-integrity.c:3175:29: sparse: sparse: restricted __le32 degrades to integer
drivers/md/dm-integrity.c:3198:41: sparse: sparse: restricted __le32 degrades to integer
drivers/md/dm-integrity.c:3253:36: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] integrity_tag_size @@ got restricted __le16 [usertype] @@
drivers/md/dm-integrity.c:3253:36: sparse: expected unsigned short [usertype] integrity_tag_size
drivers/md/dm-integrity.c:3253:36: sparse: got restricted __le16 [usertype]
drivers/md/dm-integrity.c:3256:31: sparse: sparse: invalid assignment: |=
drivers/md/dm-integrity.c:3256:31: sparse: left side has type unsigned int
drivers/md/dm-integrity.c:3256:31: sparse: right side has type restricted __le32
drivers/md/dm-integrity.c:3265:39: sparse: sparse: invalid assignment: |=
drivers/md/dm-integrity.c:3265:39: sparse: left side has type unsigned int
drivers/md/dm-integrity.c:3265:39: sparse: right side has type restricted __le32
drivers/md/dm-integrity.c:3266:42: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] journal_sections @@ got restricted __le32 [usertype] @@
drivers/md/dm-integrity.c:3266:42: sparse: expected unsigned int [usertype] journal_sections
drivers/md/dm-integrity.c:3266:42: sparse: got restricted __le32 [usertype]
drivers/md/dm-integrity.c:3284:42: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] journal_sections @@ got restricted __le32 [usertype] @@
drivers/md/dm-integrity.c:3284:42: sparse: expected unsigned int [usertype] journal_sections
drivers/md/dm-integrity.c:3284:42: sparse: got restricted __le32 [usertype]
drivers/md/dm-integrity.c:3286:55: sparse: sparse: cast to restricted __le32
drivers/md/dm-integrity.c:3290:50: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] journal_sections @@ got restricted __le32 [usertype] @@
drivers/md/dm-integrity.c:3290:50: sparse: expected unsigned int [usertype] journal_sections
drivers/md/dm-integrity.c:3290:50: sparse: got restricted __le32 [usertype]
drivers/md/dm-integrity.c:3292:58: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] journal_sections @@ got restricted __le32 [usertype] @@
drivers/md/dm-integrity.c:3292:58: sparse: expected unsigned int [usertype] journal_sections
drivers/md/dm-integrity.c:3292:58: sparse: got restricted __le32 [usertype]
drivers/md/dm-integrity.c:3295:22: sparse: sparse: cast to restricted __le32
drivers/md/dm-integrity.c:3304:39: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] provided_data_sectors @@ got restricted __le64 [usertype] @@
drivers/md/dm-integrity.c:3304:39: sparse: expected unsigned long long [usertype] provided_data_sectors
drivers/md/dm-integrity.c:3304:39: sparse: got restricted __le64 [usertype]
drivers/md/dm-integrity.c:3496:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long @@ got restricted __le64 [usertype] @@
drivers/md/dm-integrity.c:3496:27: sparse: expected unsigned long long
drivers/md/dm-integrity.c:3496:27: sparse: got restricted __le64 [usertype]
drivers/md/dm-integrity.c:3497:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long @@ got restricted __le64 [usertype] @@
drivers/md/dm-integrity.c:3497:27: sparse: expected unsigned long long
drivers/md/dm-integrity.c:3497:27: sparse: got restricted __le64 [usertype]
drivers/md/dm-integrity.c:3498:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long @@ got restricted __le64 [usertype] @@
drivers/md/dm-integrity.c:3498:27: sparse: expected unsigned long long
drivers/md/dm-integrity.c:3498:27: sparse: got restricted __le64 [usertype]
drivers/md/dm-integrity.c:3499:27: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long @@ got restricted __le64 [usertype] @@
drivers/md/dm-integrity.c:3499:27: sparse: expected unsigned long long
drivers/md/dm-integrity.c:3499:27: sparse: got restricted __le64 [usertype]
drivers/md/dm-integrity.c:3653:52: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int [usertype] section_le @@ got restricted __le32 [usertype] @@
drivers/md/dm-integrity.c:3653:52: sparse: expected unsigned int [usertype] section_le
drivers/md/dm-integrity.c:3653:52: sparse: got restricted __le32 [usertype]
>> drivers/md/dm-integrity.c:3699:61: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected restricted __le64 [usertype] *var @@ got unsigned long long * @@
>> drivers/md/dm-integrity.c:3699:61: sparse: expected restricted __le64 [usertype] *var
>> drivers/md/dm-integrity.c:3699:61: sparse: got unsigned long long *
drivers/md/dm-integrity.c:4066:13: sparse: sparse: cast to restricted __le16
drivers/md/dm-integrity.c:4076:14: sparse: sparse: cast to restricted __le32
drivers/md/dm-integrity.c:4096:32: sparse: sparse: restricted __le32 degrades to integer
drivers/md/dm-integrity.c:4174:55: sparse: sparse: restricted __le32 degrades to integer
drivers/md/dm-integrity.c:4175:31: sparse: sparse: invalid assignment: |=
drivers/md/dm-integrity.c:4175:31: sparse: left side has type unsigned int
drivers/md/dm-integrity.c:4175:31: sparse: right side has type restricted __le32
drivers/md/dm-integrity.c:4176:39: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] recalc_sector @@ got restricted __le64 [usertype] @@
drivers/md/dm-integrity.c:4176:39: sparse: expected unsigned long long [usertype] recalc_sector
drivers/md/dm-integrity.c:4176:39: sparse: got restricted __le64 [usertype]
# https://github.com/0day-ci/linux/commit/d0fe72210efe84e8e9c90b1650eb8a572...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Liu-Shixin/dm-integrity-convert-to-use-le64_add_cpu/20200914-115650
git checkout d0fe72210efe84e8e9c90b1650eb8a5728378dbe
vim +3699 drivers/md/dm-integrity.c
3487
3488 static int create_journal(struct dm_integrity_c *ic, char **error)
3489 {
3490 int r = 0;
3491 unsigned i;
3492 __u64 journal_pages, journal_desc_size, journal_tree_size;
3493 unsigned char *crypt_data = NULL, *crypt_iv = NULL;
3494 struct skcipher_request *req = NULL;
3495
3496 ic->commit_ids[0] = cpu_to_le64(0x1111111111111111ULL);
3497 ic->commit_ids[1] = cpu_to_le64(0x2222222222222222ULL);
3498 ic->commit_ids[2] = cpu_to_le64(0x3333333333333333ULL);
3499 ic->commit_ids[3] = cpu_to_le64(0x4444444444444444ULL);
3500
3501 journal_pages = roundup((__u64)ic->journal_sections * ic->journal_section_sectors,
3502 PAGE_SIZE >> SECTOR_SHIFT) >> (PAGE_SHIFT - SECTOR_SHIFT);
3503 journal_desc_size = journal_pages * sizeof(struct page_list);
3504 if (journal_pages >= totalram_pages() - totalhigh_pages() || journal_desc_size > ULONG_MAX) {
3505 *error = "Journal doesn't fit into memory";
3506 r = -ENOMEM;
3507 goto bad;
3508 }
3509 ic->journal_pages = journal_pages;
3510
3511 ic->journal = dm_integrity_alloc_page_list(ic->journal_pages);
3512 if (!ic->journal) {
3513 *error = "Could not allocate memory for journal";
3514 r = -ENOMEM;
3515 goto bad;
3516 }
3517 if (ic->journal_crypt_alg.alg_string) {
3518 unsigned ivsize, blocksize;
3519 struct journal_completion comp;
3520
3521 comp.ic = ic;
3522 ic->journal_crypt = crypto_alloc_skcipher(ic->journal_crypt_alg.alg_string, 0, 0);
3523 if (IS_ERR(ic->journal_crypt)) {
3524 *error = "Invalid journal cipher";
3525 r = PTR_ERR(ic->journal_crypt);
3526 ic->journal_crypt = NULL;
3527 goto bad;
3528 }
3529 ivsize = crypto_skcipher_ivsize(ic->journal_crypt);
3530 blocksize = crypto_skcipher_blocksize(ic->journal_crypt);
3531
3532 if (ic->journal_crypt_alg.key) {
3533 r = crypto_skcipher_setkey(ic->journal_crypt, ic->journal_crypt_alg.key,
3534 ic->journal_crypt_alg.key_size);
3535 if (r) {
3536 *error = "Error setting encryption key";
3537 goto bad;
3538 }
3539 }
3540 DEBUG_print("cipher %s, block size %u iv size %u\n",
3541 ic->journal_crypt_alg.alg_string, blocksize, ivsize);
3542
3543 ic->journal_io = dm_integrity_alloc_page_list(ic->journal_pages);
3544 if (!ic->journal_io) {
3545 *error = "Could not allocate memory for journal io";
3546 r = -ENOMEM;
3547 goto bad;
3548 }
3549
3550 if (blocksize == 1) {
3551 struct scatterlist *sg;
3552
3553 req = skcipher_request_alloc(ic->journal_crypt, GFP_KERNEL);
3554 if (!req) {
3555 *error = "Could not allocate crypt request";
3556 r = -ENOMEM;
3557 goto bad;
3558 }
3559
3560 crypt_iv = kzalloc(ivsize, GFP_KERNEL);
3561 if (!crypt_iv) {
3562 *error = "Could not allocate iv";
3563 r = -ENOMEM;
3564 goto bad;
3565 }
3566
3567 ic->journal_xor = dm_integrity_alloc_page_list(ic->journal_pages);
3568 if (!ic->journal_xor) {
3569 *error = "Could not allocate memory for journal xor";
3570 r = -ENOMEM;
3571 goto bad;
3572 }
3573
3574 sg = kvmalloc_array(ic->journal_pages + 1,
3575 sizeof(struct scatterlist),
3576 GFP_KERNEL);
3577 if (!sg) {
3578 *error = "Unable to allocate sg list";
3579 r = -ENOMEM;
3580 goto bad;
3581 }
3582 sg_init_table(sg, ic->journal_pages + 1);
3583 for (i = 0; i < ic->journal_pages; i++) {
3584 char *va = lowmem_page_address(ic->journal_xor[i].page);
3585 clear_page(va);
3586 sg_set_buf(&sg[i], va, PAGE_SIZE);
3587 }
3588 sg_set_buf(&sg[i], &ic->commit_ids, sizeof ic->commit_ids);
3589
3590 skcipher_request_set_crypt(req, sg, sg,
3591 PAGE_SIZE * ic->journal_pages + sizeof ic->commit_ids, crypt_iv);
3592 init_completion(&comp.comp);
3593 comp.in_flight = (atomic_t)ATOMIC_INIT(1);
3594 if (do_crypt(true, req, &comp))
3595 wait_for_completion(&comp.comp);
3596 kvfree(sg);
3597 r = dm_integrity_failed(ic);
3598 if (r) {
3599 *error = "Unable to encrypt journal";
3600 goto bad;
3601 }
3602 DEBUG_bytes(lowmem_page_address(ic->journal_xor[0].page), 64, "xor data");
3603
3604 crypto_free_skcipher(ic->journal_crypt);
3605 ic->journal_crypt = NULL;
3606 } else {
3607 unsigned crypt_len = roundup(ivsize, blocksize);
3608
3609 req = skcipher_request_alloc(ic->journal_crypt, GFP_KERNEL);
3610 if (!req) {
3611 *error = "Could not allocate crypt request";
3612 r = -ENOMEM;
3613 goto bad;
3614 }
3615
3616 crypt_iv = kmalloc(ivsize, GFP_KERNEL);
3617 if (!crypt_iv) {
3618 *error = "Could not allocate iv";
3619 r = -ENOMEM;
3620 goto bad;
3621 }
3622
3623 crypt_data = kmalloc(crypt_len, GFP_KERNEL);
3624 if (!crypt_data) {
3625 *error = "Unable to allocate crypt data";
3626 r = -ENOMEM;
3627 goto bad;
3628 }
3629
3630 ic->journal_scatterlist = dm_integrity_alloc_journal_scatterlist(ic, ic->journal);
3631 if (!ic->journal_scatterlist) {
3632 *error = "Unable to allocate sg list";
3633 r = -ENOMEM;
3634 goto bad;
3635 }
3636 ic->journal_io_scatterlist = dm_integrity_alloc_journal_scatterlist(ic, ic->journal_io);
3637 if (!ic->journal_io_scatterlist) {
3638 *error = "Unable to allocate sg list";
3639 r = -ENOMEM;
3640 goto bad;
3641 }
3642 ic->sk_requests = kvmalloc_array(ic->journal_sections,
3643 sizeof(struct skcipher_request *),
3644 GFP_KERNEL | __GFP_ZERO);
3645 if (!ic->sk_requests) {
3646 *error = "Unable to allocate sk requests";
3647 r = -ENOMEM;
3648 goto bad;
3649 }
3650 for (i = 0; i < ic->journal_sections; i++) {
3651 struct scatterlist sg;
3652 struct skcipher_request *section_req;
3653 __u32 section_le = cpu_to_le32(i);
3654
3655 memset(crypt_iv, 0x00, ivsize);
3656 memset(crypt_data, 0x00, crypt_len);
3657 memcpy(crypt_data, §ion_le, min((size_t)crypt_len, sizeof(section_le)));
3658
3659 sg_init_one(&sg, crypt_data, crypt_len);
3660 skcipher_request_set_crypt(req, &sg, &sg, crypt_len, crypt_iv);
3661 init_completion(&comp.comp);
3662 comp.in_flight = (atomic_t)ATOMIC_INIT(1);
3663 if (do_crypt(true, req, &comp))
3664 wait_for_completion(&comp.comp);
3665
3666 r = dm_integrity_failed(ic);
3667 if (r) {
3668 *error = "Unable to generate iv";
3669 goto bad;
3670 }
3671
3672 section_req = skcipher_request_alloc(ic->journal_crypt, GFP_KERNEL);
3673 if (!section_req) {
3674 *error = "Unable to allocate crypt request";
3675 r = -ENOMEM;
3676 goto bad;
3677 }
3678 section_req->iv = kmalloc_array(ivsize, 2,
3679 GFP_KERNEL);
3680 if (!section_req->iv) {
3681 skcipher_request_free(section_req);
3682 *error = "Unable to allocate iv";
3683 r = -ENOMEM;
3684 goto bad;
3685 }
3686 memcpy(section_req->iv + ivsize, crypt_data, ivsize);
3687 section_req->cryptlen = (size_t)ic->journal_section_sectors << SECTOR_SHIFT;
3688 ic->sk_requests[i] = section_req;
3689 DEBUG_bytes(crypt_data, ivsize, "iv(%u)", i);
3690 }
3691 }
3692 }
3693
3694 for (i = 0; i < N_COMMIT_IDS; i++) {
3695 unsigned j;
3696 retest_commit_id:
3697 for (j = 0; j < i; j++) {
3698 if (ic->commit_ids[j] == ic->commit_ids[i]) {
> 3699 le64_add_cpu(&ic->commit_ids[i], 1);
3700 goto retest_commit_id;
3701 }
3702 }
3703 DEBUG_print("commit id %u: %016llx\n", i, ic->commit_ids[i]);
3704 }
3705
3706 journal_tree_size = (__u64)ic->journal_entries * sizeof(struct journal_node);
3707 if (journal_tree_size > ULONG_MAX) {
3708 *error = "Journal doesn't fit into memory";
3709 r = -ENOMEM;
3710 goto bad;
3711 }
3712 ic->journal_tree = kvmalloc(journal_tree_size, GFP_KERNEL);
3713 if (!ic->journal_tree) {
3714 *error = "Could not allocate memory for journal tree";
3715 r = -ENOMEM;
3716 }
3717 bad:
3718 kfree(crypt_data);
3719 kfree(crypt_iv);
3720 skcipher_request_free(req);
3721
3722 return r;
3723 }
3724
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[hch-misc:dma-ranges.3 25/25] include/linux/dma-direct.h:82:38: error: use of undeclared identifier 'dma_addr'; did you mean
by kernel test robot
tree: git://git.infradead.org/users/hch/misc.git dma-ranges.3
head: e65920d7e325dcfaa9c560553c007cddfa199868
commit: e65920d7e325dcfaa9c560553c007cddfa199868 [25/25] dma-mapping: introduce DMA range map, supplanting dma_pfn_offset
config: arm64-randconfig-r024-20200914 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b2c32c90bab09a6e2c1f370429db26017a182143)
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
git checkout e65920d7e325dcfaa9c560553c007cddfa199868
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from arch/arm64/mm/init.c:23:
>> include/linux/dma-direct.h:82:38: error: use of undeclared identifier 'dma_addr'; did you mean 'dev_addr'?
paddr = translate_dma_to_phys(dev, dma_addr);
^~~~~~~~
dev_addr
include/linux/dma-direct.h:77:70: note: 'dev_addr' declared here
static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dev_addr)
^
include/linux/dma-direct.h:84:11: error: use of undeclared identifier 'dma_addr'; did you mean 'dev_addr'?
paddr = dma_addr;
^~~~~~~~
dev_addr
include/linux/dma-direct.h:77:70: note: 'dev_addr' declared here
static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dev_addr)
^
2 errors generated.
--
In file included from kernel/dma/direct.c:10:
>> include/linux/dma-direct.h:82:38: error: use of undeclared identifier 'dma_addr'; did you mean 'dev_addr'?
paddr = translate_dma_to_phys(dev, dma_addr);
^~~~~~~~
dev_addr
include/linux/dma-direct.h:77:70: note: 'dev_addr' declared here
static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dev_addr)
^
include/linux/dma-direct.h:84:11: error: use of undeclared identifier 'dma_addr'; did you mean 'dev_addr'?
paddr = dma_addr;
^~~~~~~~
dev_addr
include/linux/dma-direct.h:77:70: note: 'dev_addr' declared here
static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dev_addr)
^
>> kernel/dma/direct.c:135:20: warning: shift count >= width of type [-Wshift-count-overflow]
phys_limit < DMA_BIT_MASK(64) &&
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
1 warning and 2 errors generated.
--
In file included from kernel/dma/swiotlb.c:24:
>> include/linux/dma-direct.h:82:38: error: use of undeclared identifier 'dma_addr'; did you mean 'dev_addr'?
paddr = translate_dma_to_phys(dev, dma_addr);
^~~~~~~~
dev_addr
include/linux/dma-direct.h:77:70: note: 'dev_addr' declared here
static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dev_addr)
^
include/linux/dma-direct.h:84:11: error: use of undeclared identifier 'dma_addr'; did you mean 'dev_addr'?
paddr = dma_addr;
^~~~~~~~
dev_addr
include/linux/dma-direct.h:77:70: note: 'dev_addr' declared here
static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dev_addr)
^
kernel/dma/swiotlb.c:278:1: warning: no previous prototype for function 'swiotlb_late_init_with_default_size' [-Wmissing-prototypes]
swiotlb_late_init_with_default_size(size_t default_size)
^
kernel/dma/swiotlb.c:277:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int
^
static
1 warning and 2 errors generated.
git remote add hch-misc git://git.infradead.org/users/hch/misc.git
git fetch --no-tags hch-misc dma-ranges.3
git checkout e65920d7e325dcfaa9c560553c007cddfa199868
vim +82 include/linux/dma-direct.h
76
77 static inline phys_addr_t dma_to_phys(struct device *dev, dma_addr_t dev_addr)
78 {
79 phys_addr_t paddr;
80
81 if (dev->dma_range_map)
> 82 paddr = translate_dma_to_phys(dev, dma_addr);
83 else
84 paddr = dma_addr;
85
86 return __sme_clr(paddr);
87 }
88 #endif /* !CONFIG_ARCH_HAS_PHYS_TO_DMA */
89
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [Intel-gfx] [PATCH 3/3] dma-buf: Use struct dma_buf_map in dma_buf_vunmap() interfaces
by kernel test robot
Hi Thomas,
I love your patch! Perhaps something to improve:
[auto build test WARNING on next-20200914]
[also build test WARNING on v5.9-rc5]
[cannot apply to linuxtv-media/master drm-intel/for-linux-next tegra/for-next linus/master v5.9-rc5 v5.9-rc4 v5.9-rc3]
[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/Thomas-Zimmermann/dma-buf-Flag-v...
base: f965d3ec86fa89285db0fbb983da76ba9c398efa
config: arm-randconfig-r002-20200914 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b2c32c90bab09a6e2c1f370429db26017a182143)
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
# 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(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/drm_gem_cma_helper.c:179:50: warning: variable 'cma_obj' is uninitialized when used here [-Wuninitialized]
struct dma_buf_map map = DMA_BUF_MAP_INIT_VADDR(cma_obj->vaddr);
^~~~~~~
include/linux/dma-buf-map.h:37:13: note: expanded from macro 'DMA_BUF_MAP_INIT_VADDR'
.vaddr = (vaddr_), \
^~~~~~
drivers/gpu/drm/drm_gem_cma_helper.c:178:36: note: initialize the variable 'cma_obj' to silence this warning
struct drm_gem_cma_object *cma_obj;
^
= NULL
1 warning generated.
# https://github.com/0day-ci/linux/commit/7fd403952126005980734501c5d0de5e1...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Thomas-Zimmermann/dma-buf-Flag-vmap-ed-memory-as-system-or-I-O-memory/20200914-192712
git checkout 7fd403952126005980734501c5d0de5e13b3673b
vim +/cma_obj +179 drivers/gpu/drm/drm_gem_cma_helper.c
165
166 /**
167 * drm_gem_cma_free_object - free resources associated with a CMA GEM object
168 * @gem_obj: GEM object to free
169 *
170 * This function frees the backing memory of the CMA GEM object, cleans up the
171 * GEM object state and frees the memory used to store the object itself.
172 * If the buffer is imported and the virtual address is set, it is released.
173 * Drivers using the CMA helpers should set this as their
174 * &drm_driver.gem_free_object_unlocked callback.
175 */
176 void drm_gem_cma_free_object(struct drm_gem_object *gem_obj)
177 {
178 struct drm_gem_cma_object *cma_obj;
> 179 struct dma_buf_map map = DMA_BUF_MAP_INIT_VADDR(cma_obj->vaddr);
180
181 cma_obj = to_drm_gem_cma_obj(gem_obj);
182
183 if (gem_obj->import_attach) {
184 if (cma_obj->vaddr)
185 dma_buf_vunmap(gem_obj->import_attach->dmabuf, &map);
186 drm_prime_gem_destroy(gem_obj, cma_obj->sgt);
187 } else if (cma_obj->vaddr) {
188 dma_free_wc(gem_obj->dev->dev, cma_obj->base.size,
189 cma_obj->vaddr, cma_obj->paddr);
190 }
191
192 drm_gem_object_release(gem_obj);
193
194 kfree(cma_obj);
195 }
196 EXPORT_SYMBOL_GPL(drm_gem_cma_free_object);
197
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years