tree: https://github.com/Xilinx/linux-xlnx xilinx_rebase_v4.19 head: dddc237ef081f2a1104983a537498ee517bfb0d3 commit: 928a012bc8be5a013cb63d2336797091b2197c38 [1570/1667] staging: xlnx_tsmux: Initial version of xlnx mpeg2tsmux driver config: c6x-allyesconfig (attached as .config) compiler: c6x-elf-gcc (GCC) 7.4.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 928a012bc8be5a013cb63d2336797091b2197c38 # save the attached .config to linux build tree GCC_VERSION=7.4.0 make.cross ARCH=c6x If you fix the issue, kindly add following tag Reported-by: kbuild test robot All warnings (new ones prefixed by >>): In file included from include/linux/printk.h:336:0, from include/linux/kernel.h:14, from include/linux/list.h:9, from include/linux/kobject.h:19, from include/linux/cdev.h:5, from drivers/staging/xlnx_tsmux/xlnx_mpg2tsmux.c:10: drivers/staging/xlnx_tsmux/xlnx_mpg2tsmux.c: In function 'xlnx_tsmux_ioctl_verify_dmabuf': >> drivers/staging/xlnx_tsmux/xlnx_mpg2tsmux.c:1020:6: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 5 has type 'dma_addr_t {aka unsigned int}' [-Wformat=] "%s: phy-addr=0x%llx for src dmabuf=%d", ^ include/linux/dynamic_debug.h:135:39: note: in definition of macro 'dynamic_dev_dbg' __dynamic_dev_dbg(&descriptor, dev, fmt, \ ^~~ include/linux/device.h:1428:23: note: in expansion of macro 'dev_fmt' dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__) ^~~~~~~ >> drivers/staging/xlnx_tsmux/xlnx_mpg2tsmux.c:1019:5: note: in expansion of macro 'dev_dbg' dev_dbg(mpgmuxts->dev, ^~~~~~~ drivers/staging/xlnx_tsmux/xlnx_mpg2tsmux.c:1048:6: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'dma_addr_t {aka unsigned int}' [-Wformat=] "phy-addr=0x%llx for src dmabuf=%d", ^ include/linux/dynamic_debug.h:135:39: note: in definition of macro 'dynamic_dev_dbg' __dynamic_dev_dbg(&descriptor, dev, fmt, \ ^~~ include/linux/device.h:1428:23: note: in expansion of macro 'dev_fmt' dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__) ^~~~~~~ drivers/staging/xlnx_tsmux/xlnx_mpg2tsmux.c:1047:5: note: in expansion of macro 'dev_dbg' dev_dbg(mpgmuxts->dev, ^~~~~~~ vim +1020 drivers/staging/xlnx_tsmux/xlnx_mpg2tsmux.c 948 949 static int xlnx_tsmux_ioctl_verify_dmabuf(struct xlnx_tsmux *mpgmuxts, 950 void __user *arg) 951 { 952 struct dma_buf *dbuf; 953 struct dma_buf_attachment *attach; 954 struct sg_table *sgt; 955 struct xlnx_tsmux_dmabuf_info *dbuf_info; 956 s32 i; 957 int ret = 0; 958 959 dbuf_info = kzalloc(sizeof(*dbuf_info), GFP_KERNEL); 960 if (!dbuf_info) 961 return -ENOMEM; 962 963 ret = copy_from_user(dbuf_info, arg, sizeof(*dbuf_info)); 964 if (ret) { 965 dev_err(mpgmuxts->dev, "Failed to copy from user"); 966 goto dmak_free; 967 } 968 if (dbuf_info->dir != DMA_TO_MPG2MUX && 969 dbuf_info->dir != DMA_FROM_MPG2MUX) { 970 dev_err(mpgmuxts->dev, "Incorrect DMABUF direction %d", 971 dbuf_info->dir); 972 ret = -EINVAL; 973 goto dmak_free; 974 } 975 dbuf = dma_buf_get(dbuf_info->buf_fd); 976 if (IS_ERR(dbuf)) { 977 dev_err(mpgmuxts->dev, "dma_buf_get fail fd %d direction %d", 978 dbuf_info->buf_fd, dbuf_info->dir); 979 ret = PTR_ERR(dbuf); 980 goto dmak_free; 981 } 982 attach = dma_buf_attach(dbuf, mpgmuxts->dev); 983 if (IS_ERR(attach)) { 984 dev_err(mpgmuxts->dev, "dma_buf_attach fail fd %d dir %d", 985 dbuf_info->buf_fd, dbuf_info->dir); 986 ret = PTR_ERR(attach); 987 goto err_dmabuf_put; 988 } 989 sgt = dma_buf_map_attachment(attach, 990 (enum dma_data_direction)(dbuf_info->dir)); 991 if (IS_ERR(sgt)) { 992 dev_err(mpgmuxts->dev, "dma_buf_map_attach fail fd %d dir %d", 993 dbuf_info->buf_fd, dbuf_info->dir); 994 ret = PTR_ERR(sgt); 995 goto err_dmabuf_detach; 996 } 997 998 if (sgt->nents > 1) { 999 ret = -EIO; 1000 dev_dbg(mpgmuxts->dev, "Not contig nents %d fd %d direction %d", 1001 sgt->nents, dbuf_info->buf_fd, dbuf_info->dir); 1002 goto err_dmabuf_unmap_attachment; 1003 } 1004 dev_dbg(mpgmuxts->dev, "dmabuf %s is physically contiguous", 1005 (dbuf_info->dir == 1006 DMA_TO_MPG2MUX ? "Source" : "Destination")); 1007 1008 if (dbuf_info->dir == DMA_TO_MPG2MUX) { 1009 for (i = 0; i < XTSMUX_MAXIN_STRM; i++) { 1010 if (!mpgmuxts->src_dmabufintl[i].buf_id) { 1011 mpgmuxts->src_dmabufintl[i].dbuf = dbuf; 1012 mpgmuxts->src_dmabufintl[i].attach = attach; 1013 mpgmuxts->src_dmabufintl[i].sgt = sgt; 1014 mpgmuxts->src_dmabufintl[i].dmabuf_addr = 1015 sg_dma_address(sgt->sgl); 1016 mpgmuxts->src_dmabufintl[i].dmabuf_fd = 1017 dbuf_info->buf_fd; 1018 mpgmuxts->src_dmabufintl[i].buf_id = i + 1; > 1019 dev_dbg(mpgmuxts->dev, > 1020 "%s: phy-addr=0x%llx for src dmabuf=%d", 1021 __func__, 1022 mpgmuxts->src_dmabufintl[i].dmabuf_addr, 1023 mpgmuxts->src_dmabufintl[i].dmabuf_fd); 1024 break; 1025 } 1026 } 1027 /* External src streams more than XTSMUX_MAXIN_STRM 1028 * can not be handled 1029 */ 1030 if (i == XTSMUX_MAXIN_STRM) { 1031 ret = -EIO; 1032 dev_dbg(mpgmuxts->dev, "src DMA bufs more than %d", 1033 XTSMUX_MAXIN_STRM); 1034 goto err_dmabuf_unmap_attachment; 1035 } 1036 } else { 1037 for (i = 0; i < XTSMUX_MAXOUT_STRM; i++) { 1038 if (!mpgmuxts->dst_dmabufintl[i].buf_id) { 1039 mpgmuxts->dst_dmabufintl[i].dbuf = dbuf; 1040 mpgmuxts->dst_dmabufintl[i].attach = attach; 1041 mpgmuxts->dst_dmabufintl[i].sgt = sgt; 1042 mpgmuxts->dst_dmabufintl[i].dmabuf_addr = 1043 sg_dma_address(sgt->sgl); 1044 mpgmuxts->dst_dmabufintl[i].dmabuf_fd = 1045 dbuf_info->buf_fd; 1046 mpgmuxts->dst_dmabufintl[i].buf_id = i + 1; 1047 dev_dbg(mpgmuxts->dev, 1048 "phy-addr=0x%llx for src dmabuf=%d", 1049 mpgmuxts->dst_dmabufintl[i].dmabuf_addr, 1050 mpgmuxts->dst_dmabufintl[i].dmabuf_fd); 1051 break; 1052 } 1053 } 1054 /* External dst streams more than XTSMUX_MAXOUT_STRM 1055 * can not be handled 1056 */ 1057 if (i == XTSMUX_MAXOUT_STRM) { 1058 ret = -EIO; 1059 dev_dbg(mpgmuxts->dev, "dst DMA bufs more than %d", 1060 XTSMUX_MAXOUT_STRM); 1061 goto err_dmabuf_unmap_attachment; 1062 } 1063 } 1064 1065 return 0; 1066 1067 err_dmabuf_unmap_attachment: 1068 dma_buf_unmap_attachment(attach, sgt, 1069 (enum dma_data_direction)dbuf_info->dir); 1070 err_dmabuf_detach: 1071 dma_buf_detach(dbuf, attach); 1072 err_dmabuf_put: 1073 dma_buf_put(dbuf); 1074 dmak_free: 1075 kfree(dbuf_info); 1076 1077 return ret; 1078 } 1079 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation