From mboxrd@z Thu Jan 1 00:00:00 1970 From: AKASHI Takahiro Date: Wed, 15 Jul 2020 13:33:11 +0900 Subject: [PATCH v3 05/17] dfu: export dfu_list In-Reply-To: <24367d2b-ad23-fb82-249c-58016d69a5d3@gmx.de> References: <20200710012537.6264-1-takahiro.akashi@linaro.org> <20200710012537.6264-6-takahiro.akashi@linaro.org> <24367d2b-ad23-fb82-249c-58016d69a5d3@gmx.de> Message-ID: <20200715043311.GC24274@laputa> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Heinrich, On Fri, Jul 10, 2020 at 06:25:16PM +0200, Heinrich Schuchardt wrote: > On 10.07.20 03:25, AKASHI Takahiro wrote: > > This variable will be utilized to enumerate all dfu entities > > for UEFI capsule firmware update in a later commit. > > > > Signed-off-by: AKASHI Takahiro > > --- > > drivers/dfu/dfu.c | 2 +- > > include/dfu.h | 3 +++ > > 2 files changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c > > index a298c2c43999..501a60b34400 100644 > > --- a/drivers/dfu/dfu.c > > +++ b/drivers/dfu/dfu.c > > @@ -18,7 +18,7 @@ > > #include > > #include > > > > -static LIST_HEAD(dfu_list); > > +LIST_HEAD(dfu_list); > > static int dfu_alt_num; > > static int alt_num_cnt; > > static struct hash_algo *dfu_hash_algo; > > diff --git a/include/dfu.h b/include/dfu.h > > index 94b0a9e68317..e9af9503d685 100644 > > --- a/include/dfu.h > > +++ b/include/dfu.h > > @@ -158,6 +158,9 @@ struct dfu_entity { > > unsigned int inited:1; > > }; > > > > +struct list_head; > > +extern struct list_head dfu_list; > > + > > #ifdef CONFIG_SET_DFU_ALT_INFO > > /** > > * set_dfu_alt_info() - set dfu_alt_info environment variable > > > > Why would you need to export this list if the current implementation of > the dfu command does not need to export it? Because there is a new 'need', that is enumerating all the definitions of dfu targets for users, i.e. UEFI subsystem. > Please, use the existing DFU API functions instead of accessing a > private member of the implementation. There is no appropriate API at this moment. -Takahiro Akashi > Best regards > > Heinrich > >