Patchwork [1/2] sfc: modify allocation error message

login
register
mail settings
Submitter Andrew Morton
Date Feb. 11, 2009, 9:27 p.m.
Message ID <200902112127.n1BLRZSA031950@imap1.linux-foundation.org>
Download mbox | patch
Permalink /patch/22951/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Andrew Morton - Feb. 11, 2009, 9:27 p.m.
From: Mike Travis <travis@sgi.com>

Change error message when alloc_cpumask_var fails.

Signed-off-by: Mike Travis <travis@sgi.com>
Acked-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/net/sfc/efx.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
David Miller - Feb. 13, 2009, 12:45 a.m.
From: akpm@linux-foundation.org
Date: Wed, 11 Feb 2009 13:27:34 -0800

> Change error message when alloc_cpumask_var fails.
> 
> Signed-off-by: Mike Travis <travis@sgi.com>
> Acked-by: Ben Hutchings <bhutchings@solarflare.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

This has to go into whatever tree adds the alloc_cpumask_var()
call to this function, and that isn't one of the networking
trees. :-)

Anyways, for the record I'm fine with this change:

Acked-by: David S. Miller <davem@davemloft.net>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff -puN drivers/net/sfc/efx.c~sfc-modify-allocation-error-message drivers/net/sfc/efx.c
--- a/drivers/net/sfc/efx.c~sfc-modify-allocation-error-message
+++ a/drivers/net/sfc/efx.c
@@ -857,9 +857,9 @@  static int efx_wanted_rx_queues(void)
 	int count;
 	int cpu;
 
-	if (!alloc_cpumask_var(&core_mask, GFP_KERNEL)) {
+	if (unlikely(!alloc_cpumask_var(&core_mask, GFP_KERNEL))) {
 		printk(KERN_WARNING
-		       "efx.c: allocation failure, irq balancing hobbled\n");
+		       "sfc: RSS disabled due to allocation failure\n");
 		return 1;
 	}