Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp821525imp; Thu, 21 Feb 2019 11:56:47 -0800 (PST) X-Google-Smtp-Source: AHgI3IZtTh2GBzLUaZoKtFLECB2NhsPQNM690U/GzFDBfq4E8yGdejPnqsYYvEw5qOHSqzbkNc6x X-Received: by 2002:a65:6294:: with SMTP id f20mr247228pgv.174.1550779007563; Thu, 21 Feb 2019 11:56:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550779007; cv=none; d=google.com; s=arc-20160816; b=FDFv65dM9baZSXl0oHcdcar0BOxWAbq9BZgDJF572Hl2wI6QHpy1fTHInoI3MBBDBU plvjWCOe8X6lVPebklQgbKHo09AyEZoBHZ7ZhK06rcL51shi4ql/tYXwK7w7ZhuuMjHY rHcTElTUWYxC09CkDKO+pgWwQzoDnOMZghLNo8WRmtVx3VC3Tn5ZnPS9UYJtGg6OwBne 1KIrlQDGAB3TCGnITCkp/vAfLkmv2Fkj0WFS1EgxxNAd071/yGkOpvAqncy/6DLeN8za puwxydZ67v1Li83C/eDN0EJ4lCZSknC/sO2aQNtezlXQZcG9IEB7xp4daO52VIObpR+i ZXjA== 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=+tdSvCq8GL7lavXCsSW2Fx0scQwS6XqNwpB3L0uRkEc=; b=myTF/SGb/9jA4fekKEh12p9pUCNEMzsQhQJTz1mQCrbeAPkYFIgO1pMWjYbuYoV8Gh fpnyKkJYGO0YF6Vb/bV9bYGlu1fbHIBvSMvXDpcPVXm41zRFuVn93/V5kpSZTakJCvit tUKsvPAeBC73WKN3hlXH/gtQTGRi+9jOlKVaPiNHoVAdYvBRDzkmLYChlCZGk3+Vca8O Sb0DQM/keObX3rmh2c+FqQKL8RmAxXbspQlciKQjwvAA2MVboeyOofp8s5a8ILpZ/iew Mf1HaoRYvOxoG2WjgZEzMi2Mf2flnLAt0Rh3La4GPa5btc91aqXx4yuJtfbHY82MRbfn YDFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ld1vzekh; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p33si641090pld.132.2019.02.21.11.56.31; Thu, 21 Feb 2019 11:56:47 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=ld1vzekh; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726635AbfBUT4B (ORCPT + 99 others); Thu, 21 Feb 2019 14:56:01 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:32819 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726250AbfBUT4A (ORCPT ); Thu, 21 Feb 2019 14:56:00 -0500 Received: by mail-pl1-f196.google.com with SMTP id y10so14694521plp.0; Thu, 21 Feb 2019 11:56:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+tdSvCq8GL7lavXCsSW2Fx0scQwS6XqNwpB3L0uRkEc=; b=ld1vzekh9KeE8JhurD5oJlUPwV/MAHugJeyjEXi3QxkXrDCD80TvKQzyTT6aaWO2sK R6sM3tJkHblS7ejZY6mRZj3oULD+IsPt9xSgEEWsGMcmb12tn01zkw507tm+dWS6SL3n eSEmePjgZr1s3ZFDeL3FGKDfLRUaUsqttxjzYeK8kGM+gEyndWVksDhBOvE/S6S8eE7p pVX//bzvTr/qW+X104z8QGjPaBFWB+uEJmYrmehji/ySQn0Ld2ivjg3j3OtJtgoEJDUl E1lH/1H4IO8LfAI4xDzZMSSVILvjcBSB+j4eN0Be2P9I6rYzFm4jqx1HCCYE//nv6CWn /tsA== 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=+tdSvCq8GL7lavXCsSW2Fx0scQwS6XqNwpB3L0uRkEc=; b=AJUq+mgtQG/VgezMnQTG1NMuCkeGKVGk1CN0QTj+YJ3DI1R/BpYoBh90H0Le6ZGLrp /myZstiChVODb4KtglJyT9qccNuSW0yIaCafQzxLE3pnENzTcNWM2pXKlxgnlDnsZq1G RkqSEkX5XOkYShf7tlbQCDayufY9+nNbpi38hJW9egPeEqWFLXe1T1kZaGmKdgK/TGwa ezFDIPRV72YpGGWuGsQz5GwRmzgqbCPxbaqJ6OKsR7ap5xPmqMwFBltrj7DLUe+XQu2I PLa2+xMCVkNxEAGcsr/D4W0oEw6C2JXgEbczG6tYiX4YYqRURKlZxVFE4hSOY8eCUMJm 6n8A== X-Gm-Message-State: AHQUAuaErSQsn86AFtIOjEIu1Eju7Z3iCnFr1f6MElYXtHTUJ2pW9pvk qBrsZKdmjj9Elsj37M6YCXgsJHXAQEov1pJldDs= X-Received: by 2002:a17:902:bc88:: with SMTP id bb8mr291444plb.12.1550778960089; Thu, 21 Feb 2019 11:56:00 -0800 (PST) MIME-Version: 1.0 References: <20190221162627.3476-1-brgl@bgdev.pl> In-Reply-To: <20190221162627.3476-1-brgl@bgdev.pl> From: Andy Shevchenko Date: Thu, 21 Feb 2019 21:55:48 +0200 Message-ID: Subject: Re: [PATCH] drivers: depend on HAS_IOMEM for devm_platform_ioremap_resource() To: Bartosz Golaszewski Cc: Greg Kroah-Hartman , "Rafael J . Wysocki" , Keerthy , Linus Walleij , Andy Shevchenko , Linux Kernel Mailing List , "open list:GPIO SUBSYSTEM" , Bartosz Golaszewski 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 Thu, Feb 21, 2019 at 6:27 PM Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > We only build devm_ioremap_resource() if HAS_IOMEM is selected, so this > dependency must cascade down to devm_platform_ioremap_resource(). > +#ifdef CONFIG_HAS_IOMEM > void __iomem *devm_platform_ioremap_resource(struct platform_device *pdev, > unsigned int index) > { > @@ -96,6 +97,7 @@ void __iomem *devm_platform_ioremap_resource(struct platform_device *pdev, > return devm_ioremap_resource(&pdev->dev, res); > } > EXPORT_SYMBOL_GPL(devm_platform_ioremap_resource); > +#endif /* CONFIG_HAS_IOMEM */ What about declaration in *.h? Perhaps you may just do this inside the function? -- With Best Regards, Andy Shevchenko