From: Jeff Garzik <jgarzik@pobox.com>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH] pata_cmd640: don't read CFR pointlessly
Date: Sat, 08 May 2010 17:27:24 -0400 [thread overview]
Message-ID: <4BE5D73C.30707@pobox.com> (raw)
In-Reply-To: <201005082227.19096.sshtylyov@ru.mvista.com>
On 05/08/2010 02:27 PM, Sergei Shtylyov wrote:
> cmd640_hardware_init() reads CFR but doesn't use the value read...
>
> Signed-off-by: Sergei Shtylyov<sshtylyov@ru.mvista.com>
>
> ---
> The patch is against the recent Linus' tree.
>
> drivers/ata/pata_cmd640.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> Index: linux-2.6/drivers/ata/pata_cmd640.c
> ===================================================================
> --- linux-2.6.orig/drivers/ata/pata_cmd640.c
> +++ linux-2.6/drivers/ata/pata_cmd640.c
> @@ -181,13 +181,10 @@ static struct ata_port_operations cmd640
>
> static void cmd640_hardware_init(struct pci_dev *pdev)
> {
> - u8 r;
> u8 ctrl;
>
> /* CMD640 detected, commiserations */
> pci_write_config_byte(pdev, 0x5B, 0x00);
> - /* Get version info */
> - pci_read_config_byte(pdev, CFR,&r);
> /* PIO0 command cycles */
Agreed with this patch, but we lose some information: all that remains
is an uncommented 'CFR' definition. Without the code comment, which is
deleted in this patch, we have no idea what that register does. Given
that the chipset docs are not public AFAIK, this is a net loss of
information about this chipset, IMO.
Maybe revise this patch, or add a second patch, which adds a comment
where 'CFR' is defined? Something as simple as "/* version info */"
would be sufficient.
Jeff
next prev parent reply other threads:[~2010-05-08 21:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-08 18:27 [PATCH] pata_cmd640: don't read CFR pointlessly Sergei Shtylyov
2010-05-08 21:27 ` Jeff Garzik [this message]
2010-05-08 21:38 ` Sergei Shtylyov
2010-05-08 21:44 ` Jeff Garzik
2010-05-14 21:32 ` Jeff Garzik
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=4BE5D73C.30707@pobox.com \
--to=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=sshtylyov@ru.mvista.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.