Received: by 10.223.176.46 with SMTP id f43csp954242wra; Wed, 24 Jan 2018 08:22:16 -0800 (PST) X-Google-Smtp-Source: AH8x226CKf366EIGUsm3pwIm4/Rse6RlSQcdyFNaeyUJ3dh4y+RDEmG24B/xDDRX1FF/txRie/4v X-Received: by 10.99.96.23 with SMTP id u23mr11788147pgb.40.1516810936721; Wed, 24 Jan 2018 08:22:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516810936; cv=none; d=google.com; s=arc-20160816; b=wxWW7nUnh05KWOBsEfmCkjHD21ll4Spk3UZDNb1s1qCQ7DkwGLsR9tAksIMTp6wMwB w2EasY8APVjg//s23HaLpR3ZouPDdzYIO+xFulYY4TNYf4v53vhyVRgKeJj7gD+UWc8N Atq+QhPBjmQoPmnNYPoxT9svcxZVBu5OEqp0DFpQw7HMVxUMIZqAH0LEKdmQqFdYUv5F 3Gvh87oWtnXNkUsjysi568GqBA9I09XtFi8afw1VF28/A0XZyYc5S68vSCwNjqSoDnMy 5He4TiHqb+h6dcM9ujDP2M0k/oX6p/8odv4GvwmWHQ2FtsYWJqcdmr4VXNVQ0QLXh3hN J4Aw== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=ErT9W5i4eHJ2ktFXeu9ahUSZ2PHOF0aNhOeXgzpGhrk=; b=ZNwSAWLx0bGd3Svx0aEUtgE7KTRTcdJGjxGmx/iI+Jbm5fvyZmQvfJczpq+UHsOfqx otxuhPv4H3G/TielWOvisF29U7GTyopMBnKTNHn/06AeAV3NBEzzNN+Xh7pasoi0XWRj zzGaoF5aERYNDEYdlLqdMdkmIYFNzQ7RfBZ0J+mT7BFjoh9eJxO4ltFMvaWtED/H1/x4 VfKXGqgXrzdXwMDW4Cxd8ym+I4zApUVO81p/xO3YhQJIho/FI/Nc8abHv6YaKslncdnv IAhj3Y2AkEp4Gm/ITU8MYIT8BQc5Aes2qnyQXjhAbzoXPE864I2laxlwuIPlsJBNUGB2 XHNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SXEvVsrk; 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=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g6si322788pgq.186.2018.01.24.08.22.02; Wed, 24 Jan 2018 08:22:16 -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=SXEvVsrk; 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=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934296AbeAXQVl (ORCPT + 99 others); Wed, 24 Jan 2018 11:21:41 -0500 Received: from mail-qt0-f196.google.com ([209.85.216.196]:43920 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934207AbeAXQVj (ORCPT ); Wed, 24 Jan 2018 11:21:39 -0500 Received: by mail-qt0-f196.google.com with SMTP id s3so11669465qtb.10 for ; Wed, 24 Jan 2018 08:21:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ErT9W5i4eHJ2ktFXeu9ahUSZ2PHOF0aNhOeXgzpGhrk=; b=SXEvVsrkbIAkiFDrnwyFW3zZIzcma4Q98FFmv6TzE45tvyNUjru/L4TK0Gj7yKlxIK q0j/FQ6rdINbunSAqZLlNRDQtqsFsBj6KraLf86eiYgo0l8O4HIL12i/aGoQp3BGxb8o pqjLdBJO+XH5y6KmzT7VOxmvULylwCM44yqUNdpBZ18Z0DzzFt9XFoJozsZM1cYP3OuI snMfwNduD2ugkSR/1vdXFrlNducQBrZh5xsXqWMC9v2DMjg3XE5BrelTLtU4PH3JGoCy H+b69Wg8djlp99sn9vUcpTvS7LYlQ3Grp7w/+Jy8p0r7XHzzKm7bTprysmKnubZ5Sxdh 1lLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ErT9W5i4eHJ2ktFXeu9ahUSZ2PHOF0aNhOeXgzpGhrk=; b=NGmr2wxU2CCwsp0CvigMoLyE8/QJ2qKUnom/7GukTbEWUD7VKnQw86N2q3r0XiWxSN nCRLIdf/I3dUT/dTuWviPAvArRUFefeFZdOOPgKhY9Bjlb/0Y9NznByFMrbOXxm7UEAr gVfNDitDJBqAA6Oo1WrCe0eFZCFGpMX8yqQquPVKrpXLaXqGaF5rXaQEleqY3bhuw5nL C7GnLSS4H6/S/mIiZqn/t9jSLz4ZRdpVOGMFT+rHDBPeD9gYBznDSQlPIfhX/14vaIHw dp9ny2qPHh5rdxAlu3tjMFMF33E0Fe5vS0RtYwqeNNizJ6YtYXbueeDRKIo54ze/mIwA 4Nwg== X-Gm-Message-State: AKwxyte2SB9S8/k5kSv2MaE+QMMg6cqtNtr2dflLNFAzKqQwHgs9PkFq mxgZYo0sP6tQvvfeFv0ezt9CYfjzuuof80ChUoU= X-Received: by 10.55.120.66 with SMTP id t63mr9954297qkc.345.1516810899224; Wed, 24 Jan 2018 08:21:39 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.175.35 with HTTP; Wed, 24 Jan 2018 08:21:38 -0800 (PST) In-Reply-To: <20180124100754.GC19593@lenoch> References: <20180124100604.GA19593@lenoch> <20180124100754.GC19593@lenoch> From: Andy Shevchenko Date: Wed, 24 Jan 2018 18:21:38 +0200 Message-ID: Subject: Re: [PATCH v2 2/3] devres: Add devm_ioremap_shared_resource() To: Ladislav Michl Cc: Linux Kernel Mailing List , "open list:MEMORY TECHNOLOGY..." , Thomas Gleixner , Tom Lendacky , Borislav Petkov , Ingo Molnar , Lorenzo Pieralisi , Philippe Ombredanne , Kate Stewart , Greg Kroah-Hartman , Boris Brezillon , Dmitry Torokhov , Bjorn Helgaas , Wei Yongjun 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 Wed, Jan 24, 2018 at 12:07 PM, Ladislav Michl wrote: > Implement managed ioremap function for shared resources. > +#define devm_ioremap_resource(dev, res) \ > + __devm_ioremap_resource(dev, res, false) > +#define devm_ioremap_shared_resource(dev, res) \ > + __devm_ioremap_resource(dev, res, true) > +void __iomem *__devm_ioremap_resource(struct device *dev, struct resource *res, > + bool shared); I would rather do the following: _resource() -> _resource_exclusive() #define _resource() _resource_exclusive() Add _resource_shared() And use long names below in this file whenever refer to exclusive or shared variant. > void devm_iounmap(struct device *dev, void __iomem *addr); > int check_signature(const volatile void __iomem *io_addr, > const unsigned char *signature, int length); > + > void devm_ioremap_release(struct device *dev, void *res); This part doesn't belong to the change. > + * When possible, use devm_ioremap_resource() or > + * devm_ioremap_shared_resource() instead. > - * Checks that a resource is a valid memory region, requests the memory > - * region and ioremaps it. All operations are managed and will be undone > - * on driver detach. > + * Checks that a resource is a valid memory region, eventually requests the > + * memory region and ioremaps it. All operations are managed and will be > + * undone on driver detach. Wording is changed and no clue in commit message why. -- With Best Regards, Andy Shevchenko