Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932869AbcCCW4K (ORCPT ); Thu, 3 Mar 2016 17:56:10 -0500 Received: from g9t5008.houston.hp.com ([15.240.92.66]:53885 "EHLO g9t5008.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758374AbcCCW4H (ORCPT ); Thu, 3 Mar 2016 17:56:07 -0500 Message-ID: <1457048928.15454.117.camel@hpe.com> Subject: Re: [PATCH v2 3/4] resource: Add device-managed insert/remove_resource() From: Toshi Kani To: Dan Williams Cc: Ingo Molnar , Borislav Petkov , "Rafael J. Wysocki" , Andrew Morton , "linux-nvdimm@lists.01.org" , Linux ACPI , "linux-kernel@vger.kernel.org" Date: Thu, 03 Mar 2016 16:48:48 -0700 In-Reply-To: References: <1456959056-12316-1-git-send-email-toshi.kani@hpe.com> <1456959056-12316-4-git-send-email-toshi.kani@hpe.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.4 (3.18.4-1.fc23) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1082 Lines: 33 On Thu, 2016-03-03 at 14:45 -0800, Dan Williams wrote: > On Wed, Mar 2, 2016 at 2:50 PM, Toshi Kani wrote:  : > > > > diff --git a/kernel/resource.c b/kernel/resource.c > > index effb6ee..b1a3394 100644 > > --- a/kernel/resource.c > > +++ b/kernel/resource.c > > @@ -1449,6 +1449,75 @@ void __devm_release_region(struct device *dev, > > struct resource *parent, > >  EXPORT_SYMBOL(__devm_release_region); > > > >  /* > > + * Remove function for devm_insert_resource() and > > devm_remove_resource(). > > + */ > > +static void devm_resource_remove(struct device *dev, void *ptr) > > +{ > > +       struct resource **r = ptr; > > + > > +       remove_resource(*r); > > +} > > + > > Maybe call this __devm_remove_resource?  I think this makes it clearer > that it is a private helper function.  I was initially confused about > the difference between devm_resource_remove and devm_remove_resource. Will do.  I followed the naming convention of devm_resource_release() in the same file, but I agree that this is confusing. Thanks, -Toshi