Hi Alexey, [auto build test WARNING on v4.4-rc8] [also build test WARNING on next-20160122] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url: https://github.com/0day-ci/linux/commits/Alexey-Khoroshilov/mptlan-add-checks-for-dma-mapping-errors/20160123-070633 config: x86_64-randconfig-s1-01230930 (attached as .config) reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All warnings (new ones prefixed by >>): In file included from include/uapi/linux/stddef.h:1:0, from include/linux/stddef.h:4, from include/uapi/linux/posix_types.h:4, from include/uapi/linux/types.h:13, from include/linux/types.h:5, from include/linux/list.h:4, from include/linux/module.h:9, from drivers/message/fusion/mptlan.h:55, from drivers/message/fusion/mptlan.c:55: drivers/message/fusion/mptlan.c: In function 'mpt_lan_sdu_send': drivers/message/fusion/mptlan.c:737:24: warning: passing argument 1 of 'dma_mapping_error' from incompatible pointer type [-Wincompatible-pointer-types] if (dma_mapping_error(mpt_dev->pcidev, dma)) { ^ include/linux/compiler.h:147:28: note: in definition of macro '__trace_if' if (__builtin_constant_p((cond)) ? !!(cond) : \ ^ >> drivers/message/fusion/mptlan.c:737:2: note: in expansion of macro 'if' if (dma_mapping_error(mpt_dev->pcidev, dma)) { ^ In file included from arch/x86/include/asm/dma-mapping.h:49:0, from include/linux/dma-mapping.h:87, from include/linux/skbuff.h:34, from include/linux/if_ether.h:23, from include/uapi/linux/ethtool.h:17, from include/linux/ethtool.h:16, from include/linux/netdevice.h:42, from drivers/message/fusion/mptlan.h:58, from drivers/message/fusion/mptlan.c:55: include/asm-generic/dma-mapping-common.h:316:19: note: expected 'struct device *' but argument is of type 'struct pci_dev *' static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) ^ In file included from include/uapi/linux/stddef.h:1:0, from include/linux/stddef.h:4, from include/uapi/linux/posix_types.h:4, from include/uapi/linux/types.h:13, from include/linux/types.h:5, from include/linux/list.h:4, from include/linux/module.h:9, from drivers/message/fusion/mptlan.h:55, from drivers/message/fusion/mptlan.c:55: drivers/message/fusion/mptlan.c:737:24: warning: passing argument 1 of 'dma_mapping_error' from incompatible pointer type [-Wincompatible-pointer-types] if (dma_mapping_error(mpt_dev->pcidev, dma)) { ^ include/linux/compiler.h:147:40: note: in definition of macro '__trace_if' if (__builtin_constant_p((cond)) ? !!(cond) : \ ^ >> drivers/message/fusion/mptlan.c:737:2: note: in expansion of macro 'if' if (dma_mapping_error(mpt_dev->pcidev, dma)) { ^ In file included from arch/x86/include/asm/dma-mapping.h:49:0, from include/linux/dma-mapping.h:87, from include/linux/skbuff.h:34, from include/linux/if_ether.h:23, from include/uapi/linux/ethtool.h:17, from include/linux/ethtool.h:16, from include/linux/netdevice.h:42, from drivers/message/fusion/mptlan.h:58, from drivers/message/fusion/mptlan.c:55: include/asm-generic/dma-mapping-common.h:316:19: note: expected 'struct device *' but argument is of type 'struct pci_dev *' static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) ^ In file included from include/uapi/linux/stddef.h:1:0, from include/linux/stddef.h:4, from include/uapi/linux/posix_types.h:4, from include/uapi/linux/types.h:13, from include/linux/types.h:5, from include/linux/list.h:4, from include/linux/module.h:9, from drivers/message/fusion/mptlan.h:55, from drivers/message/fusion/mptlan.c:55: drivers/message/fusion/mptlan.c:737:24: warning: passing argument 1 of 'dma_mapping_error' from incompatible pointer type [-Wincompatible-pointer-types] if (dma_mapping_error(mpt_dev->pcidev, dma)) { ^ include/linux/compiler.h:158:16: note: in definition of macro '__trace_if' ______r = !!(cond); \ ^ >> drivers/message/fusion/mptlan.c:737:2: note: in expansion of macro 'if' if (dma_mapping_error(mpt_dev->pcidev, dma)) { ^ In file included from arch/x86/include/asm/dma-mapping.h:49:0, from include/linux/dma-mapping.h:87, from include/linux/skbuff.h:34, from include/linux/if_ether.h:23, from include/uapi/linux/ethtool.h:17, from include/linux/ethtool.h:16, from include/linux/netdevice.h:42, from drivers/message/fusion/mptlan.h:58, from drivers/message/fusion/mptlan.c:55: include/asm-generic/dma-mapping-common.h:316:19: note: expected 'struct device *' but argument is of type 'struct pci_dev *' static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr) ^ vim +/if +737 drivers/message/fusion/mptlan.c 721 ctx = priv->mpt_txfidx[priv->mpt_txfidx_tail--]; 722 spin_unlock_irqrestore(&priv->txfidx_lock, flags); 723 724 // dioprintk((KERN_INFO MYNAM ": %s/%s: Creating new msg frame (send).\n", 725 // IOC_AND_NETDEV_NAMES_s_s(dev))); 726 727 pSendReq = (LANSendRequest_t *) mf; 728 729 /* Set the mac.raw pointer, since this apparently isn't getting 730 * done before we get the skb. Pull the data pointer past the mac data. 731 */ 732 skb_reset_mac_header(skb); 733 skb_pull(skb, 12); 734 735 dma = pci_map_single(mpt_dev->pcidev, skb->data, skb->len, 736 PCI_DMA_TODEVICE); > 737 if (dma_mapping_error(mpt_dev->pcidev, dma)) { 738 netif_stop_queue(dev); 739 740 printk (KERN_ERR "%s: dma mapping failed\n", __func__); 741 return NETDEV_TX_BUSY; 742 } 743 744 priv->SendCtl[ctx].skb = skb; 745 priv->SendCtl[ctx].dma = dma; --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: Binary data