Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp313563imm; Thu, 7 Jun 2018 19:25:46 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJT41uO3ugHLadzT0HVlNl7z5SCXWdmU+XfOweBIa8OhjJM+vQqnaGvFH/AwDRPJbeV0N/L X-Received: by 2002:a62:3085:: with SMTP id w127-v6mr4057617pfw.224.1528424746240; Thu, 07 Jun 2018 19:25:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528424746; cv=none; d=google.com; s=arc-20160816; b=0aswSZUQNOaO3qPfF9BOgtfB6+s2ymaCunzrmwB5Te4nQ5szr2nqLb3azc8JhFdcAF KKgt7XMeyGxXGQQ/ZWi6k89pigdg59rijyASitnv15z3WvxKR5lXEjt/7UAVsnYyzcrK 3Ek9UrPv3Y6R/HxojM8pacOhXTxC7u+0xq1UECjPmYBWl8d/pY7nLH9gJDhKKNTSXb6R uuNxBS3/wWJjNhtd8wOWUybsYGgNKC2XmJ8IFFbGZBQ6VUYa56i1/JRF6C1NLwIJClkz FJ4oWHRN5N99LuziF/wHQJziGM7rdGAycNJQlWKjKwWEdW2yoW5lPhFHeXQY+j2AU7Tq GgLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:from:references:in-reply-to :message-id:cc:to:arc-authentication-results; bh=R/rW9S/25S0Y9+FbxyX2XEwUWvr+pMSF2V4uZFclm6Q=; b=zznRE/2sO2oyXn8zFClerUA8yOzsfF7U1fbF+D8Ovos/xqJXI+7xifdm36YgQdMcSy xSrz19vUkopj42xHUgFCQfycOLN0bVnmj0+apUuFeEE06UOZbBy5oh52biVp4QI55BiZ x8bdW+bpFSqlVmNKx/oqe0SbCzAvyYMvnod7FfzH4ecblvG2er1GAYhxxRxZsg+WBC7y /cmg5O5Gs/e4IEgbIPqO9uX5SANt1rbFYtISirruuwqsGK8T0B7FrpxNr/Fg/FKNOHf+ LG0n2UCrvv49XENvy/WhRW78JZXuzNGY3jc+fLS/ZiBb3roTdmtAz3+ntIazD/UYqzGb 8exA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y4-v6si11542244plp.120.2018.06.07.19.25.18; Thu, 07 Jun 2018 19:25:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752776AbeFHCYe (ORCPT + 99 others); Thu, 7 Jun 2018 22:24:34 -0400 Received: from kvm5.telegraphics.com.au ([98.124.60.144]:58506 "EHLO kvm5.telegraphics.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752385AbeFHCY3 (ORCPT ); Thu, 7 Jun 2018 22:24:29 -0400 Received: by kvm5.telegraphics.com.au (Postfix, from userid 502) id E5E2B2A332; Thu, 7 Jun 2018 22:24:28 -0400 (EDT) To: Benjamin Herrenschmidt Cc: Michael Schmitz , , , Message-Id: <6337cdd06d5ea5828c4917ccbfd0125bb8a52cb9.1528423341.git.fthain@telegraphics.com.au> In-Reply-To: References: From: Finn Thain Subject: [PATCH v2 02/12] macintosh/via-pmu: Add missing mmio accessors Date: Thu, 7 Jun 2018 22:24:28 -0400 (EDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add missing in_8() accessors to init_pmu() and pmu_sr_intr(). This fixes several sparse warnings: drivers/macintosh/via-pmu.c:536:29: warning: dereference of noderef expression drivers/macintosh/via-pmu.c:537:33: warning: dereference of noderef expression drivers/macintosh/via-pmu.c:1455:17: warning: dereference of noderef expression drivers/macintosh/via-pmu.c:1456:69: warning: dereference of noderef expression Tested-by: Stan Johnson Signed-off-by: Finn Thain Reviewed-by: Geert Uytterhoeven --- drivers/macintosh/via-pmu.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index fd3c5640d586..74065ea410bd 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c @@ -532,8 +532,9 @@ init_pmu(void) int timeout; struct adb_request req; - out_8(&via[B], via[B] | TREQ); /* negate TREQ */ - out_8(&via[DIRB], (via[DIRB] | TREQ) & ~TACK); /* TACK in, TREQ out */ + /* Negate TREQ. Set TACK to input and TREQ to output. */ + out_8(&via[B], in_8(&via[B]) | TREQ); + out_8(&via[DIRB], (in_8(&via[DIRB]) | TREQ) & ~TACK); pmu_request(&req, NULL, 2, PMU_SET_INTR_MASK, pmu_intr_mask); timeout = 100000; @@ -1455,8 +1456,8 @@ pmu_sr_intr(void) struct adb_request *req; int bite = 0; - if (via[B] & TREQ) { - printk(KERN_ERR "PMU: spurious SR intr (%x)\n", via[B]); + if (in_8(&via[B]) & TREQ) { + printk(KERN_ERR "PMU: spurious SR intr (%x)\n", in_8(&via[B])); out_8(&via[IFR], SR_INT); return NULL; } -- 2.16.4