* [PATCH 2.6.22-rc5] libata: be less verbose about hpa
@ 2007-06-25 11:45 Tejun Heo
2007-06-25 12:12 ` Alan Cox
2007-06-27 6:45 ` Jeff Garzik
0 siblings, 2 replies; 4+ messages in thread
From: Tejun Heo @ 2007-06-25 11:45 UTC (permalink / raw)
To: Jeff Garzik, Alan Cox, linux-ide@vger.kernel.org
There's no reason to print out hpa related messages when HPA is not
active. Kill the unconditional message and add a warning message
which is printed if HPA size is smaller than the current size.
Signed-off-by: Tejun Heo <htejun@gmail.com>
---
drivers/ata/libata-core.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index adfae9d..deda684 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -983,11 +983,6 @@ static u64 ata_hpa_resize(struct ata_device *dev)
else
hpa_sectors = ata_read_native_max_address(dev);
- /* if no hpa, both should be equal */
- ata_dev_printk(dev, KERN_INFO, "%s 1: sectors = %lld, "
- "hpa_sectors = %lld\n",
- __FUNCTION__, (long long)sectors, (long long)hpa_sectors);
-
if (hpa_sectors > sectors) {
ata_dev_printk(dev, KERN_INFO,
"Host Protected Area detected:\n"
@@ -1009,7 +1004,11 @@ static u64 ata_hpa_resize(struct ata_device *dev)
return hpa_sectors;
}
}
- }
+ } else if (hpa_sectors < sectors)
+ ata_dev_printk(dev, KERN_WARNING, "%s 1: hpa sectors (%lld) "
+ "is smaller than sectors (%lld)\n", __FUNCTION__,
+ (long long)hpa_sectors, (long long)sectors);
+
return sectors;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2.6.22-rc5] libata: be less verbose about hpa
2007-06-25 12:12 ` Alan Cox
@ 2007-06-25 12:12 ` Tejun Heo
0 siblings, 0 replies; 4+ messages in thread
From: Tejun Heo @ 2007-06-25 12:12 UTC (permalink / raw)
To: Alan Cox; +Cc: Jeff Garzik, linux-ide@vger.kernel.org
Alan Cox wrote:
> On Mon, 25 Jun 2007 20:45:54 +0900
> Tejun Heo <htejun@gmail.com> wrote:
>
>> There's no reason to print out hpa related messages when HPA is not
>> active. Kill the unconditional message and add a warning message
>> which is printed if HPA size is smaller than the current size.
>>
>> Signed-off-by: Tejun Heo <htejun@gmail.com>
>
> Acked-by: Alan Cox <alan@redhat.com>
>
> (Should it be a dprintk instead of vanish though ?)
I thought about doing KERN_DEBUG but we have printks for both hpa >
current and hpa < current, so if no message is printed hpa == current
and the current sectors is printed in the next line anyway, so I think
we can just drop it.
--
tejun
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2.6.22-rc5] libata: be less verbose about hpa
2007-06-25 11:45 [PATCH 2.6.22-rc5] libata: be less verbose about hpa Tejun Heo
@ 2007-06-25 12:12 ` Alan Cox
2007-06-25 12:12 ` Tejun Heo
2007-06-27 6:45 ` Jeff Garzik
1 sibling, 1 reply; 4+ messages in thread
From: Alan Cox @ 2007-06-25 12:12 UTC (permalink / raw)
To: Tejun Heo; +Cc: Jeff Garzik, linux-ide@vger.kernel.org
On Mon, 25 Jun 2007 20:45:54 +0900
Tejun Heo <htejun@gmail.com> wrote:
> There's no reason to print out hpa related messages when HPA is not
> active. Kill the unconditional message and add a warning message
> which is printed if HPA size is smaller than the current size.
>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
(Should it be a dprintk instead of vanish though ?)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2.6.22-rc5] libata: be less verbose about hpa
2007-06-25 11:45 [PATCH 2.6.22-rc5] libata: be less verbose about hpa Tejun Heo
2007-06-25 12:12 ` Alan Cox
@ 2007-06-27 6:45 ` Jeff Garzik
1 sibling, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2007-06-27 6:45 UTC (permalink / raw)
To: Tejun Heo; +Cc: Alan Cox, linux-ide@vger.kernel.org
Tejun Heo wrote:
> There's no reason to print out hpa related messages when HPA is not
> active. Kill the unconditional message and add a warning message
> which is printed if HPA size is smaller than the current size.
>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> ---
> drivers/ata/libata-core.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
> index adfae9d..deda684 100644
> --- a/drivers/ata/libata-core.c
> +++ b/drivers/ata/libata-core.c
> @@ -983,11 +983,6 @@ static u64 ata_hpa_resize(struct ata_device *dev)
> else
> hpa_sectors = ata_read_native_max_address(dev);
>
> - /* if no hpa, both should be equal */
> - ata_dev_printk(dev, KERN_INFO, "%s 1: sectors = %lld, "
> - "hpa_sectors = %lld\n",
> - __FUNCTION__, (long long)sectors, (long long)hpa_sectors);
> -
> if (hpa_sectors > sectors) {
> ata_dev_printk(dev, KERN_INFO,
> "Host Protected Area detected:\n"
> @@ -1009,7 +1004,11 @@ static u64 ata_hpa_resize(struct ata_device *dev)
> return hpa_sectors;
> }
> }
> - }
> + } else if (hpa_sectors < sectors)
> + ata_dev_printk(dev, KERN_WARNING, "%s 1: hpa sectors (%lld) "
> + "is smaller than sectors (%lld)\n", __FUNCTION__,
> + (long long)hpa_sectors, (long long)sectors);
> +
applied
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-06-27 6:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-25 11:45 [PATCH 2.6.22-rc5] libata: be less verbose about hpa Tejun Heo
2007-06-25 12:12 ` Alan Cox
2007-06-25 12:12 ` Tejun Heo
2007-06-27 6:45 ` Jeff Garzik
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).