Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp863212yba; Fri, 26 Apr 2019 09:59:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqyqdjvt3YWDJbG4t9bHpRSskYfjunelaiJPHZc4gUva8O/cjwtvQWa3aPKHhrEu+YNtb175 X-Received: by 2002:a63:c749:: with SMTP id v9mr22701746pgg.432.1556297982530; Fri, 26 Apr 2019 09:59:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556297982; cv=none; d=google.com; s=arc-20160816; b=QW7hvEIkK7FhBieQw2qO5hvz6iDUyjuhwxlpL0m6u2/7RKZ/UZlO0yJNzCdW4IEw6i /Hr9gNshXwXdqTvt4TzdA0PgK11aSodx0fi424hLRpEe0Fhwlu1yPnTIhMvvVJ64nuP8 OO2fBEHYs58eRM8u+tSRhje++gI5b6C3n4ynEZQ++KC0Ap286z0TwvUud7NG+IJAmsws SZ0coSIhUoLZmJGwbF1mmE074X4tlHZZ70Dendc7CwMNtdLGTgg8/215806ypneHaEJw w8EHz38XBXzDG3c6sBL95YcYnYKAOXdL8N3wO/nN3uk8djZbRXObSpVR2kMV0ayGcOJr wHlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:mime-version :message-id:date:dkim-signature; bh=LdtpNCBMXVEYh5+9sDcKIELQmRtwCEZfEh/KIYFOBOU=; b=bd3uMAZIByza0ek9rdfM8Qk4JdzPw0u/+q9VPGPJLt1lh/P1hMxnezYIAhBPlP+w7K qCc6zqiqMYl1JRwrO9vI/bF29hMGZw/87sHqknn28iDxdv15k2VQZ+lVHh6Qtc9G0bAR j1usOJJFRK9ozegcD3J/okrkukqI7LI7+nRtbrTn1eRKRLu7or276R2rxWA3MzeVbzB0 0cBDdXGfol6vxs3mO31s/yJLykJn/6/NtXo/rV9HRTuNioXkn12Ptv3spOrzo0bkH8TQ Daj0UWLHLn8oAWmV/ccU7wWPcpeYoTHmg42LVHncpGjmT0bSkb6sgGsm1MT5bOHMA3JT /+pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=tstw7iZx; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i33si24807416pld.374.2019.04.26.09.59.25; Fri, 26 Apr 2019 09:59:42 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=tstw7iZx; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726390AbfDZQ5B (ORCPT + 99 others); Fri, 26 Apr 2019 12:57:01 -0400 Received: from mail-oi1-f201.google.com ([209.85.167.201]:56632 "EHLO mail-oi1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726359AbfDZQ5A (ORCPT ); Fri, 26 Apr 2019 12:57:00 -0400 Received: by mail-oi1-f201.google.com with SMTP id j202so1705526oih.23 for ; Fri, 26 Apr 2019 09:57:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=LdtpNCBMXVEYh5+9sDcKIELQmRtwCEZfEh/KIYFOBOU=; b=tstw7iZxA9nBCcJm42TviKa3bi3ItAr7vfTnG5YC9Kqym6BPPvFKMw4mIP/esb1Yre /CMlYKOQJbOgKiCHWaeSZ1w+/XYFN9f4aLobh+zg4n7IbmnPQc0jkvCsUIRTDwa43Zwb 84S7GwrJ2F6mS7l2MkMjUuUxw+3zWXnLRozAko6nXAOUz0MgIg+mnXnwHXPSwr2ULpB6 83/g53qmLpOfbAncr55eDmfW0C+yLh0R8/TRQOJT9CC8Or6uneQm0hbGPU/omorcfvGZ HcW6GH6eQ3lBvlPYvVs2YVDA2D6CmSxTljsmMGFbTMU1Rm17Z9MsIRgy1L4Xx4k1uz4D yXPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=LdtpNCBMXVEYh5+9sDcKIELQmRtwCEZfEh/KIYFOBOU=; b=UVIBwr79z9/rx3HW5mjjkbJcIt9Ssh3Alw38HTfjS85ZB8/2PBNWJep1OU/zc/tqW6 YavzKjKrbXVBp3a3DpLwMBargToxf5tdc1mTeUztwD73E3mVKK3sTpPxdRdF9CKKp/IR D5gY/aeoUoDI173mjONfFwpQpV6r1kNoWUzbK7cNmXShE03h4OhKZbHY2P2U1ZGEY6lv CMFXFL+UMlQtzUKA8FTb1fPRMgbD+bqYA3rK1igj5QAi+6l21Xv2nTEeU9aQp5ftwfza IU6ychRxZQiRESy98N8m2RpkQPnXRE/bYagkANd7glV6NGx90FBY5AtxCLZ6ZOVrLUXr kxLQ== X-Gm-Message-State: APjAAAUgiQzb0CLd8sQm3qrxnD/UZhhK/VG+g5KOTfFGKAdfQJNHZj9y xZEUHzhkkZa4Z0zloCMgFyzaPdP2Tyl7 X-Received: by 2002:aca:5d57:: with SMTP id r84mr7966908oib.143.1556297820067; Fri, 26 Apr 2019 09:57:00 -0700 (PDT) Date: Fri, 26 Apr 2019 09:56:55 -0700 Message-Id: <20190426165655.218228-1-venture@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.21.0.593.g511ec345e18-goog Subject: [PATCH] misc: aspeed-p2a-ctrl: fix mixed declarations From: Patrick Venture To: venture@google.com, arnd@arndb.de, gregkh@linuxfoundation.org, joel@jms.id.au, andrew@aj.id.au Cc: linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, arm@kernel.org, Stephen Rothwell Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix up mixed declarations and code in aspeed_p2a_mmap. Tested: Verified the build had the error and that this patch resolved it and there were no other warnings or build errors associated with compilation of this driver. Reported-by: Stephen Rothwell Signed-off-by: Patrick Venture --- drivers/misc/aspeed-p2a-ctrl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/misc/aspeed-p2a-ctrl.c b/drivers/misc/aspeed-p2a-ctrl.c index 9736821972ef..b60fbeaffcbd 100644 --- a/drivers/misc/aspeed-p2a-ctrl.c +++ b/drivers/misc/aspeed-p2a-ctrl.c @@ -100,6 +100,7 @@ static void aspeed_p2a_disable_bridge(struct aspeed_p2a_ctrl *p2a_ctrl) static int aspeed_p2a_mmap(struct file *file, struct vm_area_struct *vma) { unsigned long vsize; + pgprot_t prot; struct aspeed_p2a_user *priv = file->private_data; struct aspeed_p2a_ctrl *ctrl = priv->parent; @@ -107,7 +108,7 @@ static int aspeed_p2a_mmap(struct file *file, struct vm_area_struct *vma) return -EINVAL; vsize = vma->vm_end - vma->vm_start; - pgprot_t prot = vma->vm_page_prot; + prot = vma->vm_page_prot; if (vma->vm_pgoff + vsize > ctrl->mem_base + ctrl->mem_size) return -EINVAL; -- 2.21.0.593.g511ec345e18-goog