linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Seungwon Jeon <tgih.jun@samsung.com>
To: 'Dan Carpenter' <dan.carpenter@oracle.com>
Cc: linux-mmc@vger.kernel.org
Subject: RE: mmc: dw_mmc: rework the code related to cmd/data completion
Date: Thu, 07 Nov 2013 12:54:39 +0900	[thread overview]
Message-ID: <001e01cedb6d$1559fbe0$400df3a0$%jun@samsung.com> (raw)
In-Reply-To: <20131106161635.GJ15603@elgon.mountain>

Hi Dan Carpenter,

On Thur, November 07, 2013, Dan Carpenter wrote:
> Hello Seungwon Jeon,
> 
> This is a semi-automatic email about new static checker warnings.
> 
> The patch e352c8131100: "mmc: dw_mmc: rework the code related to
> cmd/data completion" from Aug 31, 2013, leads to the following Smatch
> complaint:
> 
> drivers/mmc/host/dw_mmc.c:1339 dw_mci_tasklet_func()
> 	 error: we previously assumed 'data->stop' could be null (see line 1337)
> 
> drivers/mmc/host/dw_mmc.c
>   1336				if (!err) {
>   1337					if (!data->stop || mrq->sbc) {
>                                              ^^^^^^^^^^
> New check.
> 
>   1338						if (mrq->sbc)
>   1339							data->stop->error = 0;
>                                                         ^^^^^^^^^^
> New unchecked dereference.  Should the check be "if (data->stop)"
> instead of "if (mrq->sbc)"?
It assumes that Upper layer sets all together. Actually, it does.
If 'mrq->sbc' is valid, it means that 'data->stop' must be also valid.
But if '&& data->stop' condition is added , it would be certain.
Ok. Thank you for report.

Thanks,
Seungwon Jeon.


      reply	other threads:[~2013-11-07  3:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-06 16:16 mmc: dw_mmc: rework the code related to cmd/data completion Dan Carpenter
2013-11-07  3:54 ` Seungwon Jeon [this message]

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='001e01cedb6d$1559fbe0$400df3a0$%jun@samsung.com' \
    --to=tgih.jun@samsung.com \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-mmc@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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).