Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp1572737imp; Fri, 22 Feb 2019 06:23:29 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia1Mzhx6eYqP782zgLwrYEHgwlaRw+hl+O11gJVU8R7DZe8c6eOHJQe1tUltEZ5IpF8XqNR X-Received: by 2002:a63:d84b:: with SMTP id k11mr4272894pgj.142.1550845409219; Fri, 22 Feb 2019 06:23:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550845409; cv=none; d=google.com; s=arc-20160816; b=yfDeM4po+h35CzM9kf0n3LpxZkUiJ/59KH9Uj4yRCdpEtIiIu7Ehl5sKJINixgoman 4E+zyFoS37hhNtmcpVmPC8unfOV8HlhPXdT7Z2BbrIjuS/F5sR6DwmKuWKlSZP5GQrzC y1cAnugKlhXiIrZbq3mHXMiVqNwPi6OcOwrbEr02NK2cclBEtLuZlJFjp/BK/qCpMZfq V2dRj2pg189xa/tTcIpRK8/ajGuXQ87uitqXkqyVcyn0ucnPdJIpntIVV1j9C+g3lXnX BQUowEZznB1TXY/Mc3lpkw9Msa8w22bWe0yJTnasywONc+/7qjlppNtKis4m8PP5MeGy JgBw== 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=n9SDN7dqJacD1GN3oeQM2fpj43Q/aIqnmX7cc2ol54s=; b=XjDseezCRhdkL0B7UXAQawp8LMi9hxGZzPGOkAXWgmLD4ASh0kfaxOVijExqoPIGqB SKJUqmIDoQ22Zw48ImVWqRAPZREZq3RRMJwq1kt6GTGuHd9s02HUvPKAu/IPQwuhOj9v //9tMhl50kNB4Vi3sf6v/t0HkWKQ10nEjvsKDYC0qTFlb36fU4mzjT+SeBag1t4Nlkts iIrSgDqODd/ApJKOolxnrQ+mzeqRpgKHhpPsu1dLde6QtwyDiGmoXQPgwSHQUFrQPKm7 nzXJxaURaER9OcZjkfUqcn8/OrjpdJmS63mhDd86qdbaBi7MWWoLBGnkwwPL16wxwoyx 9j5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lClCo6fz; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k26si1551352pgb.72.2019.02.22.06.23.12; Fri, 22 Feb 2019 06:23:29 -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=@linaro.org header.s=google header.b=lClCo6fz; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726737AbfBVOWq (ORCPT + 99 others); Fri, 22 Feb 2019 09:22:46 -0500 Received: from mail-ot1-f68.google.com ([209.85.210.68]:38031 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726384AbfBVOWq (ORCPT ); Fri, 22 Feb 2019 09:22:46 -0500 Received: by mail-ot1-f68.google.com with SMTP id m1so1981350otf.5 for ; Fri, 22 Feb 2019 06:22:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=n9SDN7dqJacD1GN3oeQM2fpj43Q/aIqnmX7cc2ol54s=; b=lClCo6fzxAtT+Lm/n/Hqzvo0F+IjlbBifLJry6KnWNyXVzsv7GXi6oa1pIPYzVn7t3 oSowjtSgVd1gUvqLdpuHmiPf32WZpl75QuSVyJSLEHSn306DBtmvfhiEt6raIVAxG+fG LGNDQBbS/dEB/R9LLMSGV6HLg1Uy+oTiRBwr9w2c5QC1UISw797LkeocmG8eKnZMaQCI 0R6UIy+Gnx/avkTnw4pP9IF559SoGsnY1c5ew9nrWtCtHSOfQEqU/m4vIbWn3zTg8dIS IP7+mxgOlxccOTqf8ZV1NLigP04bBnbI1SDYOOh5Nw1LRSz3O7WNPAe6U+66+GhiNv1d b4CQ== 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=n9SDN7dqJacD1GN3oeQM2fpj43Q/aIqnmX7cc2ol54s=; b=CktDBf+3WTVTimO2VuF0+icjqHnZk+aNz7vu4XUq/WDncCCp1jVyKq6MrU6hA5Rx8x dZ/fFdAomjk76wnW/3G739UTcyp9ibGBCWLS2394xVwQZ7pnCvb8KfwT+Glyj5Kr4orJ GQk2MWC4OLRT4frhTKu82wnV2+GDKl/p+LH+Em96Gb10Yuydkrr+jmoBpYA6WkMTQi07 kbeMjkmN2YwOP3FeQcF2qew0LVeS1lAfs0VpTfFr80HroB/bCfBfih3uAquZg9LCSbmB 0jfx5x947YLowv22FCnBONdR2+VMXFPxgyD0zgy1pHqwlK+S517W4Yqwd/8ttmaZnVQo wQZw== X-Gm-Message-State: AHQUAuZezyyyTvNILvUytOa7D8b6PI9Fw40SGSw9K8EPKuf/S0Y075p9 7d7ll3lXd8132AjplaSmJYS7/3b5VCdSVYRny+jJEw== X-Received: by 2002:a05:6830:1292:: with SMTP id z18mr2781095otp.161.1550845365026; Fri, 22 Feb 2019 06:22:45 -0800 (PST) MIME-Version: 1.0 References: <20190221162627.3476-1-brgl@bgdev.pl> In-Reply-To: From: Rob Herring Date: Fri, 22 Feb 2019 08:22:33 -0600 Message-ID: Subject: Re: [PATCH] drivers: depend on HAS_IOMEM for devm_platform_ioremap_resource() To: Andy Shevchenko Cc: Bartosz Golaszewski , 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 1:56 PM Andy Shevchenko wrote: > > 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? Just a drive by comment, but IMO we should just get rid of HAS_IOMEM altogether. It is really just a !UML option as I think every other arch enables it. If folks really want to disable drivers on UML, just disable the subsystems. Though now with kunit mocking, there's a desire to enable HAS_IOMEM on UML, too. Rob