From patchwork Mon Feb 25 12:55:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 159177 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp1990277jad; Mon, 25 Feb 2019 04:55:11 -0800 (PST) X-Google-Smtp-Source: AHgI3IYr3AGw0Py934co/NymWWGq74drB7z9S374ZlwTusMVN74ImrQbl9zi9LACgPgqUdaJmtVC X-Received: by 2002:a62:f5c8:: with SMTP id b69mr20064001pfm.128.1551099311307; Mon, 25 Feb 2019 04:55:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551099311; cv=none; d=google.com; s=arc-20160816; b=cK3Ygo3Fx8kfm7AO3wJd0vnUNr85nnZFyc2gSYPcBoW7CuPDD1rHZtoHOU6n/JHrpL /7Ac3ShZ33IcwfffzEpFYLnP9LUxvr0vW16VxEK0IyubUQhi9BFL0WpXl0+1leHCGlWJ n0x+2sUnNp2jq27AWahqAadFVn2ErClHLOsowCQzY+rr2Cm7/9UbdZT033jskmRAiXqn z77xpF0BfRD+2BU2cpIpqLggCgzZiIulUS6nSEbnle/gmHpsYFNmLsNra7nPkj43Nlyd 8O+OtitIDczlG99sJtmaUDMZKw8XCP4clec4RlbK7TPxR+1qRjRmBKGjbZJB0RXWNAXL vG0g== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=mGmN/IbBwo5X8zo8Gq7gaY++wFn19enaS/Xm7XJ+Kqc=; b=dpVROHWywdk09oNb/l1X+Lg6cO1IAWjGTqJnwMPrKkcN+tPye18MrASRB+dZKiGm7f WfXENb6nEqJXvqgwlR8sdWIifZOWYw0LIizvdeeiTjs6igFtRhL3sowjMrGJbxKDVAWL RpFBrmiYWua/A54zguvB22JBTWPGIWn3XUt4JgXGbxr+wsqqeHm/ogtEE9j56NyCfTNc MDxedFRA1dRJWS1SN3eOHp+8mGTVVRnj/k/ITThVGTpK8K7VqbAhyo+MdXvAjxcZyMqU mhoSNIuCRuDIH+2juzmPWyLWPXPImqy+ccdNwl/NAYZxKjozY8IRGMCkOdkyk/heRNfA JXlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ScPy1g9n; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-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 t23si858332pfa.64.2019.02.25.04.55.11; Mon, 25 Feb 2019 04:55:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-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=@linaro.org header.s=google header.b=ScPy1g9n; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726969AbfBYMzK (ORCPT + 5 others); Mon, 25 Feb 2019 07:55:10 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:34788 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726965AbfBYMzK (ORCPT ); Mon, 25 Feb 2019 07:55:10 -0500 Received: by mail-lj1-f196.google.com with SMTP id l5so7306801lje.1 for ; Mon, 25 Feb 2019 04:55:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=mGmN/IbBwo5X8zo8Gq7gaY++wFn19enaS/Xm7XJ+Kqc=; b=ScPy1g9nymZiDc5aTMXcy9NWpWxRdt+lI7fIv+/0YBotBf/mdXpev3ISeP1lnPOSvz Q3c+r2K5la0twhTtKeWQHUfejd3xnreyTAy+lwEpX90pesU+J4KFrAAnoTiDg7vx0JQ6 4YVyLUrpngfZyM+1LgfIm4YRyI3GKGIBhxarrUyXUxolAKIHJysUi33Jdgl7DbpaQlsz LTnIE+azhCuvUR++VIX7yNICEoL+Mq6JetI+SXI76BV0Km08zeHO8j09c5hZTocRp6Vw ZHqC/r7h8SJdDlJgWnZNdXifWvivvP0PHCR/VO4EycoJlb172vhD7YMNVzVWO0n02blc PwAQ== 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:mime-version :content-transfer-encoding; bh=mGmN/IbBwo5X8zo8Gq7gaY++wFn19enaS/Xm7XJ+Kqc=; b=Ylag0ijFM1wTs70FA9sr5j3wXQRNFIlufUzgplWrZG+mOhKLphcPiGL810b5XyB+Ec KyRp6WuRDhkmqzCNEf6YrMht2b7eKs8Cblusk6tuswDLkXQlIATpX/eNrW7xY2U3Sch6 rb/K8+xJ5AWPx7IsDohY53a/gS15p15vg03wsxXWtQkSXTSh+H561SfVRh721lbCjgww SQcua06eLqER1ceTsxVcKDmH02VdoW/GWk5ef5X8NDJbHbVTtkn6nw9AqWxjk1wir8Hz 39aFAsrpTigFkPW+/HLZD3iGrQzGfhRb29xnyfxrUgN3GbgFgvAQj56A3RUcgdMkycdB vYEA== X-Gm-Message-State: AHQUAuZ3Ab9gWX3+9rUicbzoG4ovdYeAt/Obli9YMSYy8wvfdh7thCrm 9HApgX1bd6wf2ZFgWiQvNZXj20+QdFU= X-Received: by 2002:a2e:92ce:: with SMTP id k14-v6mr9917088ljh.154.1551099307188; Mon, 25 Feb 2019 04:55:07 -0800 (PST) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id x19sm2556118lfe.42.2019.02.25.04.55.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Feb 2019 04:55:03 -0800 (PST) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Bartosz Golaszewski , Linus Walleij , Stephen Rothwell , kbuild test robot , Enrico Weigelt Subject: [PATCH] gpio: amd-fch: Drop const from resource Date: Mon, 25 Feb 2019 13:55:00 +0100 Message-Id: <20190225125500.20571-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The build servers and linux-next are complaining like this: drivers/gpio/gpio-amd-fch.c: In function 'amd_fch_gpio_probe': drivers/gpio/gpio-amd-fch.c:164:49: warning: passing argument 2 of 'devm_ioremap_resource' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] priv->base = devm_ioremap_resource(&pdev->dev, &amd_fch_gpio_iores); ^~~~~~~~~~~~~~~~~~~ In file included from include/linux/platform_device.h:14, from drivers/gpio/gpio-amd-fch.c:15: include/linux/device.h:709:15: note: expected 'struct resource *' but argument is of type 'const struct resource *' void __iomem *devm_ioremap_resource(struct device *dev,struct resource *res); ^~~~~~~~~~~~~~~~~~~~~ Let's just remove "const" for now. It is possible that devm_ioremap_resource() should rather be constified so we can pass const resources as arguments. But right now I just want to get rid of this build warning. Fixes: e09d168f13f0 ("gpio: AMD G-Series PCH gpio driver") Reported-by: Stephen Rothwell Reported-by: kbuild test robot Cc: Enrico Weigelt Signed-off-by: Linus Walleij --- drivers/gpio/gpio-amd-fch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/drivers/gpio/gpio-amd-fch.c b/drivers/gpio/gpio-amd-fch.c index 3b4fdce325c1..4fd66444ea33 100644 --- a/drivers/gpio/gpio-amd-fch.c +++ b/drivers/gpio/gpio-amd-fch.c @@ -25,7 +25,7 @@ #define AMD_FCH_GPIO_FLAG_WRITE BIT(22) #define AMD_FCH_GPIO_FLAG_READ BIT(16) -static const struct resource amd_fch_gpio_iores = +static struct resource amd_fch_gpio_iores = DEFINE_RES_MEM_NAMED( AMD_FCH_MMIO_BASE + AMD_FCH_GPIO_BANK0_BASE, AMD_FCH_GPIO_SIZE,