From patchwork Tue Oct 24 11:44:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 13434291 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 D3A79C07545 for ; Tue, 24 Oct 2023 11:45:30 +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=bdhitkN47C8OCrahbzoOtMTD3udUFr4YjFkWKS3LviE=; b=hglddZ+khyPJ1g GOrzGSn4iWY+dvLa2yWNbxaY3FV3cSbp6wKYrgF72M0GSNQBnU+YwNIzY/VbamEY7UX4raLDBQUfa oglKBN4OANT7mvh9m8g4t8Fmn21rB5Vnsc08vYyDHNJzZOSK6Xy8/KybdxtGFwOhlbGrlQlFnlaXI 3u1vj0dY8uP2a9Hy6olFXEah9YBF0B/pEvrNhnnGSoyb08XNSDzo5+6E/EtAUuaDGW4EkqJ1BBeDe yb012GJpjOUrwPxiB7YmN3OvaJMwbGjP6lRaHCKiPwS1AicHn4Jxk0LVy8qhb9hJcPCLHP+/2mfjH GkVh02sQxAy3CIkW0tDA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qvFqI-009ftn-0P; Tue, 24 Oct 2023 11:45:02 +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-009fk8-2o; Tue, 24 Oct 2023 11:44:47 +0000 Received: from umang.jain (unknown [103.86.18.159]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 6FC45C67; Tue, 24 Oct 2023 13:44:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1698147869; bh=UDw7HdIOhh9PBndXp+jZ/iO/eXfz1vImrJOM86kYLko=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QxQwlaYk+Z/Nj+yRKihIf3non9OJw6BwE1Ys6Xi7+MST5c28myaRInetjZjntOp5f dTZF5PZkrQzTVlZN/9ido9hQkv8b3/h50ZiIPeDT7XHwcgjal88HX8i9/xYBHeRzPU n66kgLDUfMm3MRYKZh7p+ww3NTVVjnF18MTRjFCs= 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 2/8] staging: vc04_services: Pass struct device to vchiq_init_slots() Date: Tue, 24 Oct 2023 07:44:22 -0400 Message-ID: <20231024114428.443528-3-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_044444_064771_60158F1D X-CRM114-Status: UNSURE ( 9.90 ) 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_init_slots(). 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 --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 2 +- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c | 2 +- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index eef9c8c06e66..8d15ac4e1700 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -506,7 +506,7 @@ static int vchiq_platform_init(struct platform_device *pdev, struct vchiq_state WARN_ON(((unsigned long)slot_mem & (PAGE_SIZE - 1)) != 0); - vchiq_slot_zero = vchiq_init_slots(slot_mem, slot_mem_size); + vchiq_slot_zero = vchiq_init_slots(dev, slot_mem, slot_mem_size); if (!vchiq_slot_zero) return -ENOMEM; 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 a12afac95dcd..fb9af0127c49 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -2122,7 +2122,7 @@ get_conn_state_name(enum vchiq_connstate conn_state) } struct vchiq_slot_zero * -vchiq_init_slots(void *mem_base, int mem_size) +vchiq_init_slots(struct device *dev, void *mem_base, int mem_size) { int mem_align = (int)((VCHIQ_SLOT_SIZE - (long)mem_base) & VCHIQ_SLOT_MASK); 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 8b234cad24ea..ddab99017395 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h @@ -471,7 +471,7 @@ extern const char * get_conn_state_name(enum vchiq_connstate conn_state); extern struct vchiq_slot_zero * -vchiq_init_slots(void *mem_base, int mem_size); +vchiq_init_slots(struct device *dev, void *mem_base, int mem_size); extern int vchiq_init_state(struct vchiq_state *state, struct vchiq_slot_zero *slot_zero, struct device *dev);