From patchwork Thu May 11 12:24:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 99637 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp703329qge; Thu, 11 May 2017 05:25:26 -0700 (PDT) X-Received: by 10.98.69.193 with SMTP id n62mr57937pfi.216.1494505526153; Thu, 11 May 2017 05:25:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1494505526; cv=none; d=google.com; s=arc-20160816; b=yKnyHEy5y1X9RaLk6eYJd8l+ZGXt6aRh4km8H/RZbSfGon47961fqLOFK06NpqeJ6u VrGF/jDDh7S7++cq509UJG+KSlyDciIg0D3SNgSUnNDnmJgfuGBmBTGAP5faE+i6lWoI IT4Gjn/OTy0NEy2FZqygN2af/FE/dNa6OdTeWed5wcZY2GzS2Qh4MlzrWKsQXLpANAGP aDNB9dIcuVrNGDG1CBO0X01C2bwBHz6xldV5/jrnEgFd32mbSwOhVnKDYT2r+jSAZVaJ 5Xy7ERv4wKGXHzgYAJ5N2Jh7RgZzA1/ODDOSXv5HIInVoe9JusG3U4O5ULlwf2qWBsm/ CtVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=uji4qIg0xHK1499kEwp4h1U/ynZhogrZuO5LeWQBzh4=; b=PDbIYpLKVT0CSnaI9kykfArGT4QWZ8IB62cjlO+ajKFDad00EbE4z/5kn+igLmg2jn 57OisdGcMfsRxVSh0PWcNatTvQLpJZpo9Lv0az9160tHeDPC2vmwVtiK02/qBIaDZ1l/ OPAkT955r8Nnfr+wtoehjHMsQBQtZteJMYh1VlaXO0J3bZzODhV0Ypo9ZvehKR25xa8o qsWh+CthiXDZEwxg0F6fj11l0TbtiOhr9M4jWeusW0VXaFt7QeraDnQJyjuA5f11X7dT YNF8t/8hti6KTrPE5demCyOMlhopH3/hTga+NWbR4MFYPUReKLj9mIhvXMtj/A29Zc96 ygKA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 b59si1865plb.337.2017.05.11.05.25.25; Thu, 11 May 2017 05:25:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-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 devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932460AbdEKMZY (ORCPT + 7 others); Thu, 11 May 2017 08:25:24 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:55110 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755481AbdEKMZY (ORCPT ); Thu, 11 May 2017 08:25:24 -0400 Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue002 [212.227.15.129]) with ESMTPA (Nemesis) id 0Lzkkl-1e4u2y3KeB-014zcO; Thu, 11 May 2017 14:25:15 +0200 From: Arnd Bergmann To: Rob Herring , Frank Rowand Cc: Arnd Bergmann , Marek Szyprowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] of: reserved_mem: fix 'const' annotation Date: Thu, 11 May 2017 14:24:50 +0200 Message-Id: <20170511122458.3862716-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170511122458.3862716-1-arnd@arndb.de> References: <20170511122458.3862716-1-arnd@arndb.de> X-Provags-ID: V03:K0:q3IEZFmDzE2P5Jir8z14coHNMRtXjHlINqB1RhjVNlG/MrvL56G OckBEWdAuZ/ACwlMG43BII3j595msYePP8a/2h514nvgKAoKCMCRhovhbkAD/+gll0OVamW ELs3+2H6qmoFFT77loyyeIBfjkF561oy8Lv204o+vWH/OCdYgAmyIuNZE7ZCgajLdvgtpvk de/NW+yHNa4L8KdYTSbiw== X-UI-Out-Filterresults: notjunk:1; V01:K0:XYUMkp9T5Qw=:wIfyNx92fw2Eg+nNGI0glB R7I4NV36I0ThHZPQwxJG0ZZzduDZLvysSFfPfTmjwB7Lm9Z3R6R6orqL77RTlfysg1SdUwYAn HcCLWNcKALHA/DcTzmQcw6kSyCzKbYaaI6vfaHEIfsZ+nhvVbMROklUZiOIorGZCyI6MUHfM1 18xJXQ+Mrtupx4AjT8Dqs5B9BnUGq4yOgh90cO7vYKZoBaLenF29GJ4jSrtA1bAI2rSeSjmaC O56bEWh9H7+JixNqpKDPPp9ulyqqNREbaGfubJUpu2BM24MPmGjnZSQzKT6PM3/mvlbXIhWA1 cIg4OlybLUZ2QNdr7+clMqMoHWZotm9ISRAUdmW3kswJkVNKE69Ln5FZbMjmFWeORgtKuS5UV 87M/UQWtjCWaLhpOgg8Cbyb6NY3Uo36/7dwAXIfMtUuYbKKg/TuQ6Xw65vQyU1pa6qmxva+uh rYCTMUl8UiYynArBY5+eLdornh3nFmephWUnQL+RSwCm6QalnsL94Vx/CidYnDxLskywXB35I tElfZAovTKQsUb6NOeB7Q9GHOkjAo8GsAtpYia/Z/uDqBRevNZww8VhMtzXfp6M+HXf4MRX/5 T0sCVIVARKXoHeGyhet9XiZnN7lkBqskcUUREOBXSaT0+jCE36ulOQPxRw7IP4Uk2wA3NQwpv Kt5uf/6abQlc6cn0cS250ffj0I3w5RhJIiPwhS1JIpOrhM1ZHH/pymBkWZviKGgJsxWM= Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org It's the pointer that is supposed to be const, not the return type of the function. drivers/of/of_reserved_mem.c: In function '__reserved_mem_init_node': drivers/of/of_reserved_mem.c:200:7: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers] int const (*initfn)(struct reserved_mem *rmem) = i->data; Fixes: 17a70355ea57 ("of: fix sparse warnings in fdt, irq, reserved mem, and resolver code") Signed-off-by: Arnd Bergmann --- drivers/of/of_reserved_mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c index 4dec07ea510f..3f03ec004829 100644 --- a/drivers/of/of_reserved_mem.c +++ b/drivers/of/of_reserved_mem.c @@ -197,7 +197,7 @@ static int __init __reserved_mem_init_node(struct reserved_mem *rmem) const struct of_device_id *i; for (i = __reservedmem_of_table; i < &__rmem_of_table_sentinel; i++) { - int const (*initfn)(struct reserved_mem *rmem) = i->data; + int (* const initfn)(struct reserved_mem *rmem) = i->data; const char *compat = i->compatible; if (!of_flat_dt_is_compatible(rmem->fdt_node, compat))