All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: micky_ching@realsil.com.cn
Cc: linux-mmc@vger.kernel.org
Subject: re: mmc: rtsx: add support for pre_req and post_req
Date: Fri, 28 Feb 2014 23:35:42 +0300	[thread overview]
Message-ID: <20140228202432.GA29547@elgon.mountain> (raw)

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

             reply	other threads:[~2014-02-28 20:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-28 20:35 Dan Carpenter [this message]
2014-03-03  1:13 ` mmc: rtsx: add support for pre_req and post_req micky
  -- strict thread matches above, loose matches on Subject: below --
2014-02-24 22:03 Dan Carpenter
2014-02-24 22:03 Dan Carpenter
2014-02-25  1:52 ` micky
2014-02-25  7:59   ` Dan Carpenter

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=20140228202432.GA29547@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=micky_ching@realsil.com.cn \
    /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: link
Be 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.