Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp1935647rwb; Thu, 19 Jan 2023 18:06:14 -0800 (PST) X-Google-Smtp-Source: AMrXdXsisrrGRHWnul2XsdjqpsDJW52ml7cs570tIoO+wCW/KnCVtlL+1POGiTuDe4/FLpOqzknX X-Received: by 2002:a17:906:60d0:b0:877:612e:516e with SMTP id f16-20020a17090660d000b00877612e516emr24364137ejk.61.1674180363556; Thu, 19 Jan 2023 18:06:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674180363; cv=none; d=google.com; s=arc-20160816; b=DVAWxSgYlvRfgTyPXpIfpPGYHhAK6bTv4o8Z62cBzvsqNwzyITjdPBRUUQLUOneRHl U4DjQwQlSfSf+ABsB3Y6BtXDTFXcSJtLCInNisw7s0PTUVpvFlCl0kZhEIqz7Omo+1+g gD6UeYP5wpvHF3vS9frv/58YwTVsvEKDAoaVge8z5nx6uDExLUv0IgPx5JG5+bo0AkTv T52c3jbbP6BkI3y/UH/j6e4+bbSOpz2xd5qiumUEVOsiSiesz67F5PbUo2v7Q9Yf/lEE 3A5AIIkNiOoxxPd0ZO7Fug4w+zKA/EkWeiq6NW3V0MS6f/uB+zAZ2bY9+x6RTqPUwYAH 41UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=YYNSEIGBf+z4PIYZXljng1lr2GN5f4C7ow2AeMLDco0=; b=IcO3CiAE/a+ILqagZ1C3+/AuRvaWbY7HWTX4HPm0ho1VopkIxBKsBbXnkLLaWIT9hJ 3U4PcZcgc6WWTZIDrXyUkPqxI0Gj84gVy+mYn/8n0BF3nsQziy/acOhq770dhxSisQfO R3M611I5YlTfInh5dGr3hxrY/Sn933iPwubKKRPJ5+i1qlbNCPTUEP6IrdhREpe2xFhq j615mNi76z7VSlbIn0vB/kGseXLnhEpVm7YqwyZUUereNn3BbnTxbVgFC1FYruAyUZMZ dSiAeWkEA/gGjRT698YvMF54GhXZgpevvVZjSyrVj4hgjhIDb7zpCYzBT88t+1QYLFIK aOQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=dF+3LpDx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r10-20020a05640251ca00b00484ae4dfc25si28151196edd.62.2023.01.19.18.05.51; Thu, 19 Jan 2023 18:06:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=dF+3LpDx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229850AbjATBA6 (ORCPT + 46 others); Thu, 19 Jan 2023 20:00:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229816AbjATBAy (ORCPT ); Thu, 19 Jan 2023 20:00:54 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E6A7A1028; Thu, 19 Jan 2023 17:00:53 -0800 (PST) Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 09667514; Fri, 20 Jan 2023 02:00:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1674176451; bh=tUHR1lm0/GiTPaTojG05os0odntRdSE/TwVOXS1mhn4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dF+3LpDxK/DyIVL3yWXfMQDpoa2AGbvzYy3oWKEbDRjx+Y2RXq5r9DCxSIu+68QTh 2Vlseywog6UJIKMSkZlADSlYg8pEQu0HIHMV4tKpdmN/ETM1zlH1oKzD63h5pTYBqF VZOt9sWYmFMWVtyLwPO9h24f+2zUmQThHtR12qz0= Date: Fri, 20 Jan 2023 03:00:48 +0200 From: Laurent Pinchart To: Dan Carpenter Cc: Phil Elwell , Greg Kroah-Hartman , Stefan Wahren , Umang Jain , linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, Florian Fainelli , Adrien Thierry , Dave Stevenson , Kieran Bingham , linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 0/4] Drop custom logging Message-ID: References: <20230118115810.21979-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 20, 2023 at 02:53:17AM +0200, Laurent Pinchart wrote: > On Thu, Jan 19, 2023 at 05:37:48PM +0300, Dan Carpenter wrote: > > On Thu, Jan 19, 2023 at 02:31:50PM +0000, Phil Elwell wrote: > > > On Thu, 19 Jan 2023 at 14:25, Dan Carpenter wrote: > > > > On Thu, Jan 19, 2023 at 01:47:44PM +0000, Phil Elwell wrote: > > > > > > > I understand the desire to remove the custom logging. I don't welcome > > > > > > > the loss of flexibility that comes with such a strategy > > > > > > > > > > > > What "loss of flexibility"? You now have access to the full dynamic > > > > > > debugging facilities that all of the rest of the kernel has. What is > > > > > > lacking? > > > > > > > > > > Perhaps I've missed something, either in this patch set or the kernel > > > > > as a whole, but how is one supposed to set different logging levels on > > > > > different facilities within a driver/module, or even for the module as > > > > > a whole? > > > > > > > > Yeah. You will be still able to do that and more besides after the > > > > transition. Cleaning this up makes the code better in every way. > > > > > > > > Documentation/admin-guide/dynamic-debug-howto.rst > > > > > > Are you saying this patch set gets us to that point? > > > > Yes. The patch has some issues, but yes. > > I think I'm missing something too then. Dynamic debug provides the > ability to easily switch dev_dbg() messages on and off at runtime, but > it doesn't provide, as far as I'm aware, log levels or log categories. > > Log levels are currently used by the vchiq code to suppress messages > below a certain level. Kernel log levels are not an exact replacement, > as the messages still end up in the kernel log (except for debug > messages). > > Log categories are used to group messages in categories and control > their log level per category. As far as I know, dynamic debug doesn't > provide any such feature. After a bit more research (which I should have done before replying, sorry), it looks like dynamic debug has support for classes, which are used by, for instance, the DRM logging infrastructure (see include/drm/drm_print.h). I don't see that being wired up to dev_*() print macros though, am I missing something, or would vchiq need to keep using custom logging macros (with dynamic debug used as a backend, replacing the current custom implementation) to make use of this feature ? -- Regards, Laurent Pinchart