Message ID | 20231128201926.489269-1-umang.jain@ideasonboard.com (mailing list archive) |
---|---|
Headers |
Received: from sv.mirrors.kernel.org ([139.178.88.99]) by www.linuxtv.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <linux-media+bounces-1291-patchwork=linuxtv.org@vger.kernel.org>) id 1r84Ya-003rRc-F0 for patchwork@linuxtv.org; Tue, 28 Nov 2023 20:19:45 +0000 Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4078B282D89 for <patchwork@linuxtv.org>; Tue, 28 Nov 2023 20:19:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 69F2C40C16; Tue, 28 Nov 2023 20:19:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="sgneeDHb" X-Original-To: linux-media@vger.kernel.org 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 4251612C for <linux-media@vger.kernel.org>; Tue, 28 Nov 2023 12:19:35 -0800 (PST) Received: from umang.jain (unknown [103.238.109.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id A1A16BEB; Tue, 28 Nov 2023 21:18:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1701202738; bh=BYZnM8Xk87PhsS1AGfDd/LqFrgG9aXvrXv8so0BrbZo=; h=From:To:Cc:Subject:Date:From; b=sgneeDHbIQ2civmHWobsP+4TS7bjIePcEmPPjyH8m5Ebf5oghyomE2Qz0gzw4KdkV 1LJtKZKthA8UHOz612xAcoCofVhnOKoWv4Sho7n4ESDdI6meCnMaJAb4F50ITCYNMc yAtY7IZ/WEsktCXkwxRE5UxZJo3ahJbMmh77/PFg= From: Umang Jain <umang.jain@ideasonboard.com> To: linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Cc: Stefan Wahren <stefan.wahren@i2se.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Dan Carpenter <error27@gmail.com>, Kieran Bingham <kieran.bingham@ideasonboard.com>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Dave Stevenson <dave.stevenson@raspberrypi.com>, "Ricardo B . Marliere" <ricardo@marliere.net>, Umang Jain <umang.jain@ideasonboard.com> Subject: [PATCH v2 0/5] staging: vc04_services: Drop custom logging Date: Wed, 29 Nov 2023 01:49:21 +0530 Message-ID: <20231128201926.489269-1-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.41.0 Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: <linux-media.vger.kernel.org> List-Subscribe: <mailto:linux-media+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-media+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-LSpam-Score: -4.8 (----) X-LSpam-Report: No, score=-4.8 required=5.0 tests=BAYES_00=-1.9,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3 autolearn=unavailable autolearn_force=no |
Series |
staging: vc04_services: Drop custom logging
|
|
Message
Umang Jain
Nov. 28, 2023, 8:19 p.m. UTC
This series also removes the vchiq_log_* macro and makes use of dev_dbg() directly. Patch 1/5 is fix. It prevents passing NULL to one of vchiq_log_error(). The function there in question, does not have any users as of now. However, it is going to be used by the vc-sm-cma and bcm2835-isp drivers (posted on list for review [1]). There was discussion on v1, whether I should drop and add the function later, however, didn't conclude. Patch 2/5 removes vchiq_log_error() macro Patch 3/5 removes vchiq_log_warning() macro Patch 4/5 removes vchiq_log_trace() macro Patch 5/5 removes vchiq_log_debug() macro This completes the following TODO item: ``` * Cleanup logging mechanism The driver should probably be using the standard kernel logging mechanisms such as dev_info, dev_dbg, and friends. ``` [1]: https://lore.kernel.org/linux-media/20231109210309.638594-1-umang.jain@ideasonboard.com/ Changes in v2: - Separate out one fixup patch from v1 (Patch 1/9)and send separately - Drop usage of log_type() and log_category() helpers. Directly use dev_dbg() as suggested by Greg KH. - Drop __func__ annotation from all logs. Dynamic debug has 'f' decorator flag which can be used instead of manual __func__ - Reword commit messages. Umang Jain (5): staging: vc04_services: Do not pass NULL to vchiq_log_error() staging: vc04_services: Drop vchiq_log_error() in favour of dev_dbg staging: vc04_services: Drop vchiq_log_warning() in favour of dev_dbg staging: vc04_services: Drop vchiq_log_trace() in favour of dev_dbg staging: vc04_services: Drop vchiq_log_debug() in favour of dev_dbg drivers/staging/vc04_services/interface/TODO | 5 - .../interface/vchiq_arm/vchiq_arm.c | 176 ++++---- .../interface/vchiq_arm/vchiq_connected.c | 8 +- .../interface/vchiq_arm/vchiq_connected.h | 4 +- .../interface/vchiq_arm/vchiq_core.c | 402 +++++++++--------- .../interface/vchiq_arm/vchiq_core.h | 38 -- .../interface/vchiq_arm/vchiq_dev.c | 92 ++-- 7 files changed, 315 insertions(+), 410 deletions(-)
Comments
Hi Umang, Am 28.11.23 um 21:19 schrieb Umang Jain: > This series also removes the vchiq_log_* macro and makes use of dev_dbg() > directly. sorry, i didn't had the time to follow the logging discussion, but the following commits: staging: vc04: Convert vchiq_log_error() to use dynamic debug staging: vc04: Convert vchiq_log_warning() to use dynamic debug staging: vc04: Convert(and rename) vchiq_log_info() to use dynamic debug changed the logging behavior. I don't think it's intended to move everything to dev_dbg. I would expected the following mapping: vchiq_log_error -> dev_err vchiq_log_warning -> dev_warn vchiq_log_info -> dev_info > > Patch 1/5 is fix. It prevents passing NULL to one of vchiq_log_error(). > The function there in question, does not have any users as of > now. However, it is going to be used by the vc-sm-cma and bcm2835-isp > drivers (posted on list for review [1]). There was discussion on v1, > whether I should drop and add the function later, however, didn't > conclude. > > Patch 2/5 removes vchiq_log_error() macro > Patch 3/5 removes vchiq_log_warning() macro > Patch 4/5 removes vchiq_log_trace() macro > Patch 5/5 removes vchiq_log_debug() macro > > This completes the following TODO item: > > ``` > * Cleanup logging mechanism > > The driver should probably be using the standard kernel logging mechanisms > such as dev_info, dev_dbg, and friends. > ``` > > [1]: https://lore.kernel.org/linux-media/20231109210309.638594-1-umang.jain@ideasonboard.com/ > > Changes in v2: > - Separate out one fixup patch from v1 (Patch 1/9)and send separately > - Drop usage of log_type() and log_category() helpers. Directly use > dev_dbg() as suggested by Greg KH. > - Drop __func__ annotation from all logs. Dynamic debug has 'f' > decorator flag which can be used instead of manual __func__ > - Reword commit messages. > > Umang Jain (5): > staging: vc04_services: Do not pass NULL to vchiq_log_error() > staging: vc04_services: Drop vchiq_log_error() in favour of dev_dbg > staging: vc04_services: Drop vchiq_log_warning() in favour of dev_dbg > staging: vc04_services: Drop vchiq_log_trace() in favour of dev_dbg > staging: vc04_services: Drop vchiq_log_debug() in favour of dev_dbg > > drivers/staging/vc04_services/interface/TODO | 5 - > .../interface/vchiq_arm/vchiq_arm.c | 176 ++++---- > .../interface/vchiq_arm/vchiq_connected.c | 8 +- > .../interface/vchiq_arm/vchiq_connected.h | 4 +- > .../interface/vchiq_arm/vchiq_core.c | 402 +++++++++--------- > .../interface/vchiq_arm/vchiq_core.h | 38 -- > .../interface/vchiq_arm/vchiq_dev.c | 92 ++-- > 7 files changed, 315 insertions(+), 410 deletions(-) >
Hi Stefan, On 11/29/23 4:56 AM, Stefan Wahren wrote: > Hi Umang, > > Am 28.11.23 um 21:19 schrieb Umang Jain: >> This series also removes the vchiq_log_* macro and makes use of >> dev_dbg() >> directly. > sorry, i didn't had the time to follow the logging discussion, but the > following commits: > > staging: vc04: Convert vchiq_log_error() to use dynamic debug > staging: vc04: Convert vchiq_log_warning() to use dynamic debug > staging: vc04: Convert(and rename) vchiq_log_info() to use dynamic debug > > changed the logging behavior. I don't think it's intended to move > everything to dev_dbg. > > I would expected the following mapping: > vchiq_log_error -> dev_err > vchiq_log_warning -> dev_warn For this I agree, > vchiq_log_info -> dev_info However, I think vchiq_log_info and vchiq_log_debug should be moved to dev_dbg. Otherwise, I think they'll spew a ton of information to dmesg by default. >> >> Patch 1/5 is fix. It prevents passing NULL to one of vchiq_log_error(). >> The function there in question, does not have any users as of >> now. However, it is going to be used by the vc-sm-cma and bcm2835-isp >> drivers (posted on list for review [1]). There was discussion on v1, >> whether I should drop and add the function later, however, didn't >> conclude. >> >> Patch 2/5 removes vchiq_log_error() macro >> Patch 3/5 removes vchiq_log_warning() macro >> Patch 4/5 removes vchiq_log_trace() macro >> Patch 5/5 removes vchiq_log_debug() macro >> >> This completes the following TODO item: >> >> ``` >> * Cleanup logging mechanism >> >> The driver should probably be using the standard kernel logging >> mechanisms >> such as dev_info, dev_dbg, and friends. >> ``` >> >> [1]: >> https://lore.kernel.org/linux-media/20231109210309.638594-1-umang.jain@ideasonboard.com/ >> >> Changes in v2: >> - Separate out one fixup patch from v1 (Patch 1/9)and send separately >> - Drop usage of log_type() and log_category() helpers. Directly use >> dev_dbg() as suggested by Greg KH. >> - Drop __func__ annotation from all logs. Dynamic debug has 'f' >> decorator flag which can be used instead of manual __func__ >> - Reword commit messages. >> >> Umang Jain (5): >> staging: vc04_services: Do not pass NULL to vchiq_log_error() >> staging: vc04_services: Drop vchiq_log_error() in favour of dev_dbg >> staging: vc04_services: Drop vchiq_log_warning() in favour of dev_dbg >> staging: vc04_services: Drop vchiq_log_trace() in favour of dev_dbg >> staging: vc04_services: Drop vchiq_log_debug() in favour of dev_dbg >> >> drivers/staging/vc04_services/interface/TODO | 5 - >> .../interface/vchiq_arm/vchiq_arm.c | 176 ++++---- >> .../interface/vchiq_arm/vchiq_connected.c | 8 +- >> .../interface/vchiq_arm/vchiq_connected.h | 4 +- >> .../interface/vchiq_arm/vchiq_core.c | 402 +++++++++--------- >> .../interface/vchiq_arm/vchiq_core.h | 38 -- >> .../interface/vchiq_arm/vchiq_dev.c | 92 ++-- >> 7 files changed, 315 insertions(+), 410 deletions(-) >> >
Hi Umang, Am 05.12.23 um 07:39 schrieb Umang Jain: > Hi Stefan, > > On 11/29/23 4:56 AM, Stefan Wahren wrote: >> Hi Umang, >> >> Am 28.11.23 um 21:19 schrieb Umang Jain: >>> This series also removes the vchiq_log_* macro and makes use of >>> dev_dbg() >>> directly. >> sorry, i didn't had the time to follow the logging discussion, but the >> following commits: >> >> staging: vc04: Convert vchiq_log_error() to use dynamic debug >> staging: vc04: Convert vchiq_log_warning() to use dynamic debug >> staging: vc04: Convert(and rename) vchiq_log_info() to use dynamic debug >> >> changed the logging behavior. I don't think it's intended to move >> everything to dev_dbg. >> >> I would expected the following mapping: >> vchiq_log_error -> dev_err >> vchiq_log_warning -> dev_warn > > For this I agree, >> vchiq_log_info -> dev_info > > However, I think vchiq_log_info and vchiq_log_debug should be moved to > dev_dbg. > > Otherwise, I think they'll spew a ton of information to dmesg by default. generally i agree. Unfortunately we need to double check every log message, because some of them are unnecessary. >>> >>> Patch 1/5 is fix. It prevents passing NULL to one of vchiq_log_error(). >>> The function there in question, does not have any users as of >>> now. However, it is going to be used by the vc-sm-cma and bcm2835-isp >>> drivers (posted on list for review [1]). There was discussion on v1, >>> whether I should drop and add the function later, however, didn't >>> conclude. >>> >>> Patch 2/5 removes vchiq_log_error() macro >>> Patch 3/5 removes vchiq_log_warning() macro >>> Patch 4/5 removes vchiq_log_trace() macro >>> Patch 5/5 removes vchiq_log_debug() macro >>> >>> This completes the following TODO item: >>> >>> ``` >>> * Cleanup logging mechanism >>> >>> The driver should probably be using the standard kernel logging >>> mechanisms >>> such as dev_info, dev_dbg, and friends. >>> ``` >>> >>> [1]: >>> https://lore.kernel.org/linux-media/20231109210309.638594-1-umang.jain@ideasonboard.com/ >>> >>> Changes in v2: >>> - Separate out one fixup patch from v1 (Patch 1/9)and send separately >>> - Drop usage of log_type() and log_category() helpers. Directly use >>> dev_dbg() as suggested by Greg KH. >>> - Drop __func__ annotation from all logs. Dynamic debug has 'f' >>> decorator flag which can be used instead of manual __func__ >>> - Reword commit messages. >>> >>> Umang Jain (5): >>> staging: vc04_services: Do not pass NULL to vchiq_log_error() >>> staging: vc04_services: Drop vchiq_log_error() in favour of dev_dbg >>> staging: vc04_services: Drop vchiq_log_warning() in favour of >>> dev_dbg >>> staging: vc04_services: Drop vchiq_log_trace() in favour of dev_dbg >>> staging: vc04_services: Drop vchiq_log_debug() in favour of dev_dbg >>> >>> drivers/staging/vc04_services/interface/TODO | 5 - >>> .../interface/vchiq_arm/vchiq_arm.c | 176 ++++---- >>> .../interface/vchiq_arm/vchiq_connected.c | 8 +- >>> .../interface/vchiq_arm/vchiq_connected.h | 4 +- >>> .../interface/vchiq_arm/vchiq_core.c | 402 >>> +++++++++--------- >>> .../interface/vchiq_arm/vchiq_core.h | 38 -- >>> .../interface/vchiq_arm/vchiq_dev.c | 92 ++-- >>> 7 files changed, 315 insertions(+), 410 deletions(-) >>> >> > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel