From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A8273C07CA9 for ; Sun, 26 Nov 2023 14:52:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1nciN/3yGSaRwdmKYSa6OyLyxZ3EIHGFos+7zojNU9g=; b=PSfd8mz8VR71CV 2i9JKj41vTh12McEDFanhTWc6qfZTqJerex+rR2erAeIld5GWRWoOTgZk8Gh0ieUFRZM1SVpJNJ/d 1lliOqzB9YuGBL//p+YMWc/MClKD1wPpWKb76Af82IeMCmnAwnODfR8a124WfUumWUNQkL7X50n5T 9Xdk1xpI29vhI0+dsJ0OkrvdVy/+tmRMeFV9DS4CBnBscqB1BJ9XJZMrNQ/pRu/zSHKFul9376jus j1ktuqwU9Yui/p6BZJ2EdosHJl1vk+0R8cvtOJIqAbJ0yPIeexiZzKFAWW/YEeX/SBQrHoL1qhEeJ XBNMN/nOZ0/hrrItSZxA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r7GUV-00BzvA-10; Sun, 26 Nov 2023 14:52:11 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r7GUR-00Bzo7-0w; Sun, 26 Nov 2023 14:52:09 +0000 Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id D1EB3DFB; Sun, 26 Nov 2023 15:51:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1701010285; bh=1AkiTfZtEKxDSCItwejoaW5n5WS50jpFJb2Dv/geccY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=O9nhbco4OxCuJotd3t0sdGcctrIDK4UfdRLymALld6dO6okXs0BFoOgobayIiK2VG y94Zh8aTHaFqAgwqbLtXSdR5ufjoigni6VmO/thHGegX6ZmU1l+g1ZLLH9KksGOkwW fSiJXG3bvztBv3TVxVaWc3I3f+3Nx8EMaF7AsRRc= Date: Sun, 26 Nov 2023 16:52:04 +0200 From: Laurent Pinchart To: Greg Kroah-Hartman Cc: Umang Jain , linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, Stefan Wahren , Dan Carpenter , Kieran Bingham , Phil Elwell , Dave Stevenson Subject: Re: [PATCH 6/9] staging: vc04_services: Drop vchiq_log_error() in favour of dev_dbg Message-ID: <20231126145204.GB12891@pendragon.ideasonboard.com> References: <20231107095156.365492-1-umang.jain@ideasonboard.com> <20231107095156.365492-7-umang.jain@ideasonboard.com> <2023112322-wife-aspect-135b@gregkh> <20231123134941.GD16377@pendragon.ideasonboard.com> <2023112338-scrambler-utilize-a31d@gregkh> <20231123172825.GJ16377@pendragon.ideasonboard.com> <2023112343-bobbed-throbbing-2c36@gregkh> <20231123180022.GA20170@pendragon.ideasonboard.com> <2023112643-algebra-exorcist-5e6c@gregkh> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <2023112643-algebra-exorcist-5e6c@gregkh> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231126_065207_490629_FBAFD704 X-CRM114-Status: GOOD ( 35.49 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, Nov 26, 2023 at 10:26:41AM +0000, Greg Kroah-Hartman wrote: > On Thu, Nov 23, 2023 at 08:00:22PM +0200, Laurent Pinchart wrote: > > On Thu, Nov 23, 2023 at 05:31:32PM +0000, Greg Kroah-Hartman wrote: > > > On Thu, Nov 23, 2023 at 07:28:25PM +0200, Laurent Pinchart wrote: > > > > On Thu, Nov 23, 2023 at 01:53:42PM +0000, Greg Kroah-Hartman wrote: > > > > > On Thu, Nov 23, 2023 at 03:49:41PM +0200, Laurent Pinchart wrote: > > > > > > On Thu, Nov 23, 2023 at 01:02:45PM +0000, Greg Kroah-Hartman wrote: > > > > > > > On Tue, Nov 07, 2023 at 04:51:53AM -0500, Umang Jain wrote: > > > > > > > > Drop vchiq_log_error() macro which wraps dev_dbg(). Introduce the usage > > > > > > > > of dev_dbg() directly. > > > > > > > > > > > > > > > > Add a new enum vchiq_log_type and log_type() helper to faciliate the > > > > > > > > type of logging in dev_dbg(). This will help to determine the type of > > > > > > > > logging("error", "warning", "debug", "trace") to dynamic debug. > > > > > > > > > > > > > > > > Signed-off-by: Umang Jain > > > > > > > > --- > > > > > > > > .../interface/vchiq_arm/vchiq_arm.c | 54 ++++---- > > > > > > > > .../interface/vchiq_arm/vchiq_connected.c | 6 +- > > > > > > > > .../interface/vchiq_arm/vchiq_core.c | 126 ++++++++++-------- > > > > > > > > .../interface/vchiq_arm/vchiq_core.h | 23 +++- > > > > > > > > .../interface/vchiq_arm/vchiq_dev.c | 47 ++++--- > > > > > > > > 5 files changed, 143 insertions(+), 113 deletions(-) > > > > > > > > > > > > > > > > diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c > > > > > > > > index 9fb3e240d9de..2cb2a6503058 100644 > > > > > > > > --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c > > > > > > > > +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c > > > > > > > > @@ -696,8 +696,8 @@ int vchiq_initialise(struct vchiq_instance **instance_out) > > > > > > > > > > > > > > > > instance = kzalloc(sizeof(*instance), GFP_KERNEL); > > > > > > > > if (!instance) { > > > > > > > > - vchiq_log_error(state->dev, VCHIQ_CORE, > > > > > > > > - "%s: error allocating vchiq instance\n", __func__); > > > > > > > > + dev_dbg(state->dev, "%s: %s: %s: error allocating vchiq instance\n", > > > > > > > > + log_cat(VCHIQ_CORE), log_type(ERROR), __func__); > > > > > > > > > > > > > > All dev_dbg() calls have __func__ in them automatically, you never need > > > > > > > to duplicate it again as that's redundant :( > > > > > > > > > > > > Oh ? I didn't know that, and can't find it in the code. I may be missing > > > > > > something though. Are you referring to the +f flag for dynamic debug > > > > > > entries ? It won't work if dynamic debug isn't enabled though, but maybe > > > > > > we don't care about that ? > > > > > > > > > > Yes, the "f" flag is what controls this, and if dynamic debug isn't > > > > > enabled, you don't get any message here and we don't care about it :) > > > > > > > > You do if you #define DEBUG, that's one of the three options for > > > > dev_dbg() (dynamic debug and no_printk() being the other two). Maybe > > > > __func__ should be added to the dev_printk() version of dev_dbg() to > > > > have a consistent behaviour. > > > > > > Drivers should NOT be defining DEBUG for anything in the tree, just use > > > the normal interfaces, as no one will be selecting debug options from > > > Kconfig. DEBUG is really only good for out-of-tree work. > > > > I didn't know that either. Of course '#define DEBUG' shouldn't be merged > > upstream, but I thought it was supported by the kernel to make that > > possible during development, as an alternative to dynamic debug. Does it > > mean we should drop '#define DEBUG' support from dev_dbg() eventually ? > > Probably, once all of the "define DEBUG" lines are dropped from the > kernel itself, which might take a while :) Would a patch that simply drops them be acceptable ? If not, what's missing to remove them ? -- Regards, Laurent Pinchart _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel