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

Tom Rini trini at ti.com
Fri Sep 14 00:31:39 CEST 2012


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.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120913/62ef6192/attachment.pgp>


More information about the U-Boot mailing list