CC: [email protected] TO: "Daniel W. S. Almeida" <[email protected]> CC: Mauro Carvalho Chehab <[email protected]> CC: [email protected]
tree: git://git.ragnatech.se/linux media-tree
head: c4176e12a755d0c761736c14bd2656ffc733eb95
commit: f90cf6079bf67988f8b1ad1ade70fc89d0080905 [319/322] media: vidtv: add a
bridge driver
:::::: branch date: 35 hours ago
:::::: commit date: 2 days ago
config: c6x-randconfig-s031-20200913 (attached as .config)
compiler: c6x-elf-gcc (GCC) 9.3.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.2-191-g10164920-dirty
git checkout f90cf6079bf67988f8b1ad1ade70fc89d0080905
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1
CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=c6x
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
sparse warnings: (new ones prefixed by >>)
>> drivers/media/test-drivers/vidtv/vidtv_pes.c:98:17: sparse: sparse: shift
>> count is negative (-1)
git remote add ragnatech git://git.ragnatech.se/linux
git fetch --no-tags ragnatech media-tree
git checkout f90cf6079bf67988f8b1ad1ade70fc89d0080905
vim +98 drivers/media/test-drivers/vidtv/vidtv_pes.c
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 77
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 78 static u32
vidtv_pes_write_pts_dts(struct pes_header_write_args args)
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 79 {
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 80 u32 nbytes = 0; /* the
number of bytes written by this function */
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 81
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 82 struct
vidtv_pes_optional_pts pts = {};
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 83 struct
vidtv_pes_optional_pts_dts pts_dts = {};
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 84 void *op = NULL;
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 85 size_t op_sz = 0;
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 86 u64 mask1;
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 87 u64 mask2;
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 88 u64 mask3;
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 89
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 90 if (!args.send_pts &&
args.send_dts)
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 91 return 0;
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 92
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 93 #ifdef __BIG_ENDIAN
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 94 mask1 = GENMASK(30, 32);
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 95 mask2 = GENMASK(15, 29);
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 96 mask3 = GENMASK(0, 14);
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 97 #else
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 @98 mask1 = GENMASK(32, 30);
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 99 mask2 = GENMASK(29, 15);
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 100 mask3 = GENMASK(14, 0);
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 101 #endif
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 102
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 103 /* see ISO/IEC 13818-1
: 2000 p. 32 */
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 104 if (args.send_pts &&
args.send_dts) {
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 105 pts_dts.pts1 =
(0x3 << 4) | ((args.pts & mask1) >> 29) | 0x1;
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 106 pts_dts.pts2 =
cpu_to_be16(((args.pts & mask2) >> 14) | 0x1);
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 107 pts_dts.pts3 =
cpu_to_be16(((args.pts & mask3) << 1) | 0x1);
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 108
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 109 pts_dts.dts1 =
(0x1 << 4) | ((args.dts & mask1) >> 29) | 0x1;
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 110 pts_dts.dts2 =
cpu_to_be16(((args.dts & mask2) >> 14) | 0x1);
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 111 pts_dts.dts3 =
cpu_to_be16(((args.dts & mask3) << 1) | 0x1);
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 112
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 113 op = &pts_dts;
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 114 op_sz =
sizeof(pts_dts);
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 115
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 116 } else if
(args.send_pts) {
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 117 pts.pts1 = (0x1
<< 5) | ((args.pts & mask1) >> 29) | 0x1;
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 118 pts.pts2 =
cpu_to_be16(((args.pts & mask2) >> 14) | 0x1);
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 119 pts.pts3 =
cpu_to_be16(((args.pts & mask3) << 1) | 0x1);
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 120
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 121 op = &pts;
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 122 op_sz =
sizeof(pts);
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 123 }
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 124
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 125 /* copy PTS/DTS
optional */
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 126 nbytes +=
vidtv_memcpy(args.dest_buf,
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 127
args.dest_offset + nbytes,
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 128
args.dest_buf_sz,
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 129
op,
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 130
op_sz);
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 131
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 132 return nbytes;
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 133 }
f90cf6079bf6798 Daniel W. S. Almeida 2020-08-21 134
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
