Hi Simon, On Thu, Oct 29, 2015 at 11:19:16AM -0600, Simon Glass wrote: > Hi Nikita, > > On 28 October 2015 at 03:23, Nikita Kiryanov <nik...@compulab.co.il> wrote: > > Simplify spl_mmc_load_image() code by moving the part that finds the mmc > > device > > into its own function spl_mmc_find_device(), available in two flavors: DM > > and > > non-DM. > > > > This refactor fixes a bug in which an error in the device location sequence > > does not necessarily aborts the rest of the code. With this refactor, we > > fail > > the moment there is an error. > > > > Signed-off-by: Nikita Kiryanov <nik...@compulab.co.il> > > Cc: Igor Grinberg <grinb...@compulab.co.il> > > Cc: Paul Kocialkowski <cont...@paulk.fr> > > Cc: Pantelis Antoniou <pa...@antoniou-consulting.com> > > Cc: Tom Rini <tr...@konsulko.com> > > Cc: Simon Glass <s...@chromium.org> > > --- > > Changes in V2: > > - No changes. > > > > common/spl/spl_mmc.c | 77 > > +++++++++++++++++++++++++++++++++++++--------------- > > 1 file changed, 55 insertions(+), 22 deletions(-) > > Reviewed-by: Simon Glass <s...@chromium.org> > > But can we only have one spl_mmc_find_device() function, with the > #ifdef CONFIG_DM_MMC inside it?
I prefer to have as few #ifdefs inside a function as possible. Besides, once driver model becomes ubiquitous we're going to have only one spl_mmc_find_device() anyway. > > -- > > 1.9.1 > > > > Regards, > Simon > _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot