re: mmc: rtsx: add support for pre_req and post_req

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Micky Ching,

The patch c42deffd5b53: "mmc: rtsx: add support for pre_req and
post_req" from Feb 17, 2014, leads to the following static checker
warning:

	drivers/mmc/host/rtsx_pci_sdmmc.c:525 sd_pre_dma_transfer()
	warn: we tested 'next' before and it was 'false'

drivers/mmc/host/rtsx_pci_sdmmc.c
   520                          "error: invalid cookie data[%d] host[%d]\n",
   521                          data->host_cookie, host->next_data.cookie);
   522                  data->host_cookie = 0;
   523          }
   524  
   525          if (next || (!next && data->host_cookie != host->next_data.cookie))
                             ^^^^^
We are testing "next" twice.  Often that means the intention was to test
a different variable?

   526                  sg_count = rtsx_pci_dma_map_sg(pcr,
   527                                  data->sg, data->sg_len, read);
   528          else
   529                  sg_count = host->next_data.sg_count;

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux