From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 References: <20180904212237.3078-1-atull@kernel.org> <20180904212237.3078-4-atull@kernel.org> <20180906181918.GA20419@archbook> In-Reply-To: <20180906181918.GA20419@archbook> From: Alan Tull Date: Thu, 6 Sep 2018 13:49:47 -0500 Message-ID: Subject: Re: [PATCH v2 3/8] fpga: bridge: add devm_fpga_bridge_create Content-Type: text/plain; charset="UTF-8" To: Moritz Fischer Cc: Moritz Fischer , Jonathan Corbet , Randy Dunlap , linux-kernel , linux-fpga@vger.kernel.org, Linux Doc Mailing List List-ID: On Thu, Sep 6, 2018 at 1:19 PM Moritz Fischer wrote: > > Hi Alan, > > On Wed, Sep 05, 2018 at 10:38:53AM -0500, Alan Tull wrote: > > > > - * fpga_bridge_unregister - unregister and free a fpga bridge > > > > - * @bridge: FPGA bridge struct created by fpga_bridge_create > > > > + * fpga_bridge_unregister - unregister a FPGA bridge > > > > + * > > > > + * @bridge: FPGA bridge struct > > > > + * > > > > + * This function is intended for use in a FPGA bridge driver's remove function. > > > > + * If the bridge was created with devm_fpga_bridge_create(), the bridge struct > > > > + * will be automatically freed. If the bridge was created with > > > > + * fpga_bridge_create(), the caller is responsible for freeing the bridge with > > > > + * fpga_bridge_free(). > > > > > > I find the formulation somewhat confusing, since it could be > > > interpreted as if you > > > used the devm_() functions you don't have to call unregister(). > > > > Yes I'm being too verbose and it's making things muddled. How about > > if I take out the part that starts with "If bridge was created..."? > > That just leaves "This function is intended for use in a FPGA bridge > > driver's remove function." > > Sounds good. OK, for v3 I'll make a similar change in patches 2 and 4. Alan > > Moritz