From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] remove unnecessary code in ata_piix
Date: Fri, 28 Sep 2012 11:29:04 -0700 [thread overview]
Message-ID: <20120928182904.GD18380@bill-the-cat> (raw)
In-Reply-To: <201209282012.21769.marex@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: <http://lists.denx.de/pipermail/u-boot/attachments/20120928/a8acc114/attachment.pgp>
next prev parent reply other threads:[~2012-09-28 18:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-16 11:53 [U-Boot] [PATCH] Fix checkpatch warnings about externs in *.c Pavel Herrmann
2012-09-16 12:37 ` Marek Vasut
2012-09-16 12:59 ` Pavel Herrmann
2012-09-16 13:11 ` Marek Vasut
2012-09-17 19:05 ` Tom Rini
2012-09-28 9:18 ` [U-Boot] [PATCH 1/2] remove unnecessary code in ata_piix Pavel Herrmann
2012-09-28 9:18 ` [U-Boot] [PATCH v2 2/2] Fix checkpatch warnings about externs in *.c Pavel Herrmann
2012-09-28 18:13 ` Marek Vasut
2012-09-28 19:39 ` Tom Rini
2012-09-28 18:12 ` [U-Boot] [PATCH 1/2] remove unnecessary code in ata_piix Marek Vasut
2012-09-28 18:29 ` Tom Rini [this message]
2012-09-29 14:52 ` [U-Boot] [U-Boot,1/2] " Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120928182904.GD18380@bill-the-cat \
--to=trini@ti.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox