From: kernel test robot <lkp@intel.com> To: Brad Love <brad@nextdimension.cc>, linux-media@vger.kernel.org Cc: kbuild-all@lists.01.org, Brad Love <brad@nextdimension.cc> Subject: Re: [PATCH 1/3] mxl692: MaxLinear 692 ATSC demod-tuner driver Date: Sat, 13 Jun 2020 05:49:55 +0800 [thread overview] Message-ID: <202006130511.My5DY4lL%lkp@intel.com> (raw) In-Reply-To: <20200612183937.10952-2-3126054018@nextdimension.cc> [-- Attachment #1: Type: text/plain, Size: 6315 bytes --] Hi Brad, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linuxtv-media/master] [also build test WARNING on v5.7 next-20200612] [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/Brad-Love/MaxLinear-mxl692-demod-tuner-Hauppauge-usb-QuadHD/20200613-024056 base: git://linuxtv.org/media_tree.git master config: i386-randconfig-s002-20200612 (attached as .config) compiler: gcc-9 (Debian 9.3.0-13) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.1-250-g42323db3-dirty # save the attached .config to linux build tree make W=1 C=1 ARCH=i386 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> sparse warnings: (new ones prefixed by >>) >> drivers/media/dvb-frontends/mxl692.c:223:27: sparse: sparse: invalid assignment: += >> drivers/media/dvb-frontends/mxl692.c:223:27: sparse: left side has type unsigned int >> drivers/media/dvb-frontends/mxl692.c:223:27: sparse: right side has type restricted __be32 drivers/media/dvb-frontends/mxl692.c:227:27: sparse: sparse: invalid assignment: += drivers/media/dvb-frontends/mxl692.c:227:27: sparse: left side has type unsigned int drivers/media/dvb-frontends/mxl692.c:227:27: sparse: right side has type restricted __be32 >> drivers/media/dvb-frontends/mxl692.c:231:16: sparse: sparse: cast to restricted __be32 >> drivers/media/dvb-frontends/mxl692.c:231:16: sparse: sparse: cast to restricted __be32 >> drivers/media/dvb-frontends/mxl692.c:231:16: sparse: sparse: cast to restricted __be32 >> drivers/media/dvb-frontends/mxl692.c:231:16: sparse: sparse: cast to restricted __be32 >> drivers/media/dvb-frontends/mxl692.c:231:16: sparse: sparse: cast to restricted __be32 >> drivers/media/dvb-frontends/mxl692.c:231:16: sparse: sparse: cast to restricted __be32 >> drivers/media/dvb-frontends/mxl692.c:249:14: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] temp @@ got restricted __be32 [usertype] @@ >> drivers/media/dvb-frontends/mxl692.c:249:14: sparse: expected unsigned int [usertype] temp >> drivers/media/dvb-frontends/mxl692.c:249:14: sparse: got restricted __be32 [usertype] >> drivers/media/dvb-frontends/mxl692.c:293:44: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ >> drivers/media/dvb-frontends/mxl692.c:293:44: sparse: expected unsigned int [usertype] >> drivers/media/dvb-frontends/mxl692.c:293:44: sparse: got restricted __le32 [usertype] vim +223 drivers/media/dvb-frontends/mxl692.c 217 218 static u32 mxl692_checksum(u8 *buffer, u32 size) 219 { 220 u32 ix, remainder = 0, cur_cksum = 0; 221 222 for (ix = 0; ix < size / 4; ix++) > 223 cur_cksum += cpu_to_be32(*(u32 *)(buffer + 224 (ix * sizeof(u32)))); 225 remainder = size % 4; 226 if (remainder > 0) 227 cur_cksum += cpu_to_be32(*((u32 *)&buffer[size - remainder])); 228 229 cur_cksum ^= 0xDEADBEEF; 230 > 231 return be32_to_cpu(cur_cksum); 232 } 233 234 static int mxl692_validate_fw_header(const u8 *buffer, u32 buf_len) 235 { 236 int status = 0; 237 u32 ix, temp = 0; 238 u32 *local_buf = NULL; 239 240 if (buffer[0] != 0x4D || buffer[1] != 0x31 || 241 buffer[2] != 0x10 || buffer[3] != 0x02 || 242 buffer[4] != 0x40 || buffer[5] != 0x00 || 243 buffer[6] != 0x00 || buffer[7] != 0x80) { 244 status = -EINVAL; 245 goto err_finish; 246 } 247 248 local_buf = (u32 *)(buffer + 8); > 249 temp = cpu_to_be32(*(u32 *)local_buf); 250 251 if ((buf_len - 16) != (temp >> 8)) { 252 status = -EINVAL; 253 goto err_finish; 254 } 255 256 temp = 0; 257 for (ix = 16; ix < buf_len; ix++) 258 temp += buffer[ix]; 259 260 if ((u8)temp != buffer[11]) 261 status = -EINVAL; 262 err_finish: 263 if (status) 264 pr_err("%s failed! %d\n", __func__, status); 265 return status; 266 } 267 268 static int mxl692_write_fw_block(struct mxl692_dev *dev, const u8 *buffer, 269 u32 buf_len, u32 *index) 270 { 271 int status = 0; 272 u32 ix = 0, total_len = 0, addr = 0, chunk_len = 0, prevchunk_len = 0; 273 u8 local_buf[MXL_EAGLE_MAX_I2C_PACKET_SIZE] = {}, *plocal_buf = NULL; 274 int payload_max = MXL_EAGLE_MAX_I2C_PACKET_SIZE - MXL_EAGLE_I2C_MHEADER_SIZE; 275 276 ix = *index; 277 278 if (buffer[ix] == 0x53) { 279 total_len = buffer[ix + 1] << 16 | buffer[ix + 2] << 8 | buffer[ix + 3]; 280 total_len = (total_len + 3) & ~3; 281 addr = buffer[ix + 4] << 24 | buffer[ix + 5] << 16 | 282 buffer[ix + 6] << 8 | buffer[ix + 7]; 283 ix += MXL_EAGLE_FW_SEGMENT_HEADER_SIZE; 284 285 while ((total_len > 0) && (status == 0)) { 286 plocal_buf = local_buf; 287 chunk_len = (total_len < payload_max) ? 288 total_len : payload_max; 289 290 *plocal_buf++ = 0xFC; 291 *plocal_buf++ = chunk_len + sizeof(u32); 292 > 293 *(u32 *)plocal_buf = cpu_to_le32(addr + prevchunk_len); 294 plocal_buf += sizeof(u32); 295 296 memcpy(plocal_buf, &buffer[ix], chunk_len); 297 convert_endian(chunk_len, plocal_buf); 298 299 if (mxl692_i2c_write(dev, local_buf, 300 (chunk_len + MXL_EAGLE_I2C_MHEADER_SIZE)) < 0) { 301 status = -EREMOTEIO; 302 break; 303 } 304 305 prevchunk_len += chunk_len; 306 total_len -= chunk_len; 307 ix += chunk_len; 308 } 309 *index = ix; 310 } else { 311 status = -EINVAL; 312 } 313 314 if (status) 315 dev_err(&dev->i2c_client->dev, "err %d\n", status); 316 317 return status; 318 } 319 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [-- Attachment #2: .config.gz --] [-- Type: application/gzip, Size: 33680 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com> To: kbuild-all@lists.01.org Subject: Re: [PATCH 1/3] mxl692: MaxLinear 692 ATSC demod-tuner driver Date: Sat, 13 Jun 2020 05:49:55 +0800 [thread overview] Message-ID: <202006130511.My5DY4lL%lkp@intel.com> (raw) In-Reply-To: <20200612183937.10952-2-3126054018@nextdimension.cc> [-- Attachment #1: Type: text/plain, Size: 6471 bytes --] Hi Brad, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linuxtv-media/master] [also build test WARNING on v5.7 next-20200612] [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/Brad-Love/MaxLinear-mxl692-demod-tuner-Hauppauge-usb-QuadHD/20200613-024056 base: git://linuxtv.org/media_tree.git master config: i386-randconfig-s002-20200612 (attached as .config) compiler: gcc-9 (Debian 9.3.0-13) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.1-250-g42323db3-dirty # save the attached .config to linux build tree make W=1 C=1 ARCH=i386 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> sparse warnings: (new ones prefixed by >>) >> drivers/media/dvb-frontends/mxl692.c:223:27: sparse: sparse: invalid assignment: += >> drivers/media/dvb-frontends/mxl692.c:223:27: sparse: left side has type unsigned int >> drivers/media/dvb-frontends/mxl692.c:223:27: sparse: right side has type restricted __be32 drivers/media/dvb-frontends/mxl692.c:227:27: sparse: sparse: invalid assignment: += drivers/media/dvb-frontends/mxl692.c:227:27: sparse: left side has type unsigned int drivers/media/dvb-frontends/mxl692.c:227:27: sparse: right side has type restricted __be32 >> drivers/media/dvb-frontends/mxl692.c:231:16: sparse: sparse: cast to restricted __be32 >> drivers/media/dvb-frontends/mxl692.c:231:16: sparse: sparse: cast to restricted __be32 >> drivers/media/dvb-frontends/mxl692.c:231:16: sparse: sparse: cast to restricted __be32 >> drivers/media/dvb-frontends/mxl692.c:231:16: sparse: sparse: cast to restricted __be32 >> drivers/media/dvb-frontends/mxl692.c:231:16: sparse: sparse: cast to restricted __be32 >> drivers/media/dvb-frontends/mxl692.c:231:16: sparse: sparse: cast to restricted __be32 >> drivers/media/dvb-frontends/mxl692.c:249:14: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] temp @@ got restricted __be32 [usertype] @@ >> drivers/media/dvb-frontends/mxl692.c:249:14: sparse: expected unsigned int [usertype] temp >> drivers/media/dvb-frontends/mxl692.c:249:14: sparse: got restricted __be32 [usertype] >> drivers/media/dvb-frontends/mxl692.c:293:44: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned int [usertype] @@ got restricted __le32 [usertype] @@ >> drivers/media/dvb-frontends/mxl692.c:293:44: sparse: expected unsigned int [usertype] >> drivers/media/dvb-frontends/mxl692.c:293:44: sparse: got restricted __le32 [usertype] vim +223 drivers/media/dvb-frontends/mxl692.c 217 218 static u32 mxl692_checksum(u8 *buffer, u32 size) 219 { 220 u32 ix, remainder = 0, cur_cksum = 0; 221 222 for (ix = 0; ix < size / 4; ix++) > 223 cur_cksum += cpu_to_be32(*(u32 *)(buffer + 224 (ix * sizeof(u32)))); 225 remainder = size % 4; 226 if (remainder > 0) 227 cur_cksum += cpu_to_be32(*((u32 *)&buffer[size - remainder])); 228 229 cur_cksum ^= 0xDEADBEEF; 230 > 231 return be32_to_cpu(cur_cksum); 232 } 233 234 static int mxl692_validate_fw_header(const u8 *buffer, u32 buf_len) 235 { 236 int status = 0; 237 u32 ix, temp = 0; 238 u32 *local_buf = NULL; 239 240 if (buffer[0] != 0x4D || buffer[1] != 0x31 || 241 buffer[2] != 0x10 || buffer[3] != 0x02 || 242 buffer[4] != 0x40 || buffer[5] != 0x00 || 243 buffer[6] != 0x00 || buffer[7] != 0x80) { 244 status = -EINVAL; 245 goto err_finish; 246 } 247 248 local_buf = (u32 *)(buffer + 8); > 249 temp = cpu_to_be32(*(u32 *)local_buf); 250 251 if ((buf_len - 16) != (temp >> 8)) { 252 status = -EINVAL; 253 goto err_finish; 254 } 255 256 temp = 0; 257 for (ix = 16; ix < buf_len; ix++) 258 temp += buffer[ix]; 259 260 if ((u8)temp != buffer[11]) 261 status = -EINVAL; 262 err_finish: 263 if (status) 264 pr_err("%s failed! %d\n", __func__, status); 265 return status; 266 } 267 268 static int mxl692_write_fw_block(struct mxl692_dev *dev, const u8 *buffer, 269 u32 buf_len, u32 *index) 270 { 271 int status = 0; 272 u32 ix = 0, total_len = 0, addr = 0, chunk_len = 0, prevchunk_len = 0; 273 u8 local_buf[MXL_EAGLE_MAX_I2C_PACKET_SIZE] = {}, *plocal_buf = NULL; 274 int payload_max = MXL_EAGLE_MAX_I2C_PACKET_SIZE - MXL_EAGLE_I2C_MHEADER_SIZE; 275 276 ix = *index; 277 278 if (buffer[ix] == 0x53) { 279 total_len = buffer[ix + 1] << 16 | buffer[ix + 2] << 8 | buffer[ix + 3]; 280 total_len = (total_len + 3) & ~3; 281 addr = buffer[ix + 4] << 24 | buffer[ix + 5] << 16 | 282 buffer[ix + 6] << 8 | buffer[ix + 7]; 283 ix += MXL_EAGLE_FW_SEGMENT_HEADER_SIZE; 284 285 while ((total_len > 0) && (status == 0)) { 286 plocal_buf = local_buf; 287 chunk_len = (total_len < payload_max) ? 288 total_len : payload_max; 289 290 *plocal_buf++ = 0xFC; 291 *plocal_buf++ = chunk_len + sizeof(u32); 292 > 293 *(u32 *)plocal_buf = cpu_to_le32(addr + prevchunk_len); 294 plocal_buf += sizeof(u32); 295 296 memcpy(plocal_buf, &buffer[ix], chunk_len); 297 convert_endian(chunk_len, plocal_buf); 298 299 if (mxl692_i2c_write(dev, local_buf, 300 (chunk_len + MXL_EAGLE_I2C_MHEADER_SIZE)) < 0) { 301 status = -EREMOTEIO; 302 break; 303 } 304 305 prevchunk_len += chunk_len; 306 total_len -= chunk_len; 307 ix += chunk_len; 308 } 309 *index = ix; 310 } else { 311 status = -EINVAL; 312 } 313 314 if (status) 315 dev_err(&dev->i2c_client->dev, "err %d\n", status); 316 317 return status; 318 } 319 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org [-- Attachment #2: config.gz --] [-- Type: application/gzip, Size: 33680 bytes --]
next prev parent reply other threads:[~2020-06-12 22:15 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-12 18:39 [PATCH 0/3] MaxLinear mxl692 demod-tuner / Hauppauge usb QuadHD Brad Love 2020-06-12 18:39 ` [PATCH 1/3] mxl692: MaxLinear 692 ATSC demod-tuner driver Brad Love 2020-06-12 21:49 ` kernel test robot [this message] 2020-06-12 21:49 ` kernel test robot 2020-06-13 8:49 ` kernel test robot 2020-06-13 8:49 ` kernel test robot 2020-06-13 21:07 ` kernel test robot 2020-06-13 21:07 ` kernel test robot 2020-06-13 21:07 ` [PATCH] mxl692: fix platform_no_drv_owner.cocci warnings kernel test robot 2020-06-13 21:07 ` kernel test robot 2020-06-24 9:59 ` [PATCH 1/3] mxl692: MaxLinear 692 ATSC demod-tuner driver Sean Young 2020-06-26 17:41 ` Bradford Love 2020-06-29 17:33 ` Sean Young 2020-06-12 18:39 ` [PATCH 2/3] em28xx-core: Fix TS2 active led Brad Love 2020-06-12 18:39 ` [PATCH 3/3] em28xx: Add support for Hauppauge USB QuadHD Brad Love 2021-01-26 1:54 ` [PATCH 0/4] MaxLinear mxl692 demod-tuner / Hauppauge usb QuadHD Brad Love 2021-01-26 1:54 ` [PATCH 1/4] mxl692: MaxLinear 692 ATSC demod/tuner driver Brad Love 2021-01-26 1:54 ` [PATCH 2/4] em28xx-core: Fix TS2 active led Brad Love 2021-01-26 1:54 ` [PATCH 3/4] em28xx-core: Fix i2c error debug Brad Love 2021-01-26 1:54 ` [PATCH 4/4] em28xx: Add support for Hauppauge USB QuadHD Brad Love
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=202006130511.My5DY4lL%lkp@intel.com \ --to=lkp@intel.com \ --cc=brad@nextdimension.cc \ --cc=kbuild-all@lists.01.org \ --cc=linux-media@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.