[U-Boot] [PATCH v4 1/2] Loop block device for sandbox

Pavel Herrmann morpheus.ibis at gmail.com
Sun Sep 16 13:49:16 CEST 2012


Hi

On Thursday 13 September 2012 15:31:39 Tom Rini wrote:
> On Fri, Sep 07, 2012 at 11:19:03AM +0200, Pavel Herrmann wrote:
> > 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.
> > 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.
> 
> Please move your extern into <sata.h>, as the starting point before
> merge.  If you could also go and fix:
> $ git grep -l sata_dev_desc
> common/cmd_sata.c
> drivers/block/ata_piix.c
> drivers/block/dwc_ahsata.c
> drivers/block/dwc_ahsata.h
> drivers/block/fsl_sata.c
> drivers/block/pata_bfin.c
> drivers/block/pata_bfin.h
> drivers/block/sata_dwc.c
> drivers/block/sata_sil.c
> drivers/block/sata_sil.h
> drivers/block/sata_sil3114.c
> 
> To use <sata.h> (some already do) instead of their own private extern
> I'd greatly appreciate it.

I dont think <sata.h> is the place to put this, as it is a "consumer-facing" 
header. rather create some common sata header in drivers/block

Pavel Herrmann


More information about the U-Boot mailing list