From patchwork Tue Oct 24 11:44:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 13434290 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 E1D39C25B48 for ; Tue, 24 Oct 2023 11:45:13 +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:References:In-Reply-To: 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: List-Owner; bh=0iAQ1Stl2CzPB7wa+N4rg8vp9dXr20wEHwrxr9ySP1A=; b=G6iw975zJ06Ban 0TKE6L+8LXm3fxY2yUotx5xUyczjmEZC28yUUNkXU7FMWu12Ogu9Sd+f2FtujhfJR/ywA6XtcFnMk kz/Kq/o1sJ86MNFgr4P4YeLqzefIzdpLeVSLUVA2y/DMDKQwUw6H5Xig5VewGfW8FILGAbg6kkFi/ 3xSx3IMdvrrJLaurRzyT1v81tQcdcJTrKWUgg/s3a3CuNxaauOmae+5JAAe9hyD7KxpH8o+2Zb6Co hFdjzSdyZMeIylf6FZsbRQazI2zUCw9w/8HwILyP7Vd65WfdgY2fncvQ3ht8seUEzKuleSZ3wv0xQ N43rdp+MvaLg6mBwOGog==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qvFq2-009fm1-0e; Tue, 24 Oct 2023 11:44:46 +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-1f; 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 076EFB53; Tue, 24 Oct 2023 13:44:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1698147867; bh=EEmI146MNO9Guz2M5JYX2IrVkVYp8pkDrymbdqfznxU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IZZVw/CPurN+QgdNImXsn7WDSe9/xfY/xaLd/FUm7MUJzQ8b3nocKztKWeNcBW/fe wGSHngqwFz9zhSsoSi1Mg07UC4E8zZf2gGoI0b/Cmyo+kEJMNtoDBtZDkACbo8Qg70 FQnSpyBrelpNhdcylOFKaUlB9CvY8DbxBDkOooOc= 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 1/8] staging: vc04_services: Pass struct device to vchiq_log_dump_mem() Date: Tue, 24 Oct 2023 07:44:21 -0400 Message-ID: <20231024114428.443528-2-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231024114428.443528-1-umang.jain@ideasonboard.com> References: <20231024114428.443528-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231024_044443_732874_76D338A1 X-CRM114-Status: UNSURE ( 9.31 ) 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 Pass struct device pointer to vchiq_log_dump_mem(). In subsequent commits, vchiq_log_* macros will be ported to use dynamic debug (dev_dbg()), hence they need access to a struct device pointer. No functional changes intended in this commit. Signed-off-by: Umang Jain --- .../vc04_services/interface/vchiq_arm/vchiq_core.c | 11 ++++++----- .../vc04_services/interface/vchiq_arm/vchiq_core.h | 3 ++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c index 596894338cb4..a12afac95dcd 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -1052,7 +1052,7 @@ queue_message(struct vchiq_state *state, struct vchiq_service *service, if (SRVTRACE_ENABLED(service, VCHIQ_LOG_INFO)) - vchiq_log_dump_mem("Sent", 0, + vchiq_log_dump_mem(state->dev, "Sent", 0, header->data, min_t(size_t, 16, callback_result)); @@ -1201,7 +1201,7 @@ queue_message_sync(struct vchiq_state *state, struct vchiq_service *service, if (service) { if (SRVTRACE_ENABLED(service, VCHIQ_LOG_INFO)) - vchiq_log_dump_mem("Sent", 0, + vchiq_log_dump_mem(state->dev, "Sent", 0, header->data, min_t(size_t, 16, callback_result)); @@ -1653,7 +1653,7 @@ parse_message(struct vchiq_state *state, struct vchiq_header *header) msg_type_str(type), type, VCHIQ_FOURCC_AS_4CHARS(svc_fourcc), remoteport, localport, size); if (size > 0) - vchiq_log_dump_mem("Rcvd", 0, header->data, min(16, size)); + vchiq_log_dump_mem(state->dev, "Rcvd", 0, header->data, min(16, size)); } if (((unsigned long)header & VCHIQ_SLOT_MASK) + @@ -2065,7 +2065,7 @@ sync_func(void *v) msg_type_str(type), VCHIQ_FOURCC_AS_4CHARS(svc_fourcc), remoteport, localport, size); if (size > 0) - vchiq_log_dump_mem("Rcvd", 0, header->data, min(16, size)); + vchiq_log_dump_mem(state->dev, "Rcvd", 0, header->data, min(16, size)); } switch (type) { @@ -3665,7 +3665,8 @@ int vchiq_send_remote_use_active(struct vchiq_state *state) NULL, NULL, 0, 0); } -void vchiq_log_dump_mem(const char *label, u32 addr, const void *void_mem, size_t num_bytes) +void vchiq_log_dump_mem(struct device *dev, const char *label, u32 addr, + const void *void_mem, size_t num_bytes) { const u8 *mem = void_mem; size_t offset; diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h index ec1a3caefaea..8b234cad24ea 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h @@ -600,7 +600,8 @@ void vchiq_platform_conn_state_changed(struct vchiq_state *state, void vchiq_set_conn_state(struct vchiq_state *state, enum vchiq_connstate newstate); -void vchiq_log_dump_mem(const char *label, u32 addr, const void *void_mem, size_t num_bytes); +void vchiq_log_dump_mem(struct device *dev, const char *label, u32 addr, + const void *void_mem, size_t num_bytes); int vchiq_remove_service(struct vchiq_instance *instance, unsigned int service);