[U-Boot] [PATCH v4 1/2] Loop block device for sandbox
Marek Vasut
marex at denx.de
Fri Sep 7 11:42:24 CEST 2012
Dear Pavel Herrmann,
> On Friday 07 of September 2012 11:26:48 Marek Vasut wrote:
> > Dear Pavel Herrmann,
> >
> > > On Friday 07 of September 2012 01:29:55 Marek Vasut wrote:
> > > > Dear Pavel Herrmann,
> > > >
> > > > > This driver uses files as block devices, can be used for testing
> > > > > disk operations on sandbox.
> > > > > A new command "sata_loop" is introduced to load files in runtime.
> > > >
> > > > WARNING: externs should be avoided in .c files
> > > > #141: FILE: drivers/block/sata_loopback.c:39:
> > > > +extern block_dev_desc_t sata_dev_desc[];
> > > >
> > > > total: 0 errors, 1 warnings, 231 lines checked
> > > >
> > > > NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX
> > > > MULTISTATEMENT_MACRO_USE_DO_WHILE
> > >
> > > Yes, i know about that, and chose to ignore it.
> >
> > Sorry, this is not how it works.
> >
> > > i will not create a header file for a single line that checkpatch
> > > doesnt like (with just a warning), especially when other drivers have
> > > such a line in them as well.
> >
> > So, implement proper accessor for this list? Or export the structure
> > through some sata-related header? How does other do it?
>
> other drivers have the same line that i do, therefore ignore the checkpatch
> warning, same as i do
Oh god damned! This is definitelly not the way to go!
NAK! NAK! NAK!! NAK!!! NAK!!!!! NAK!!!!!!!! ... you get the idea ;-)
> see sata_dwc.c, ata_piix.c, fsl_sata.c, sata_sil3114.c
Sad state of codebase, thanks for pointing out the obvious :-( You know, now
that you pointed it out, you also know what to do :-)
Besides, you'd have to do it anyway, so let's do it now.
> Pavel Herrmann
Best regards,
Marek Vasut
More information about the U-Boot
mailing list