Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3575482imm; Mon, 2 Jul 2018 01:24:50 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeF81G7hqQ6DU9LoypyXaIH0EhYBj0bKcyiv230kRbFz/m0c7tfDcW2zchCoCruCse52JxU X-Received: by 2002:a62:e413:: with SMTP id r19-v6mr6331174pfh.25.1530519890718; Mon, 02 Jul 2018 01:24:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530519890; cv=none; d=google.com; s=arc-20160816; b=T2Q4ptLm7oS3roJ8Aqm6n2soJxFxXhz2KS5PEinXgOpvKTgKUU0bchbE34OcfKi3o3 QClrXLW6KvPu0qLo+144fv9YExajhoxP0sJbWuKxCS7B8S1sPgufHSVdbI3VI+8BSEre MXVKZT7J97Fcuo7t/ZM3TCghQDTgya4g4QE2e4huoGu5yh3QSqI92X98Ugl1dlbc0kqy BEgwPu+gm9DI2ZCHSdMDaWJ2a9SM4pYy4W4mBAQfAVDtJWVLYplUSrt5mBOz4jvKoGl/ BsQUFxbDdURjl44qi1ZDMDC91jsqOcRyc1DiRHVPI/L1aTAaAZDWErVuUgul/J4onQgo /DEw== 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=OltIxvLhh6YrgWi1J5inr9BahAwJ7h0ctzDqAF1d/5w=; b=m+2OhWyQHCRvusQGTzGbQrpA8bQBtBfOSdPawoJyRVIumhiQKZMxezrb+ZYy6Zv/33 mZiGaQZfrb908vln1faG5YYY31Rh7C7mDAg5r1WcNfvDhbuwPk54/p098DdeLQpk4lTZ iAm0D9Fh1nhwcLTHL/wfBU/oHmlBlAuxVTzKK/Nj5MMt6RE4gEx2PCYUX3gj0+Ni3ZW9 GcVz/PFPJSWlY1vxeab8F/8iwMVljzElKSy4DRBjCudPZBPjY59lOND3j2nt+vT1ElZm zFp/mYD/N3hc6lkq3iZgt9frFgovfbBJVkxoQtF9oZHoj8ayXK3d5Dpkf6olEYUDa4RI NCiQ== 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 x190-v6si13875714pgb.158.2018.07.02.01.24.36; Mon, 02 Jul 2018 01:24:50 -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 S933640AbeGBIXb (ORCPT + 99 others); Mon, 2 Jul 2018 04:23:31 -0400 Received: from kvm5.telegraphics.com.au ([98.124.60.144]:48728 "EHLO kvm5.telegraphics.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933574AbeGBIVV (ORCPT ); Mon, 2 Jul 2018 04:21:21 -0400 Received: by kvm5.telegraphics.com.au (Postfix, from userid 502) id 5D84F2939F; Mon, 2 Jul 2018 04:21:18 -0400 (EDT) To: Benjamin Herrenschmidt Cc: Michael Schmitz , , , Message-Id: <1bb42998af67f39088431f00f3f53d739a330dfd.1530519301.git.fthain@telegraphics.com.au> In-Reply-To: References: From: Finn Thain Subject: [PATCH v4 02/11] macintosh/via-pmu: Add missing mmio accessors Date: Mon, 2 Jul 2018 04:21:18 -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 f8a2c917201f..ba41220f618e 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c @@ -534,8 +534,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; @@ -1418,8 +1419,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