Also: drivers/remoteproc/qcom_q6v5_pil.c:552 q6v5_mpss_load() warn: unsigned 'offset' is never less than zero. regards, dan carpenter On Tue, Feb 14, 2017 at 11:26:14AM +0300, Dan Carpenter wrote: > Hello Bjorn Andersson, > > The patch 7f0dd07a9b29: "remoteproc: qcom: mdt_loader: Refactor MDT > loader" from Jan 27, 2017, leads to the following static checker > warning: > > drivers/soc/qcom/mdt_loader.c:171 qcom_mdt_load() > warn: unsigned 'offset' is never less than zero. > > drivers/soc/qcom/mdt_loader.c > 164 for (i = 0; i < ehdr->e_phnum; i++) { > 165 phdr = &phdrs[i]; > 166 > 167 if (!mdt_phdr_valid(phdr)) > 168 continue; > 169 > 170 offset = phdr->p_paddr - mem_reloc; > 171 if (offset < 0 || offset + phdr->p_memsz > mem_size) { > ^^^^^^^^^^ > offset is size_t. > > 172 dev_err(dev, "segment outside memory range\n"); > 173 ret = -EINVAL; > 174 break; > 175 } > 176 > > regards, > dan carpenter -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html