From: Adrian Bunk <bunk@fs.tum.de>
To: Erik Andersen <andersen@codepoet.org>,
Marcelo Tosatti <marcelo@conectiva.com.br>,
linux-kernel <linux-kernel@vger.kernel.org>,
alan@redhat.com
Subject: Re: [PATCH] 2.4.21-rc1 pointless IDE noise reduction
Date: Sun, 27 Apr 2003 14:21:04 +0200 [thread overview]
Message-ID: <20030427122104.GK10256@fs.tum.de> (raw)
In-Reply-To: <20030424093443.GA7180@codepoet.org>
On Thu, Apr 24, 2003 at 03:34:43AM -0600, Erik Andersen wrote:
> The ide driver does not list whether drives support things like
> write cache, SMART, SECURITY ERASE UNIT. But for some silly
> reason it tells us at boot whether each drive is capable of
> supporting the Host Protected Area feature set. If people want
> to know the capabilites of their drive, they can run 'hdparm'
> and find out.
>
> This patch removes this pointless noise. Please apply,
>
>
> --- linux/drivers/ide/ide-disk.c.orig 2003-04-24 03:23:53.000000000 -0600
> +++ linux/drivers/ide/ide-disk.c 2003-04-24 03:24:54.000000000 -0600
> @@ -1133,10 +1133,7 @@
> */
> static inline int idedisk_supports_host_protected_area(ide_drive_t *drive)
> {
> - int flag = (drive->id->cfs_enable_1 & 0x0400) ? 1 : 0;
> - if (flag)
> - printk("%s: host protected area => %d\n", drive->name, flag);
> - return flag;
> + return((drive->id->cfs_enable_1 & 0x0400) ? 1 : 0);
> }
>
> /*
Looking at the only user of this function it seems we can completely
remove it (patch below).
Alan:
Is the patch below OK or are there any future plans for more uses of
idedisk_supports_host_protected_area?
> -Erik
cu
Adrian
--- linux-2.4.21-rc1-full/drivers/ide/ide-disk.c.old 2003-04-27 13:26:17.000000000 +0200
+++ linux-2.4.21-rc1-full/drivers/ide/ide-disk.c 2003-04-27 13:30:48.000000000 +0200
@@ -1128,18 +1128,6 @@
#endif /* CONFIG_IDEDISK_STROKE */
/*
- * Tests if the drive supports Host Protected Area feature.
- * Returns true if supported, false otherwise.
- */
-static inline int idedisk_supports_host_protected_area(ide_drive_t *drive)
-{
- int flag = (drive->id->cfs_enable_1 & 0x0400) ? 1 : 0;
- if (flag)
- printk("%s: host protected area => %d\n", drive->name, flag);
- return flag;
-}
-
-/*
* Compute drive->capacity, the full capacity of the drive
* Called with drive->id != NULL.
*
@@ -1165,8 +1153,6 @@
drive->capacity48 = 0;
drive->select.b.lba = 0;
- (void) idedisk_supports_host_protected_area(drive);
-
if (id->cfs_enable_2 & 0x0400) {
capacity_2 = id->lba_capacity_2;
drive->head = drive->bios_head = 255;
next prev parent reply other threads:[~2003-04-27 12:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-24 9:34 [PATCH] 2.4.21-rc1 pointless IDE noise reduction Erik Andersen
2003-04-24 10:28 ` Jens Axboe
2003-04-27 12:21 ` Adrian Bunk [this message]
2003-04-27 17:44 ` Erik Andersen
2003-04-24 15:25 Chuck Ebbert
2003-04-24 15:59 ` Richard B. Johnson
2003-04-24 16:31 ` Timothy Miller
2003-04-24 16:46 ` Richard B. Johnson
2003-04-24 17:15 ` Timothy Miller
2003-04-24 18:27 ` Willy Tarreau
2003-04-24 19:00 ` Timothy Miller
2003-04-25 18:14 ` Bill Davidsen
2003-04-25 18:30 ` Richard B. Johnson
2003-04-24 23:25 Chuck Ebbert
2003-04-25 15:08 ` Timothy Miller
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=20030427122104.GK10256@fs.tum.de \
--to=bunk@fs.tum.de \
--cc=alan@redhat.com \
--cc=andersen@codepoet.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
/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;
as well as URLs for NNTP newsgroup(s).