Hi "Daniel, [FYI, it's a private test report for your RFC patch.] [auto build test WARNING on linuxtv-media/master] [also build test WARNING on linus/master next-20200608] [cannot apply to linux/master v5.7] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Daniel-W-S-Almeida/media-vidtv-implement-a-virtual-DVB-driver/20200609-031704 base: git://linuxtv.org/media_tree.git master config: m68k-allmodconfig (attached as .config) compiler: m68k-linux-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 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>, old ones prefixed by <<): In file included from include/linux/bitops.h:5, from include/linux/kernel.h:12, from include/linux/list.h:9, from include/linux/rculist.h:10, from include/linux/pid.h:5, from include/linux/sched.h:14, from include/linux/ratelimit.h:6, from drivers/media/test-drivers/vidtv/vidtv_pes.c:18: drivers/media/test-drivers/vidtv/vidtv_pes.c: In function 'vidtv_pes_write_pts_dts': >> include/linux/bits.h:37:11: warning: right shift count is negative [-Wshift-count-negative] 37 | (~UL(0) >> (BITS_PER_LONG - 1 - (h)))) | ^~ >> include/linux/bits.h:39:31: note: in expansion of macro '__GENMASK' 39 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l)) | ^~~~~~~~~ >> drivers/media/test-drivers/vidtv/vidtv_pes.c:96:33: note: in expansion of macro 'GENMASK' 96 | pts_dts.pts1 = (args.pts & GENMASK(32, 30)) >> 30; | ^~~~~~~ >> include/linux/bits.h:37:11: warning: right shift count is negative [-Wshift-count-negative] 37 | (~UL(0) >> (BITS_PER_LONG - 1 - (h)))) | ^~ >> include/linux/bits.h:39:31: note: in expansion of macro '__GENMASK' 39 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l)) | ^~~~~~~~~ drivers/media/test-drivers/vidtv/vidtv_pes.c:105:33: note: in expansion of macro 'GENMASK' 105 | pts_dts.dts1 = (args.dts & GENMASK(32, 30)) >> 30; | ^~~~~~~ >> include/linux/bits.h:37:11: warning: right shift count is negative [-Wshift-count-negative] 37 | (~UL(0) >> (BITS_PER_LONG - 1 - (h)))) | ^~ >> include/linux/bits.h:39:31: note: in expansion of macro '__GENMASK' 39 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l)) | ^~~~~~~~~ drivers/media/test-drivers/vidtv/vidtv_pes.c:117:33: note: in expansion of macro 'GENMASK' 117 | pts_dts.pts1 = (args.pts & GENMASK(32, 30)) >> 30; | ^~~~~~~ vim +/GENMASK +96 drivers/media/test-drivers/vidtv/vidtv_pes.c 15 16 #include 17 #include > 18 #include 19 20 #include "vidtv_pes.h" 21 #include "vidtv_common.h" 22 #include "vidtv_ts.h" 23 24 #define PRIVATE_STREAM_1_ID 0xbd /* private_stream_1. See SMPTE 302M-2007 p.6 */ 25 #define PES_HEADER_MAX_STUFFING_BYTES 32 26 #define PES_TS_HEADER_MAX_STUFFING_BYTES 182 27 28 static u32 vidtv_pes_op_get_regular_len(bool send_pts, bool send_dts) 29 { 30 u32 len = 0; 31 32 /* the flags must always be sent */ 33 len += sizeof(struct vidtv_pes_optional); 34 35 /* From all optionals, we might send these for now */ 36 if (send_pts && send_dts) 37 len += sizeof(struct vidtv_pes_optional_pts_dts); 38 else if (send_pts) 39 len += sizeof(struct vidtv_pes_optional_pts); 40 41 return len; 42 } 43 44 static u32 vidtv_pes_h_get_regular_len(bool send_pts, bool send_dts) 45 { 46 /* PES header length notwithstanding stuffing bytes */ 47 u32 len = 0; 48 49 len += sizeof(struct vidtv_mpeg_pes); 50 len += vidtv_pes_op_get_regular_len(send_pts, send_dts); 51 52 return len; 53 } 54 55 static u32 vidtv_pes_write_header_stuffing(struct vidtv_mpeg_pes *pes_h, 56 struct pes_header_write_args args) 57 { 58 /* 59 * This is a fixed 8-bit value equal to '1111 1111' that can be inserted 60 * by the encoder, for example to meet the requirements of the channel. 61 * It is discarded by the decoder. No more than 32 stuffing bytes shall 62 * be present in one PES packet header. 63 */ 64 if (args.n_pes_h_s_bytes > PES_HEADER_MAX_STUFFING_BYTES) { 65 pr_warn_ratelimited("More than 32 stuffing bytes in PES packet header\n"); 66 args.n_pes_h_s_bytes = PES_HEADER_MAX_STUFFING_BYTES; 67 } 68 69 /* gives the length of the remainder of the PES header in bytes */ 70 pes_h->length += args.n_pes_h_s_bytes; 71 72 return vidtv_memset(args.dest_buf, 73 args.dest_offset, 74 args.dest_buf_sz, 75 TS_FILL_BYTE, 76 args.n_pes_h_s_bytes); 77 } 78 79 static u32 vidtv_pes_write_pts_dts(struct pes_header_write_args args) 80 { 81 u32 nbytes = 0; /* the number of bytes written by this function */ 82 83 struct vidtv_pes_optional_pts pts = {}; 84 struct vidtv_pes_optional_pts_dts pts_dts = {}; 85 void *op = NULL; 86 size_t op_sz = 0; 87 88 if (!args.send_pts && args.send_dts) 89 return 0; 90 91 /* see ISO/IEC 13818-1 : 2000 p. 32 */ 92 93 if (args.send_pts && args.send_dts) { 94 pts_dts.three = 0x3; 95 > 96 pts_dts.pts1 = (args.pts & GENMASK(32, 30)) >> 30; 97 pts_dts.marker1 = 0x1; 98 pts_dts.pts2 = (args.pts & GENMASK(29, 15)) >> 15; 99 pts_dts.marker2 = 0x1; 100 pts_dts.pts3 = args.pts & GENMASK(14, 0); 101 pts_dts.marker3 = 0x1; 102 103 pts_dts.one = 0x1; 104 105 pts_dts.dts1 = (args.dts & GENMASK(32, 30)) >> 30; 106 pts_dts.marker1 = 0x1; 107 pts_dts.dts2 = (args.dts & GENMASK(29, 15)) >> 15; 108 pts_dts.marker2 = 0x1; 109 pts_dts.dts3 = args.dts & GENMASK(14, 0); 110 pts_dts.marker3 = 0x1; 111 112 op = &pts_dts; 113 op_sz = sizeof(pts_dts); 114 115 } else if (args.send_pts) { 116 pts.two = 0x2; 117 pts_dts.pts1 = (args.pts & GENMASK(32, 30)) >> 30; 118 pts_dts.marker1 = 0x1; 119 pts_dts.pts2 = (args.pts & GENMASK(29, 15)) >> 15; 120 pts_dts.marker2 = 0x1; 121 pts_dts.pts3 = args.pts & GENMASK(14, 0); 122 pts_dts.marker3 = 0x1; 123 124 op = &pts; 125 op_sz = sizeof(pts); 126 } 127 128 /* copy PTS/DTS optional */ 129 nbytes += vidtv_memcpy(args.dest_buf, 130 args.dest_offset + nbytes, 131 args.dest_buf_sz, 132 op, 133 op_sz); 134 135 return nbytes; 136 } 137 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org