From patchwork Wed Oct 25 06:07:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 13435482 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 A8E0BC0032E for ; Wed, 25 Oct 2023 06:08:06 +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=VHZao9hhbvhIwZMcJdFzhfhw6GcfX6H4XMPtf0wSnbg=; b=ZZjQREWz022os6 XF6UDIxHDt5/+Mvk/BxH/Ggnnaes0Y1iX6f02yWXWzrJYFRV1MPeDT8Bnj7mP/BbmWpNMQ3nAAALl 0Zg0h7zaIQ7kRxuTszWmKBwJvoe4u2zh6eJWGN4ORHD3kpP6eO+OfSmCqe4Wmmayq5CIVHbF2u5Jw 9ro8PhyArSiPbjAgq62YXl8DN4+htw8g8o/8opp8MgZlEGYb8F58/xntu9BSmHLn9bHPCQLqDWOI+ pjAN6pbWX+WmGG3sSbswtD40rBIvaTOcw4bV+c85b7wFojeCgbmbDBc0eIQM3k/evzTXmj+spaa2M KF9hp9sHCBKCpzFkibiw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qvX3E-00BSlW-1U; Wed, 25 Oct 2023 06:07:32 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qvX3B-00BSkk-1r; Wed, 25 Oct 2023 06:07:30 +0000 Received: from umang.jain (unknown [103.251.226.9]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5BCBA669; Wed, 25 Oct 2023 08:07:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1698214032; bh=6N7Z7hgd1/Qg61kV5UAnFtn2rr4bYNmxCxexbxy7XdM=; h=From:To:Cc:Subject:Date:From; b=cwMIhnm84IHVNFWeqWKz+cu8OGXMCEeq0sDy8OBzZulgqtVJyt74a9tkB0S3vzTzM 9vD7PS1A2BhigtH5HUPKSEVRr+ijlFif8hS9y0p/VCL8pJfC6lmY7vvpGNcC3e/eWg fZtWOLB+S/rnydDeIvNaD2qV9J5c6xc6aHPwyztY= 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 , "Ricardo B . Marliere" , Sakari Ailus , Umang Jain Subject: [PATCH 0/1] staging: vc04_services: Use %p4cc to print fourcc Date: Wed, 25 Oct 2023 02:07:16 -0400 Message-ID: <20231025060717.71895-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_230729_784162_75092F8F X-CRM114-Status: UNSURE ( 6.66 ) 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 The following patch drop VCHIQ_FOURCC_AS_4CHARS macro in favour of %p4cc format modifier to print FourCC codes in the logs. *Before this patch* `mailbox: vchiq_core_msg debug: Sent Msg DATA(5) to AUDS s:1 d:62 len:20` *After this patch* bcm2835_vchiq 3f00b840.mailbox: vchiq_core_msg debug: Sent Msg DATA(5) to SDUA little-endian (0x41554453) s:1 d:62 len:20 The inversion of AUDS to SDUA as per usage of %p4cc Does it hamper readability ? Feedback is appreciated. As documented in the commit message, the 'entity' char array length is increased to hold more characters for the log output. Not doing so, causes kernel stack corruption at runtime. Based on top of: - [PATCH v2 0/8] staging: vc04: Drop custom logging based on printk Umang Jain (1): staging: vc04_services: Use %p4cc format modifier to print FourCC codes .../interface/vchiq_arm/vchiq_arm.c | 20 +++++----- .../interface/vchiq_arm/vchiq_core.c | 40 +++++++++---------- .../interface/vchiq_arm/vchiq_core.h | 6 --- .../interface/vchiq_arm/vchiq_dev.c | 7 ++-- 4 files changed, 33 insertions(+), 40 deletions(-)