From: Pavel Herrmann Date: Sun, 16 Sep 2012 13:49:16 +0200 Subject: [U-Boot] [PATCH v4 1/2] Loop block device for sandbox In-Reply-To: <20120913223139.GI19851@bill-the-cat> References: <1346843795-4744-1-git-send-email-morpheus.ibis@gmail.com> <1567411.to7P2GxvO8@bloomfield> <20120913223139.GI19851@bill-the-cat> Message-ID: <3414971.h6I3PLkFiA@merom> 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 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 , 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 (some already do) instead of their own private extern > I'd greatly appreciate it. I dont think is the place to put this, as it is a "consumer-facing" header. rather create some common sata header in drivers/block Pavel Herrmann