Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp475878imm; Wed, 13 Jun 2018 03:38:56 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKjjH/W7XKApqiKU2lSYDrmJLOPrnfKKSVWbL8X1ZGKWkd6hQQXQDxINkbC8KHtmdjvTllx X-Received: by 2002:a17:902:6802:: with SMTP id h2-v6mr4554152plk.113.1528886335957; Wed, 13 Jun 2018 03:38:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528886335; cv=none; d=google.com; s=arc-20160816; b=PxVONIymjaGi5h2lQYCRV51AYrctJuMhepFQglS+RR9U5CcMJ6aB/x4x0A1FNj16/g xX1wg0vwQOaOVO/a2Z+qDw7MO2TmSsIaj0hH0XdbV9xlgUsjH4JKqDZ/6ASh7I98wuC0 AjZv1uWWlTvz+UoLjE0krl7fZTgf3QkVJMDTIlGl5xgiwueV32sXxY7g4ubEbKqv5aGH Ew/0JpYQrs/2LM9fPzbfDgv/oTtqCQi1hiMuinjUgeQmCDdOwKQD5LVXxSJxzI0XumOZ PXXcjNQtv+g15OGm+2tZeOQ97q+sPeONUJlIkDOkQ8vm7aE+QMHwZxc+WUQPiFU4CyMe q1gw== 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=VdIo16rRsvVI8HDKrAmoW+WZjz7pRosZNDYFNBABtua+K3q1xjy6bninjx5Apfsna9 +haVdCI0aL7m0Pc8GplYbZhTXe1cOGoIfpBSbafEl/oDiqK0qkmBFdZCdfvo9JOTiax+ S4rfUv1uh0yDxTIDwQFRfmdTwuwHowIqPW4CbJZybq9LQqSimA4MQVMxRNhkxK4532Mk rVXwlY2WZ0LvDFLzG7IsnHqFG0quGOuLblsVwP82T+loY5f0UlbeQbapRVhi/qeWcXLk TE5g5Mpn8jFWnI/mBfrztQADrLsKQKNArlQT9aX+/Fkh/GvEKlXUigXQQuWYaOt9WPq6 Y++g== 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 e90-v6si2719598plb.437.2018.06.13.03.38.41; Wed, 13 Jun 2018 03:38:55 -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 S935288AbeFMKiG (ORCPT + 99 others); Wed, 13 Jun 2018 06:38:06 -0400 Received: from kvm5.telegraphics.com.au ([98.124.60.144]:47888 "EHLO kvm5.telegraphics.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935132AbeFMKiC (ORCPT ); Wed, 13 Jun 2018 06:38:02 -0400 Received: by kvm5.telegraphics.com.au (Postfix, from userid 502) id 86AD522C16; Wed, 13 Jun 2018 06:38:01 -0400 (EDT) To: Benjamin Herrenschmidt Cc: Michael Schmitz , , , Message-Id: <6337cdd06d5ea5828c4917ccbfd0125bb8a52cb9.1528885172.git.fthain@telegraphics.com.au> In-Reply-To: References: From: Finn Thain Subject: [PATCH v3 02/12] macintosh/via-pmu: Add missing mmio accessors Date: Wed, 13 Jun 2018 06:38:01 -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