From patchwork Tue Oct 24 11:44:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 13434289 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 D4B7DC00A8F for ; Tue, 24 Oct 2023 11:45:11 +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:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=vw43Z96doUmnWG4Qu9LCDMlFb0E+73ZMd3uL7VfloM4=; b=WZS4w/kAfFKZBQ N4ILtObalaq2z/o9q6NOLBq5fXXrEhrtkgbrbWyGhr42Bs9GNw6wEVKnZmNAO6kDp1cFwoxTpHN94 9VDkEsx1aTEYZWp+qEw7gDGLCEWGDyJyiWZ+lRUuhGXyH4JI5XAOczU0Bf8gz+bLqpBQdvpkrhA48 eeRSKYY7su5S0mwNLWX7GvSDK+UjgHjColBMGQo75erzddJcjroPzdOEXLAzvQ1rR3nuwnG6kumpq /4qGBQDXPgTzmjIScL6bz/EmxVEeLD38GRIeaiz4854hD62yepfKNrYZDI9gaehzd8OSpoTMD3FZp 4fQJabQEENpRQtH4uZ7w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qvFq3-009fmd-0h; Tue, 24 Oct 2023 11:44:47 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qvFpz-009fiZ-1q; Tue, 24 Oct 2023 11:44:45 +0000 Received: from umang.jain (unknown [103.86.18.159]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8DCE89CC; Tue, 24 Oct 2023 13:44:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1698147864; bh=d/TBDkN7fp48rTk5REeNd656c8xRSfl6ruoVymyN7vk=; h=From:To:Cc:Subject:Date:From; b=IUDSbSJCJenITLZRrB+mJCAAoF4xnz5oKaRiL3njAI1TOHQXrnecL6NkEZZtFA4ap eWbDxLSnW2vkUObfFLyXdPM7v6LEVkEI2uTh/Bk4KHzarc/EnHMNyOfOgfNymeiA/U IIaTwTCM53t3obNp6nf0ERDFNg66+TKg0MAdwqx0= From: Umang Jain To: linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Stefan Wahren , Greg Kroah-Hartman , Dan Carpenter , Kieran Bingham , Laurent Pinchart , Phil Elwell , Umang Jain Subject: [PATCH v2 0/8] staging: vc04: Drop custom logging based on printk Date: Tue, 24 Oct 2023 07:44:20 -0400 Message-ID: <20231024114428.443528-1-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231024_044443_789435_62901C79 X-CRM114-Status: UNSURE ( 7.18 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello, This series address the discussion on [1], i.e. removing the printk based logging mechanism and migrate it use dynamic debug. Patch 1/8 and 2/8 are prep-up patch to pass struct device pointers so that we can use dev_dbg() in those functions. Patch 3/8 targets migration of vchiq_log_error() to use dynamic debug Patch 4/8 targets migration of vchiq_log_warning() to use dynamic debug Patch 5/8 targets rename of vchiq_log_info() to vchiq_log_debug() and migration to use dynamic debug. Patch 6/8 targets mirgration of vchiq_log_trace to use dynamic debug. Patch 7/8 drops a unused macro. Patch 8/8 is log levels remnants cleanup along with debugfs entries. Changes in v2: - Address feedback from v1, added 1/8, 2/8 as new patches Hence, Remove pr_*() based logging in few cases - Cleanup debugfs log entries (8/8) and update TODO list - Fixed bugs where NULL deference was happening due to unitialised pointers. Testing: Booted RPi 3-b with: `dyndbg="file *vchiq_arm* +p" dyndbg="file *vchiq_core* +p"` on cmdline.txt (kernel args) And run drivers/staging/vc04_services/interface/TESTING and verify dynamic debug logs with `dmesg -WH`. [1] https://lore.kernel.org/linux-media/20230913185528.770634-1-umang.jain@ideasonboard.com/ Umang Jain (8): staging: vc04_services: Pass struct device to vchiq_log_dump_mem() staging: vc04_services: Pass struct device to vchiq_init_slots() 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 staging: vc04: Convert vchiq_log_trace() to use dynamic debug staging: vc04_services: Drop VCHIQ_LOG_PREFIX macro staging: vc04_services: Drop log level mechanisms drivers/staging/vc04_services/interface/TODO | 5 - .../interface/vchiq_arm/vchiq_arm.c | 149 ++++--- .../interface/vchiq_arm/vchiq_arm.h | 3 - .../interface/vchiq_arm/vchiq_connected.c | 2 +- .../interface/vchiq_arm/vchiq_core.c | 403 ++++++++---------- .../interface/vchiq_arm/vchiq_core.h | 61 +-- .../interface/vchiq_arm/vchiq_debugfs.c | 103 ----- .../interface/vchiq_arm/vchiq_dev.c | 59 +-- 8 files changed, 327 insertions(+), 458 deletions(-)