From patchwork Thu May 4 18:00:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 98558 Delivered-To: patch@linaro.org Received: by 10.140.89.200 with SMTP id v66csp733699qgd; Thu, 4 May 2017 11:02:20 -0700 (PDT) X-Received: by 10.98.18.137 with SMTP id 9mr12379198pfs.75.1493920940361; Thu, 04 May 2017 11:02:20 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f12si2804828pln.103.2017.05.04.11.02.19; Thu, 04 May 2017 11:02:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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 stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755001AbdEDSBx (ORCPT + 6 others); Thu, 4 May 2017 14:01:53 -0400 Received: from mail-it0-f67.google.com ([209.85.214.67]:34967 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753310AbdEDSBm (ORCPT ); Thu, 4 May 2017 14:01:42 -0400 Received: by mail-it0-f67.google.com with SMTP id 131so2587024itz.2; Thu, 04 May 2017 11:01:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=YtL7moBuotmzPPAqCQ4PuRj4Dw040mMUXVDb/S4alok=; b=lZyikXWutACsX1xqoktliOm+8qMfqHP+5BV8Q3iBW0mYmrGKCJYcTL6JzSJk/fu+3a yLV5oS2XO3Zc/OnUV0fj0dkqQYupU5Yx7tXcCxoyr4KyjatBF+YHNfUSLb6+zjZMlhBt 3Nxe3C65uX7lryj7jWTvb/My7lrEcyC/GziMypkZ6N4fjagJNkgEGfTRAuyTpCTbVvtz reQ8TJOdsenx851W0IQQk6xlbTD5+ByIcMlkvBgqT0WkcI68Z7vBe+hquxKbggofz12v plqaSrCFq/Jo5gnFqtNhoswhYfHVD6SrwLR3jLHEMaIEUs5hxadWH9rUWnTNSpKZ9KlZ F/Tw== X-Gm-Message-State: AN3rC/6TBuBK3f1mi/TLZNJzHNWWrWqrL+VP6fnpRcS88oLaj6aTJ65z WzMG0952ZJaO7Q== X-Received: by 10.202.89.134 with SMTP id n128mr14413465oib.220.1493920901223; Thu, 04 May 2017 11:01:41 -0700 (PDT) Received: from localhost.localdomain (66-90-148-125.dyn.grandenetworks.net. [66.90.148.125]) by smtp.googlemail.com with ESMTPSA id d44sm1428684otc.6.2017.05.04.11.01.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 May 2017 11:01:40 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org, Frank Rowand , Mark Rutland Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH 2/3] of: fix sparse warning in of_pci_range_parser_one Date: Thu, 4 May 2017 13:00:34 -0500 Message-Id: <20170504180035.12834-2-robh@kernel.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170504180035.12834-1-robh@kernel.org> References: <20170504180035.12834-1-robh@kernel.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org sparse gives the following warning for 'pci_space': ../drivers/of/address.c:266:26: warning: incorrect type in assignment (different base types) ../drivers/of/address.c:266:26: expected unsigned int [unsigned] [usertype] pci_space ../drivers/of/address.c:266:26: got restricted __be32 const [usertype] It appears that pci_space is only ever accessed on powerpc, so the endian swap is often not needed. Cc: stable@vger.kernel.org Signed-off-by: Rob Herring --- drivers/of/address.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.11.0 diff --git a/drivers/of/address.c b/drivers/of/address.c index 02b2903fe9d2..72914cdfce2a 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c @@ -263,7 +263,7 @@ struct of_pci_range *of_pci_range_parser_one(struct of_pci_range_parser *parser, if (!parser->range || parser->range + parser->np > parser->end) return NULL; - range->pci_space = parser->range[0]; + range->pci_space = be32_to_cpup(parser->range); range->flags = of_bus_pci_get_flags(parser->range); range->pci_addr = of_read_number(parser->range + 1, ns); range->cpu_addr = of_translate_address(parser->node,