From patchwork Fri Aug 17 06:04:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hiroshi DOYU X-Patchwork-Id: 1337281 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id A819BDF266 for ; Fri, 17 Aug 2012 06:04:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754599Ab2HQGEl (ORCPT ); Fri, 17 Aug 2012 02:04:41 -0400 Received: from hqemgate04.nvidia.com ([216.228.121.35]:6299 "EHLO hqemgate04.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754386Ab2HQGEj convert rfc822-to-8bit (ORCPT ); Fri, 17 Aug 2012 02:04:39 -0400 Received: from hqnvupgp06.nvidia.com (Not Verified[216.228.121.13]) by hqemgate04.nvidia.com id ; Thu, 16 Aug 2012 23:03:45 -0700 Received: from hqemhub02.nvidia.com ([172.17.108.22]) by hqnvupgp06.nvidia.com (PGP Universal service); Thu, 16 Aug 2012 23:04:24 -0700 X-PGP-Universal: processed; by hqnvupgp06.nvidia.com on Thu, 16 Aug 2012 23:04:24 -0700 Received: from deemhub02.nvidia.com (10.21.69.138) by hqemhub02.nvidia.com (172.20.150.31) with Microsoft SMTP Server (TLS) id 8.3.264.0; Thu, 16 Aug 2012 23:04:22 -0700 Received: from DEMAIL01.nvidia.com ([10.21.69.140]) by deemhub02.nvidia.com ([10.21.69.138]) with mapi; Fri, 17 Aug 2012 08:04:20 +0200 From: Hiroshi Doyu To: "linux-kernel@vger.kernel.org" , Greg Kroah-Hartman CC: Antti Palosaari , "htl10@users.sourceforge.net" , "linux-media@vger.kernel.org" , "joe@perches.com" , "linux-tegra@vger.kernel.org" Date: Fri, 17 Aug 2012 08:04:16 +0200 Subject: [PATCH 1/1] driver-core: Shut up dev_dbg_reatelimited() without DEBUG Thread-Topic: [PATCH 1/1] driver-core: Shut up dev_dbg_reatelimited() without DEBUG Thread-Index: Ac17fyQiMTGNaEIySQ+BMLfQ/o0HGA== Message-ID: <20120817.090416.563933713934615530.hdoyu@nvidia.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-nvconfidentiality: public acceptlanguage: en-US MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org dev_dbg_reatelimited() without DEBUG printed "217078 callbacks suppressed". This shouldn't print anything without DEBUG. Signed-off-by: Hiroshi Doyu Reported-by: Antti Palosaari --- include/linux/device.h | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/include/linux/device.h b/include/linux/device.h index eb945e1..d4dc26e 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -962,9 +962,13 @@ do { \ dev_level_ratelimited(dev_notice, dev, fmt, ##__VA_ARGS__) #define dev_info_ratelimited(dev, fmt, ...) \ dev_level_ratelimited(dev_info, dev, fmt, ##__VA_ARGS__) +#if defined(DEBUG) #define dev_dbg_ratelimited(dev, fmt, ...) \ dev_level_ratelimited(dev_dbg, dev, fmt, ##__VA_ARGS__) - +#else +#define dev_dbg_ratelimited(dev, fmt, ...) \ + no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) +#endif /* * Stupid hackaround for existing uses of non-printk uses dev_info *