From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CFE9CC433FE for ; Thu, 29 Sep 2022 16:59:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235839AbiI2Q7X (ORCPT ); Thu, 29 Sep 2022 12:59:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236043AbiI2Q7T (ORCPT ); Thu, 29 Sep 2022 12:59:19 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23DD91CFB81; Thu, 29 Sep 2022 09:59:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id CBF35B82576; Thu, 29 Sep 2022 16:59:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DCDC9C433C1; Thu, 29 Sep 2022 16:59:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664470752; bh=yBGZma+h0goCNzGQ3b6u10XnYurahn7ityyKftocg/k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KqtQN1dM354bqBa+U18wuRdBHHRwC13KtjP9RTmSpcgG+2WZ6uQMCLX957242HLgY bS70wuyICSSmQUXyBM+L7E8TbBxH9qbZJW5V5UlSiJgvF2XOHjf9KEz+cHZ/wM9Cbn s3JBc+Kdt4JJWQuejaH9h2XcP7d5pYzvPahdy5R4zjXCeSelaDrQprMIMhseaB6esu ex5O8FkXJFAUA6StUL8F8n6x3715UNbVvD5ijfBLcxWhV/OMsN0IeIFFHLIoftszYt VutPQ4ffc1wCKYNzbtBWr5stpv+GNQHZCKTM/Gs3a4NWjBvycClCafAdhgCDdgBy3l 3PipGTRuaKATA== Date: Thu, 29 Sep 2022 11:59:08 -0500 From: Bjorn Andersson To: Elliot Berman Cc: Bjorn Andersson , Jassi Brar , Murali Nalajala , Trilok Soni , Srivatsa Vaddagiri , Carl van Schaik , Andy Gross , Dmitry Baryshkov , linux-arm-kernel@lists.infradead.org, Mark Rutland , Lorenzo Pieralisi , Sudeep Holla , Marc Zyngier , Rob Herring , Krzysztof Kozlowski , Jonathan Corbet , Will Deacon , Catalin Marinas , Arnd Bergmann , Greg Kroah-Hartman , devicetree@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 09/14] mailbox: Add Gunyah message queue mailbox Message-ID: <20220929165908.zgmlujhp42ihine5@builder.lan> References: <20220928195633.2348848-1-quic_eberman@quicinc.com> <20220928195633.2348848-10-quic_eberman@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220928195633.2348848-10-quic_eberman@quicinc.com> Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Wed, Sep 28, 2022 at 12:56:28PM -0700, Elliot Berman wrote: [..] > diff --git a/drivers/mailbox/gunyah-msgq.c b/drivers/mailbox/gunyah-msgq.c [..] > +static int gh_msgq_send_data(struct mbox_chan *chan, void *data) > +{ > + struct gunyah_msgq *msgq = mbox_chan_to_msgq(chan); > + struct gunyah_msgq_tx_data *msgq_data = data; The mailbox framework abstracts hardware mailboxes and @data should be the data to be written to the hardware. Using the void * to pass composite data types means that the client and provider are tightly coupled and as such the mailbox framework does not provide you any abstraction. You also only expose a single channel, so a direct function call between the two specific drivers would be a better fit. Regards, Bjorn