From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikita Kiryanov Date: Thu, 22 Oct 2015 16:53:12 +0300 Subject: [U-Boot] [PATCH 02/12] spl: mmc: add break statements in spl_mmc_load_image() In-Reply-To: <5628E349.6040009@redhat.com> References: <1445515280-21389-1-git-send-email-nikita@compulab.co.il> <1445515280-21389-3-git-send-email-nikita@compulab.co.il> <5628D877.6080403@redhat.com> <20151022130829.GA27303@skynet> <5628E349.6040009@redhat.com> Message-ID: <20151022135312.GC27303@skynet> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, On Thu, Oct 22, 2015 at 03:23:21PM +0200, Hans de Goede wrote: > Hi, > > On 22-10-15 15:08, Nikita Kiryanov wrote: > >On Thu, Oct 22, 2015 at 02:37:11PM +0200, Hans de Goede wrote: > >>Hi, > >> > >>On 22-10-15 14:01, Nikita Kiryanov wrote: > >>> if (!err) > >>> return; > >>> #endif > >>>+ break; > >>> #endif > >>> case MMCSD_MODE_UNDEFINED: > >>> default: > >>> #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT > >>>- if (err) > >>>- puts("spl: mmc: no boot mode left to try\n"); > >>>- else > >>>- puts("spl: mmc: wrong boot mode\n"); > >>>+ puts("spl: mmc: wrong boot mode\n"); > >>> #endif > >>> hang(); > >> > >>The above hang() can be removed now. > >> > > > >Not true. If CONFIG_SPL_LIBCOMMON_SUPPORT is not defined this part will > >be just: > > > >default: > >} > > > >Which is a compile error (label at the end of compound statement). > > Easy to fix, put the default: in the #ifdef too. Right. OK, noted for V2. > > Otherwise you have: > > hang(); > } > hang(); > > Which is just ugly code IMHO. > > Regards, > > Hans > > > > > >>> } > >>>+ > >>>+ hang(); > >>> } > >>> > >> > >>Regards, > >> > >>Hans > >> >