From patchwork Mon Dec 29 19:59:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Mc Guire X-Patchwork-Id: 424471 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 5A46C140119 for ; Tue, 30 Dec 2014 07:04:53 +1100 (AEDT) Received: from ozlabs.org (ozlabs.org [103.22.144.67]) by lists.ozlabs.org (Postfix) with ESMTP id 20C311A0A2C for ; Tue, 30 Dec 2014 07:04:53 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from www.osadl.org (www.osadl.org [62.245.132.105]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 470F31A0184 for ; Tue, 30 Dec 2014 07:04:10 +1100 (AEDT) Received: from debian.hofrr.at (92-243-35-153.adsl.nanet.at [92.243.35.153] (may be forged)) by www.osadl.org (8.13.8/8.13.8/OSADL-2007092901) with ESMTP id sBTK3LJJ032235; Mon, 29 Dec 2014 21:03:23 +0100 From: Nicholas Mc Guire To: Michael Hanselmann Subject: [PATCH] macintosh: ams: cleanup on stack DECLARE_COMPLETION Date: Mon, 29 Dec 2014 14:59:44 -0500 Message-Id: <1419883184-412-1-git-send-email-der.herr@hofr.at> X-Mailer: git-send-email 1.7.10.4 X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00, KHOP_SC_TOP_CIDR8, RDNS_DYNAMIC autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on www.osadl.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , Nicholas Mc Guire , Grant Likely , linuxppc-dev@lists.ozlabs.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" fix-up for incorrect use of DECLARE_COMPLETION. see also commit 6e9a4738 ("completions: lockdep annotate on stack completions") V2: split out patch for individual files and (hopefully) proper labeling this time patch is against linux-next 3.19.0-rc1 -next-20141226 patch was compile tested with ppc6xx_defconfig, CONFIG_SENSORS_AMS=m, CONFIG_SENSORS_AMS_PMU=y Signed-off-by: Nicholas Mc Guire --- drivers/macintosh/ams/ams-pmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/macintosh/ams/ams-pmu.c b/drivers/macintosh/ams/ams-pmu.c index 4f61b3e..c2b178f 100644 --- a/drivers/macintosh/ams/ams-pmu.c +++ b/drivers/macintosh/ams/ams-pmu.c @@ -52,7 +52,7 @@ static void ams_pmu_req_complete(struct adb_request *req) static void ams_pmu_set_register(u8 reg, u8 value) { static struct adb_request req; - DECLARE_COMPLETION(req_complete); + DECLARE_COMPLETION_ONSTACK(req_complete); req.arg = &req_complete; if (pmu_request(&req, ams_pmu_req_complete, 4, ams_pmu_cmd, 0x00, reg, value)) @@ -65,7 +65,7 @@ static void ams_pmu_set_register(u8 reg, u8 value) static u8 ams_pmu_get_register(u8 reg) { static struct adb_request req; - DECLARE_COMPLETION(req_complete); + DECLARE_COMPLETION_ONSTACK(req_complete); req.arg = &req_complete; if (pmu_request(&req, ams_pmu_req_complete, 3, ams_pmu_cmd, 0x01, reg))