Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4537616imm; Mon, 17 Sep 2018 16:05:46 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaWvEaYJwW2FEV0LIRHtpCv3hXBX32Mr1PUSo7QjwH6P3Ll78VMwNoYYTPe9SlQ8RzFnHS2 X-Received: by 2002:a63:5321:: with SMTP id h33-v6mr25123126pgb.139.1537225546323; Mon, 17 Sep 2018 16:05:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537225546; cv=none; d=google.com; s=arc-20160816; b=CcfXNbunfZwaQedP0NAZ3EBv6y1/7DgLzx6BRperfFlS2Vby6tPGgV4TDe6LN97eMK WKShLpqzvgilEEyJBM4TzovjN7FmAx39UbcK/hGghfOBHM2HD3nZ2ejK/DXiTuCEdUCi ADnUJ7CFFpnx8dyuL/AWWrO9wzOO7LCOB9spURYJWgPbCVPIPStmVIowCeWUB/CvFoPF 3MRt7wP7bKGfMzs3njwWuOlejuO479iTjJk5AVnw6rmpoYpL2N/0QszBsESznv+cso1o TTCKllX6S+0P76vGF4mQ4CjVl17U8MIlM2KxwgLV4HCNKr5SflFYfsXElihfaiyBd0Hm w2Fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=IXq2ttn5o6gfh/lxjAhr5QDq7wcbPgmE93POekkIpuI=; b=XbBSkeeom+rrucpmi7DW67MpuNNXm3YLytOylLDf9rJviNtLaFwp5H9lfQEjvPmluE jWod/4JhMoSYCIKNKaJxRWHnXzhEHOyaAA5XlkGLFf14Rq1ozkCQgeGLppg8pWT5E7tK VEiWccR00TMaDaktvl8yEHynVmm0o/FE0KKthdDuYzgG8Gtu56v6+N79S0ewXOYSGEnB bThKD3lBRBGAaiQ+1zlUjSV5G9RQC2SDFW4SoeS2o1hxtpWHuuV2gdcn2zHHin9pqPcg 64J2zElCd3OfcP5hEh6kWRKnVzaRKKIK7f+vFXEt50RziiWeY6XUD489GEQcSAaOhLHl +EzQ== 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 s7-v6si16748592pgj.480.2018.09.17.16.05.31; Mon, 17 Sep 2018 16:05: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 S1730733AbeIREdb (ORCPT + 99 others); Tue, 18 Sep 2018 00:33:31 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:49046 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727202AbeIREdb (ORCPT ); Tue, 18 Sep 2018 00:33:31 -0400 Received: from localhost (li1825-44.members.linode.com [172.104.248.44]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id D7110C49; Mon, 17 Sep 2018 23:04:01 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stan Johnson , Finn Thain , Geert Uytterhoeven , Michael Ellerman , Sasha Levin Subject: [PATCH 4.14 050/126] macintosh/via-pmu: Add missing mmio accessors Date: Tue, 18 Sep 2018 00:41:38 +0200 Message-Id: <20180917211707.855204589@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180917211703.481236999@linuxfoundation.org> References: <20180917211703.481236999@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Finn Thain [ Upstream commit 576d5290d678a651b9f36050fc1717e0573aca13 ] 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 Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/macintosh/via-pmu.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) --- 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; }