From: Ben Dooks <ben.dooks@codethink.co.uk>
To: linux-kernel@lists.codethink.co.uk, swarren@wwwdotorg.org,
thierry.reding@gmail.com, gnurou@gmail.com,
linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Ben Dooks <ben.dooks@codethink.co.uk>
Subject: [PATCH 1/1] memory: tegra: fix fdc test bug
Date: Fri, 7 Apr 2017 18:28:20 +0100 [thread overview]
Message-ID: <20170407172820.21292-1-ben.dooks@codethink.co.uk> (raw)
The fdc variable is a bool, taking the address of this will generally
produce true, thus skewing any users of the tegra_mc_set_latency_allowance
code.
Note, this does not seem to be producing a compiler warning. This was only
spotted as it meant a caller was seeing 3 times higher than expected
register results.
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
drivers/memory/tegra/mc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/memory/tegra/mc.c b/drivers/memory/tegra/mc.c
index fb44d1741862..e20470736319 100644
--- a/drivers/memory/tegra/mc.c
+++ b/drivers/memory/tegra/mc.c
@@ -121,7 +121,7 @@ int tegra_mc_set_latency_allowance(int client_id, unsigned int bandwidth)
WARN_ON(client->id != client_id);
- if (&client->fdc)
+ if (client->fdc)
atom_bytes = plat_mc->soc->atom_size_fdc;
else
atom_bytes = plat_mc->soc->atom_size;
--
2.11.0
next reply other threads:[~2017-04-07 18:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-07 17:28 Ben Dooks [this message]
2017-04-07 17:43 ` [PATCH 1/1] memory: tegra: fix fdc test bug Thierry Reding
2017-04-07 21:54 ` Ben Dooks
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=20170407172820.21292-1-ben.dooks@codethink.co.uk \
--to=ben.dooks@codethink.co.uk \
--cc=gnurou@gmail.com \
--cc=linux-kernel@lists.codethink.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=swarren@wwwdotorg.org \
--cc=thierry.reding@gmail.com \
/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).