From patchwork Fri Apr 7 17:28:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Dooks X-Patchwork-Id: 748414 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3w06qr29RHz9s7m for ; Sat, 8 Apr 2017 04:02:48 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933010AbdDGSCr (ORCPT ); Fri, 7 Apr 2017 14:02:47 -0400 Received: from 82-70-136-246.dsl.in-addr.zen.co.uk ([82.70.136.246]:53574 "EHLO devhw0" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752130AbdDGSCr (ORCPT ); Fri, 7 Apr 2017 14:02:47 -0400 X-Greylist: delayed 2052 seconds by postgrey-1.27 at vger.kernel.org; Fri, 07 Apr 2017 14:02:46 EDT Received: from ben by devhw0 with local (Exim 4.88) (envelope-from ) id 1cwXgO-0005YI-Hh; Fri, 07 Apr 2017 18:28:24 +0100 From: Ben Dooks 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 Subject: [PATCH 1/1] memory: tegra: fix fdc test bug Date: Fri, 7 Apr 2017 18:28:20 +0100 Message-Id: <20170407172820.21292-1-ben.dooks@codethink.co.uk> X-Mailer: git-send-email 2.11.0 Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org 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 --- 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;