From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] remove unnecessary code in ata_piix
Date: Fri, 28 Sep 2012 20:12:21 +0200 [thread overview]
Message-ID: <201209282012.21769.marex@denx.de> (raw)
In-Reply-To: <1348823884-17187-1-git-send-email-morpheus.ibis@gmail.com>
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.
> Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com>
> ---
> drivers/block/ata_piix.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/block/ata_piix.c b/drivers/block/ata_piix.c
> index c81d11a..1c3ab8a 100644
> --- a/drivers/block/ata_piix.c
> +++ b/drivers/block/ata_piix.c
> @@ -204,9 +204,6 @@ init_sata (int dev)
> dev_print (&sata_dev_desc[devno]);
> /* initialize partition type */
> init_part (&sata_dev_desc[devno]);
> - if (sata_curr_device < 0)
> - sata_curr_device =
> - i * CONFIG_SYS_SATA_DEVS_PER_BUS +
j;
> }
> }
> }
Best regards,
Marek Vasut
next prev parent reply other threads:[~2012-09-28 18:12 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 ` Marek Vasut [this message]
2012-09-28 18:29 ` [U-Boot] [PATCH 1/2] remove unnecessary code in ata_piix Tom Rini
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=201209282012.21769.marex@denx.de \
--to=marex@denx.de \
--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