From patchwork Thu Jun 16 12:10:40 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manuel Zerpies X-Patchwork-Id: 887152 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5GCKTG6007868 for ; Thu, 16 Jun 2011 12:20:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757561Ab1FPMUr (ORCPT ); Thu, 16 Jun 2011 08:20:47 -0400 Received: from faui40.informatik.uni-erlangen.de ([131.188.34.40]:44449 "EHLO faui40.informatik.uni-erlangen.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755959Ab1FPMUr (ORCPT ); Thu, 16 Jun 2011 08:20:47 -0400 Received: from faui49y (unknown [IPv6:2001:638:a00:2a:219:99ff:fea8:5295]) by faui40.informatik.uni-erlangen.de (Postfix) with SMTP id 4669554963C; Thu, 16 Jun 2011 14:10:40 +0200 (CEST) Received: by faui49y (sSMTP sendmail emulation); Thu, 16 Jun 2011 14:10:40 +0200 Date: Thu, 16 Jun 2011 14:10:40 +0200 From: Manuel Zerpies To: Steve Wise , Roland Dreier , Sean Hefty , Hal Rosenstock , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Cc: christian.dietrich@informatik.uni-erlangen.de Subject: [PATCH 05/11] RDMA/hw/cxgb4: use printk_ratelimited() instead of printk_ratelimit() Message-ID: <3bf562d8c92207221d39b2c96af4731308324d61.1308142053.git.manuel.f.zerpies@ww.stud.uni-erlangen.de> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 16 Jun 2011 12:20:48 +0000 (UTC) Since printk_ratelimit() shouldn't be used anymore (see comment in include/linux/printk.h), replace it with printk_ratelimited(). Signed-off-by: Manuel Zerpies --- drivers/infiniband/hw/cxgb4/resource.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/infiniband/hw/cxgb4/resource.c b/drivers/infiniband/hw/cxgb4/resource.c index 4fb50d5..407ff39 100644 --- a/drivers/infiniband/hw/cxgb4/resource.c +++ b/drivers/infiniband/hw/cxgb4/resource.c @@ -37,6 +37,7 @@ #include #include #include +#include #include "iw_cxgb4.h" #define RANDOM_SIZE 16 @@ -311,8 +312,8 @@ u32 c4iw_pblpool_alloc(struct c4iw_rdev *rdev, int size) { unsigned long addr = gen_pool_alloc(rdev->pbl_pool, size); PDBG("%s addr 0x%x size %d\n", __func__, (u32)addr, size); - if (!addr && printk_ratelimit()) - printk(KERN_WARNING MOD "%s: Out of PBL memory\n", + if (!addr) + printk_ratelimited(KERN_WARNING MOD "%s: Out of PBL memory\n", pci_name(rdev->lldi.pdev)); return (u32)addr; } @@ -373,8 +374,8 @@ u32 c4iw_rqtpool_alloc(struct c4iw_rdev *rdev, int size) { unsigned long addr = gen_pool_alloc(rdev->rqt_pool, size << 6); PDBG("%s addr 0x%x size %d\n", __func__, (u32)addr, size << 6); - if (!addr && printk_ratelimit()) - printk(KERN_WARNING MOD "%s: Out of RQT memory\n", + if (!addr) + printk_ratelimited(KERN_WARNING MOD "%s: Out of RQT memory\n", pci_name(rdev->lldi.pdev)); return (u32)addr; }