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: 96235 Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from ) id 1qvX3E-006kJ7-Hz; Wed, 25 Oct 2023 06:07:32 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231254AbjJYGHb (ORCPT + 1 other); Wed, 25 Oct 2023 02:07:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229583AbjJYGHa (ORCPT ); Wed, 25 Oct 2023 02:07:30 -0400 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 4E3699D for ; Tue, 24 Oct 2023 23:07:27 -0700 (PDT) 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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, 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-media@vger.kernel.org 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=ham autolearn_force=no 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(-)