From: Georgi Djakov <gdjakov@mm-sol.com>
To: Josh Cartwright <joshc@codeaurora.org>
Cc: linux-mmc@vger.kernel.org, cjb@laptop.org,
ulf.hansson@linaro.org, devicetree@vger.kernel.org,
grant.likely@linaro.org, robh+dt@kernel.org, pawel.moll@arm.com,
mark.rutland@arm.com, swarren@wwwdotorg.org,
ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
rob@landley.net, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v9 3/3] mmc: sdhci-msm: Add platform_execute_tunning implementation
Date: Sat, 01 Mar 2014 00:29:53 +0200 [thread overview]
Message-ID: <53110DE1.6070204@mm-sol.com> (raw)
In-Reply-To: <20140228205119.GJ7308@joshc.qualcomm.com>
On 28.02.14, 22:51, Josh Cartwright wrote:
[..]
>> + sg_init_one(&sg, data_buf, sizeof(data_buf));
>> + memset(data_buf, 0, sizeof(data_buf));
>> + mmc_wait_for_req(mmc, &mrq);
>> +
>> + if (!cmd.error && !data.error &&
>> + !memcmp(data_buf, tuning_block_pattern, sizeof(data_buf))) {
>
> This memcmp is broken, sizeof(data_buf) is likely not what you want,
> maybe you want 'size'? Same thing for sg_init_one()/memset() above.
>
> From sparse:
>
> drivers/mmc/host/sdhci-msm.c: In function ‘sdhci_msm_execute_tuning’:
> drivers/mmc/host/sdhci-msm.c:461:53: warning: argument to ‘sizeof’ in ‘memcmp’ call is the same expression as the first source; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
> !memcmp(data_buf, tuning_block_pattern, sizeof(data_buf))) {
>
Nice catch, Josh! Thanks for reviewing!
BR,
Georgi
prev parent reply other threads:[~2014-02-28 22:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-28 11:24 [PATCH v9 0/3] mmc: sdhci-msm: Add support for Qualcomm chipsets Georgi Djakov
2014-02-28 11:24 ` [PATCH v9 1/3] mmc: sdhci-msm: Qualcomm SDHCI binding documentation Georgi Djakov
2014-03-03 2:03 ` Bjorn Andersson
2014-02-28 11:24 ` [PATCH v9 2/3] mmc: sdhci-msm: Initial support for Qualcomm chipsets Georgi Djakov
2014-03-04 3:15 ` Bjorn Andersson
2014-03-04 17:50 ` Georgi Djakov
2014-02-28 11:24 ` [PATCH v9 3/3] mmc: sdhci-msm: Add platform_execute_tunning implementation Georgi Djakov
2014-02-28 16:51 ` Kumar Gala
2014-02-28 22:10 ` Georgi Djakov
2014-02-28 20:45 ` Josh Cartwright
[not found] ` <1393586675-14628-4-git-send-email-gdjakov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
2014-02-28 20:51 ` Josh Cartwright
2014-02-28 22:29 ` Georgi Djakov [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=53110DE1.6070204@mm-sol.com \
--to=gdjakov@mm-sol.com \
--cc=cjb@laptop.org \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=grant.likely@linaro.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=joshc@codeaurora.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=rob@landley.net \
--cc=robh+dt@kernel.org \
--cc=swarren@wwwdotorg.org \
--cc=ulf.hansson@linaro.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).