From: Tom Rini Date: Fri, 28 Sep 2012 11:29:04 -0700 Subject: [U-Boot] [PATCH 1/2] remove unnecessary code in ata_piix In-Reply-To: <201209282012.21769.marex@denx.de> References: <1347796413-15515-1-git-send-email-morpheus.ibis@gmail.com> <1348823884-17187-1-git-send-email-morpheus.ibis@gmail.com> <201209282012.21769.marex@denx.de> Message-ID: <20120928182904.GD18380@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, Sep 28, 2012 at 08:12:21PM +0200, Marek Vasut wrote: > Dear Pavel Herrmann, > > > We set sata_curr_device to 0 right after returning from init_sata(), > > so there's no point in setting it to the last scanned driver at this > > point. Note: there are more duplicities with cmd_sata, but those > > might be required, as the code seems to reset the entire controller > > on every scan, ignoring the requested port number. > > I think that code is valid. It configures the sata_curr_device to > valid value in case this was not called from the context of the > command. No? > > I think it can be pulled from the loops above the return 0 though. Pavel has it right. A further clean-up would be to make sata_curr_device be static to common/cmd_sata.c as it's unused / referenced anywhere else. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: