* [PATCH 1/1] memory: tegra: fix fdc test bug
@ 2017-04-07 17:28 Ben Dooks
[not found] ` <20170407172820.21292-1-ben.dooks-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Ben Dooks @ 2017-04-07 17:28 UTC (permalink / raw)
To: linux-kernel-81qHHgoATdFT9dQujB1mzip2UmYkHbXO,
swarren-3lzwWm7+Weoh9ZMKESR00Q,
thierry.reding-Re5JQEeQqe8AvxtiuMwx3w,
gnurou-Re5JQEeQqe8AvxtiuMwx3w, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
Cc: Ben Dooks
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-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <20170407172820.21292-1-ben.dooks-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org>]
* Re: [PATCH 1/1] memory: tegra: fix fdc test bug [not found] ` <20170407172820.21292-1-ben.dooks-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org> @ 2017-04-07 17:43 ` Thierry Reding [not found] ` <20170407174301.GA4386-EkSeR96xj6Pcmrwk2tT4+A@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Thierry Reding @ 2017-04-07 17:43 UTC (permalink / raw) To: Ben Dooks Cc: linux-kernel-81qHHgoATdFT9dQujB1mzip2UmYkHbXO, swarren-3lzwWm7+Weoh9ZMKESR00Q, gnurou-Re5JQEeQqe8AvxtiuMwx3w, linux-tegra-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 659 bytes --] On Fri, Apr 07, 2017 at 06:28:20PM +0100, Ben Dooks wrote: > 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-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org> > --- > drivers/memory/tegra/mc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) What tree is this based on? I don't see this code anywhere in mainline. Thierry [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <20170407174301.GA4386-EkSeR96xj6Pcmrwk2tT4+A@public.gmane.org>]
* Re: [PATCH 1/1] memory: tegra: fix fdc test bug [not found] ` <20170407174301.GA4386-EkSeR96xj6Pcmrwk2tT4+A@public.gmane.org> @ 2017-04-07 21:54 ` Ben Dooks 0 siblings, 0 replies; 3+ messages in thread From: Ben Dooks @ 2017-04-07 21:54 UTC (permalink / raw) To: Thierry Reding Cc: linux-kernel-81qHHgoATdFT9dQujB1mzip2UmYkHbXO, swarren-3lzwWm7+Weoh9ZMKESR00Q, gnurou-Re5JQEeQqe8AvxtiuMwx3w, linux-tegra-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA On 2017-04-07 18:43, Thierry Reding wrote: > On Fri, Apr 07, 2017 at 06:28:20PM +0100, Ben Dooks wrote: >> 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-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org> >> --- >> drivers/memory/tegra/mc.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) > > What tree is this based on? I don't see this code anywhere in mainline. Apologies, turns out this a vendor added function. -- Ben ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-07 21:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-07 17:28 [PATCH 1/1] memory: tegra: fix fdc test bug Ben Dooks
[not found] ` <20170407172820.21292-1-ben.dooks-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org>
2017-04-07 17:43 ` Thierry Reding
[not found] ` <20170407174301.GA4386-EkSeR96xj6Pcmrwk2tT4+A@public.gmane.org>
2017-04-07 21:54 ` Ben Dooks
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox