We used to have a fixed-size resource table. If a device had
twenty resources when the table only had space for ten, we didn't
need ten warnings, so we added the ratelimit.
Now that we can dynamically allocate new resources, we should
only get failures if the allocation fails. That should be
rare enough that we don't need to ratelimit the messages.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Index: work10/drivers/pnp/resource.c
===================================================================
--- work10.orig/drivers/pnp/resource.c 2008-05-05 11:38:16.000000000 -0600
+++ work10/drivers/pnp/resource.c 2008-05-05 11:49:05.000000000 -0600
@@ -537,15 +537,10 @@ struct pnp_resource *pnp_add_irq_resourc
{
struct pnp_resource *pnp_res;
struct resource *res;
- static unsigned char warned;
pnp_res = pnp_new_resource(dev);
if (!pnp_res) {
- if (!warned) {
- dev_err(&dev->dev, "can't add resource for IRQ %d\n",
- irq);
- warned = 1;
- }
+ dev_err(&dev->dev, "can't add resource for IRQ %d\n", irq);
return NULL;
}
@@ -563,15 +558,10 @@ struct pnp_resource *pnp_add_dma_resourc
{
struct pnp_resource *pnp_res;
struct resource *res;
- static unsigned char warned;
pnp_res = pnp_new_resource(dev);
if (!pnp_res) {
- if (!warned) {
- dev_err(&dev->dev, "can't add resource for DMA %d\n",
- dma);
- warned = 1;
- }
+ dev_err(&dev->dev, "can't add resource for DMA %d\n", dma);
return NULL;
}
@@ -590,16 +580,12 @@ struct pnp_resource *pnp_add_io_resource
{
struct pnp_resource *pnp_res;
struct resource *res;
- static unsigned char warned;
pnp_res = pnp_new_resource(dev);
if (!pnp_res) {
- if (!warned) {
- dev_err(&dev->dev, "can't add resource for IO "
- "%#llx-%#llx\n",(unsigned long long) start,
- (unsigned long long) end);
- warned = 1;
- }
+ dev_err(&dev->dev, "can't add resource for IO %#llx-%#llx\n",
+ (unsigned long long) start,
+ (unsigned long long) end);
return NULL;
}
@@ -619,16 +605,12 @@ struct pnp_resource *pnp_add_mem_resourc
{
struct pnp_resource *pnp_res;
struct resource *res;
- static unsigned char warned;
pnp_res = pnp_new_resource(dev);
if (!pnp_res) {
- if (!warned) {
- dev_err(&dev->dev, "can't add resource for MEM "
- "%#llx-%#llx\n",(unsigned long long) start,
- (unsigned long long) end);
- warned = 1;
- }
+ dev_err(&dev->dev, "can't add resource for MEM %#llx-%#llx\n",
+ (unsigned long long) start,
+ (unsigned long long) end);
return NULL;
}
--
--
| Manu Abraham | PCIE |
| Jared Hulbert | [PATCH 00/10] AXFS: Advanced XIP filesystem |
| Pardo | Re: pthread_create() slow for many threads; also time to revisit 64b context switc... |
| Tomasz Chmielewski | Re: [PATCH] Intel IXP4xx network drivers v.2 - Ethernet and HSS |
git: | |
| Thomas Glanzmann | fatal: serious inflate inconsistency |
| Jeff Garzik | Re: Using GIT to store /etc (Or: How to make GIT store all file permission bits) |
| Andy Parkins | Re: git-fetch and unannotated tags |
| Yossi Leybovich | corrupt object on git-gc |
| Richard Stallman | Real men don't attack straw men |
| Bertram Scharpf | First install: Grub doesn't find partitions |
| Unix Fan | Chatting with developers? Is it soo 1996? |
| Joel Wiramu Pauling | Re: Suggested PF Setup when using BitTorrent? |
| Vegard Nossum | Re: [bug, netconsole, SLUB] BUG skbuff_head_cache: Poison overwritten |
| Jarek Poplawski | Re: NMI lockup, 2.6.26 release |
| Tomas Winkler | [PATCH] iwlwifi: RS small compile warnings without CONFIG_IWLWIFI_DEBUG |
| Simon Horman | Re: [PATCH] sendfile() and UDP socket |
