From nobody Tue Nov 26 02:00:16 2024 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B18A01AB6C7 for ; Wed, 23 Oct 2024 11:04:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729681498; cv=none; b=FTGXLHVSc6K2kvsZv3HJtxo6wImYFpmtGLlRkDg7TCMumzWqpaewqUYYgYmADCfl7EWbXANdlMkb0GEtgt9Ovs4SUTbVBqqYrWSr6dpu6kSkMGoiDV5XiRZwQ1FaCUsSQQZpcdAbXQi9w98vCovcuwzEGB6VbcIYA2AaNuBIvaE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729681498; c=relaxed/simple; bh=fvlat9AHEEDf8cSpGbz1hc5d3oS8Gf8tdHnvlCW1ce8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iz0xUwqGpplAOPh8MkMgucUiBY6Sc46v6mhgoFcgKB1tJ8Xy3fMmjGj8Q+LsvuL5H2D+zdJgb1MZkIp5Jl32iQ81gttkhhS9cqX9vTGN1hjRBMjyKdvMOokoogoIMcmHzu/uTfp9UY9xumXsRYGj5cXqHfce2GSrKci8WY8/Iuk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=qM2MTKsW; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="qM2MTKsW" Received: from umang.jain (unknown [IPv6:2405:201:2015:f873:55d7:c02e:b2eb:ee3f]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 076709FC; Wed, 23 Oct 2024 13:03:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1729681387; bh=fvlat9AHEEDf8cSpGbz1hc5d3oS8Gf8tdHnvlCW1ce8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qM2MTKsWBIq5UwKpFip16eKxS29ok1aao6A1BS4GeXxgZSiz9Wim9gpWqfsrkzQDb QGioOTRQbxHKQkIkEqDUbjQJ6n+skq1Wm2X61T379uXvFyjLar+6fUGGkB6XFcI9KT MN7ITKrXxZvSTlmS9LVTQgoDL+4FYKG8AmndkRZo= From: Umang Jain To: Greg Kroah-Hartman , Broadcom internal kernel review list Cc: linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, Dan Carpenter , Kieran Bingham , Laurent Pinchart , Stefan Wahren , kernel-list@raspberrypi.com, Umang Jain Subject: [PATCH 5/6] staging: vchiq_core: Pass vchiq_bulk pointer to make_service_callback() Date: Wed, 23 Oct 2024 16:34:05 +0530 Message-ID: <20241023110406.885199-6-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241023110406.885199-1-umang.jain@ideasonboard.com> References: <20241023110406.885199-1-umang.jain@ideasonboard.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Pass struct vchiq_bulk pointer to make_service_callback() instead of just passing the bulk->cb_data. This is a preparatory change when we need to pass the callback data user pointer (__user) in a subsequent commit. Signed-off-by: Umang Jain --- .../vc04_services/interface/vchiq_arm/vchiq_core.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 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 6095adaf0cf6..3c811b8f210c 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c @@ -455,10 +455,18 @@ mark_service_closing(struct vchiq_service *service) =20 static inline int make_service_callback(struct vchiq_service *service, enum vchiq_reason rea= son, - struct vchiq_header *header, void *cb_data) + struct vchiq_header *header, struct vchiq_bulk *bulk) { + void *cb_data =3D NULL; int status; =20 + /* + * If a bulk transfer is in progress, pass bulk->cb_data to the + * callback function. + */ + if (bulk) + cb_data =3D bulk->cb_data; + dev_dbg(service->state->dev, "core: %d: callback:%d (%s, %pK, %pK)\n", service->state->id, service->localport, reason_names[reason], header, cb_data); @@ -1339,8 +1347,7 @@ static int service_notify_bulk(struct vchiq_service *= service, } else if (bulk->mode =3D=3D VCHIQ_BULK_MODE_CALLBACK) { enum vchiq_reason reason =3D get_bulk_reason(bulk); =20 - return make_service_callback(service, reason, NULL, - bulk->cb_data); + return make_service_callback(service, reason, NULL, bulk); } =20 return 0; --=20 2.45.2