Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3325498yba; Sun, 28 Apr 2019 23:35:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqzRK1or0wo2PVdtiwa3gF5DbExaVPGkSvCGVtg1moIF99aYZeQbEzbhCegaXsm9TVJqgvv+ X-Received: by 2002:a17:902:525:: with SMTP id 34mr60860277plf.138.1556519745372; Sun, 28 Apr 2019 23:35:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556519745; cv=none; d=google.com; s=arc-20160816; b=vs4vqOiVvDzBqThHcMDv8YnGyMvwjpkx/pkf2slO7m5fU5DxT1pYSddOh9amGj0aOD DsIzYdcqU+QyN/EsxDNsjS02HMmDxIMchHea+LIjruTUtqe6Iv/BtLJGlSpqiTKF6AkJ lqyqY2PhG6pCed+raFHFgn7s5HqaHTCbSbSF/oj/sX/UMk5nG4zFYiDBZxXcr5Nj9t3S 56mO2h/vTBheAvWdlayA8gECavGyeHK7kF0JiotNLagI1rCqirfU4UR87WwfiywjrYuV ExpFPpEgMa6vPxJ1Z5LI5qboiyykw28rsAkqAQvxqebtnNH3K07yguh8t5Cdpa09lMi9 EH5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Gl+VBxLR+GvLaPXntiUPaJTzvL30rd0oZ2WHgSedNcs=; b=ZH4P00aQWKeChokc/rNJafjG+iMQLgIJ9cM4Yjb/Y8xpR0mdJm9spnmUDQEsLQPZ9M sB3IJKadsdnAc9Cfm7R2rlBwJZU0TUa7gbfvxszJ2D4kwWLhNRAsshSr7xzaObCx4oqV hFDSlHkZJ4pDwfldX7OU9YT0ZNZ3QzpnbcHG72yO14VExFlijM9ChZ9MofwwWj6QR1Dv ihLZAiw1r1WXNzlllVVvLeftoE/rBe4k4lfJUGYTDNJO7I4GvJoise474mSC+u7wE11p m8d3qQ4+ID+GeVIfx4g1mwDos4b99b0U4Dlv9rTlP8a8a8Fo7Fb43HVu0QdlNaEVBX/6 t6Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@jms.id.au header.s=google header.b=RA8rRbG1; 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 g34si32506790pld.115.2019.04.28.23.35.29; Sun, 28 Apr 2019 23:35:45 -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=@jms.id.au header.s=google header.b=RA8rRbG1; 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 S1726979AbfD2Gel (ORCPT + 99 others); Mon, 29 Apr 2019 02:34:41 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:40692 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726137AbfD2Gek (ORCPT ); Mon, 29 Apr 2019 02:34:40 -0400 Received: by mail-qt1-f193.google.com with SMTP id y49so5017094qta.7 for ; Sun, 28 Apr 2019 23:34:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jms.id.au; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Gl+VBxLR+GvLaPXntiUPaJTzvL30rd0oZ2WHgSedNcs=; b=RA8rRbG1034BWX7o4E1XRqbi+lga2VA0KM2tC+lbBBCvRzXpsOoOTXoak2ktUYXx3i mPlKfQGZyS1PpLgmgUT+NYxD5C9YkdzxxxC9o3fBSKPUEGLdn2VnEOnihBW9AfKADl2B 3b3a+2m0IvZScTZRhHwa+0u5jjTOxViRNk6+A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Gl+VBxLR+GvLaPXntiUPaJTzvL30rd0oZ2WHgSedNcs=; b=DDWHmqjw1Q49x28J7B8eSaaY7PrMzP4fc6wToaP5vC0SvNZeto8Rw59xxHSXceTZOM UMe9tnt3lFpXwjLkg3/8dAA0tkr8jcOJByETG4MdRB5hwfmIPXcdMGJoeyL+fop57u/w s2/SyPru3oA02+HW1A+0ysOSi/rffwJHqlMA6sEITl8i9KZeOWhN9EgoWPKDeXMIFDtb 6tIdG+pRZRmqkCNi7+RGoLYpYIokGD4J+lykijYPsqsnZViW0ee3qG8ceaK17R6oX0f/ xifYh1rjqeHWiSiSoezVi3KPnA/draCO/uKYOw1Ay7RrSn5AJMevPRJia8/S4k5E9RmI uYjA== X-Gm-Message-State: APjAAAV5oH9YaHOfJMK4vsKQRL3ZspvkdmOcTI4E+JgvsxuIdW7WCfKb inZfTxI5B+PVgkKnIJEa+4wwN/z71WwKqrdsBRM= X-Received: by 2002:a0c:948e:: with SMTP id j14mr17487089qvj.245.1556519679861; Sun, 28 Apr 2019 23:34:39 -0700 (PDT) MIME-Version: 1.0 References: <20190426165655.218228-1-venture@google.com> In-Reply-To: <20190426165655.218228-1-venture@google.com> From: Joel Stanley Date: Mon, 29 Apr 2019 06:34:28 +0000 Message-ID: Subject: Re: [PATCH] misc: aspeed-p2a-ctrl: fix mixed declarations To: Patrick Venture Cc: Arnd Bergmann , Greg KH , Andrew Jeffery , Linux ARM , linux-aspeed@lists.ozlabs.org, Linux Kernel Mailing List , arm , 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 On Fri, 26 Apr 2019 at 16:57, Patrick Venture wrote: > > 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 Reviewed-by: Joel Stanley > --- > 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 >