From patchwork Tue May 30 10:19:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Joe Perches X-Patchwork-Id: 9754253 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BC120602F0 for ; Tue, 30 May 2017 10:20:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AF40226E75 for ; Tue, 30 May 2017 10:20:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A445227FA5; Tue, 30 May 2017 10:20:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5EC3726E75 for ; Tue, 30 May 2017 10:20:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751322AbdE3KTo (ORCPT ); Tue, 30 May 2017 06:19:44 -0400 Received: from smtprelay0236.hostedemail.com ([216.40.44.236]:53557 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751004AbdE3KTm (ORCPT ); Tue, 30 May 2017 06:19:42 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay06.hostedemail.com (Postfix) with ESMTP id 980099EDF0; Tue, 30 May 2017 10:19:35 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: alley23_537f1905d3462 X-Filterd-Recvd-Size: 2250 Received: from XPS-9350 (unknown [47.151.132.55]) (Authenticated sender: joe@perches.com) by omf11.hostedemail.com (Postfix) with ESMTPA; Tue, 30 May 2017 10:19:33 +0000 (UTC) Message-ID: <1496139572.2618.19.camel@perches.com> Subject: Re: [PATCH v2] [media] vb2: core: Lower the log level of debug outputs From: Joe Perches To: Hirokazu Honda , Pawel Osciak , Marek Szyprowski , Kyungmin Park , Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 30 May 2017 03:19:32 -0700 In-Reply-To: <20170530094901.1807-1-hiroh@chromium.org> References: <20170530094901.1807-1-hiroh@chromium.org> X-Mailer: Evolution 3.22.6-1ubuntu1 Mime-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, 2017-05-30 at 18:49 +0900, Hirokazu Honda wrote: > Some debug output whose log level is set 1 flooded the log. > Their log level is lowered to find the important log easily. Maybe use pr_debug instead? Perhaps it would be better to change the level to a bitmap so these can be more individually controlled. Maybe add MODULE_PARM_DESC too. Perhaps something like below (without the pr_debug conversion) ---  drivers/media/v4l2-core/videobuf2-core.c | 11 ++++++-----  1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c index 94afbbf92807..88ae2b238115 100644 --- a/drivers/media/v4l2-core/videobuf2-core.c +++ b/drivers/media/v4l2-core/videobuf2-core.c @@ -31,12 +31,13 @@    static int debug;  module_param(debug, int, 0644); +MODULE_PARM_DESC(debug, "debugging output control bitmap (values from 0-31)")   -#define dprintk(level, fmt, arg...)       \ - do {       \ - if (debug >= level)       \ - pr_info("vb2-core: %s: " fmt, __func__, ## arg); \ - } while (0) +#define dprintk(level, fmt, ...) \ +do { \ + if (debug & BIT(level)) \ + pr_info("vb2-core: %s: " fmt, __func__, ##__VA_ARGS__); \ +} while (0)    #ifdef CONFIG_VIDEO_ADV_DEBUG