Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1629604pxb; Thu, 4 Mar 2021 16:56:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJwyqRmbF6c3b+YvN+aSA8FdzMqCt+FNfsLrkp07oH9EzMfF4EXtg68q8kiSs8n+xGlYWdDW X-Received: by 2002:a05:6638:635:: with SMTP id h21mr6779168jar.97.1614905799883; Thu, 04 Mar 2021 16:56:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614905799; cv=none; d=google.com; s=arc-20160816; b=nnvTCe9irvdnl/HPplgpyOXz2K5c7oNkU4EmGMPM9bhjjfWA9+KVXH0pJx+VJdFla2 qHZULlsioLa1l6j/kPhPEYTrJwSG2cSXu1ZH3fUC6sLtBP8sMt8cnXeiKzq8Y0YPyK/f upwPXu0TQsct3MKskkVWazN064VzjOK4BYiuMBem+LcRx6l0fRDu4sSPzXNLUhGrLU4G VawGxYFztnEJq1/eQAKvyQzRAbXfTdeg/4LVbcuB26LU5G1Ej0wU3h66MjR+WxRzM8uq ndKiUXb+xs+PI1fCcAHz7ZzUMYCBPUfXNMDDWizF7UJRg+hQifpFNt9eAPSEpyHC6WHr aNbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=V8gX6BLRp5VTtpTwGxCWHd1uYqGAa6Y56JCNNo50CEo=; b=1Hi6lXIV9zHu+fmAOunG4ZrDTfF+Mw+ePgN9Z2SJb9z+c6j21Vn1VJnJCMWtEEKRfv 2xDex4TmNZOFj6DjvfcVwChXMHGW/7DaIV3eqjgNUArX0GRsEk1o1RHAU/SVdEBU3FGK lR2WZ7crM7WRkMyM0HgLBc9FqAcISU51v1+q1QHzu1OuqaZFDSE7cQZAL7Rz2ukgxLVZ SYnvPdZnEM3OTAiMDhOFmxCDzAZAQbVlgwsxPGinQ5uHvr/cSI49ExK4r37wpdozkfb9 GsTw/HcK+YjOZMC3pmZry28lGzaNKLMRfnQzpXT1n9mq4DsCzuFIU29WTxiYe+EcriHe cIAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ipvXcYwe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r7si769509ilq.53.2021.03.04.16.56.27; Thu, 04 Mar 2021 16:56:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ipvXcYwe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233092AbhCDTMU (ORCPT + 99 others); Thu, 4 Mar 2021 14:12:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231590AbhCDTMN (ORCPT ); Thu, 4 Mar 2021 14:12:13 -0500 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D838C06175F for ; Thu, 4 Mar 2021 11:11:32 -0800 (PST) Received: by mail-pg1-x532.google.com with SMTP id a4so19496372pgc.11 for ; Thu, 04 Mar 2021 11:11:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=V8gX6BLRp5VTtpTwGxCWHd1uYqGAa6Y56JCNNo50CEo=; b=ipvXcYweUEz5TS/xc4BHVGvCyArCaLaHVI1tfvZ5BJHQyXql9vlhqf3PZTWCX9Jc6r s5RxCEH5BO7F5NoKO6+sGuKvkfOYCCzweKWKQ+6JNpBhXMPP7BqHW3SwpogalD0OeRn/ QOCEwo0swmxcHL+e0NQIGKyNmSxHigpv4swqVTBDJpL+hNngdx5N7g/PfMBQiv/jN82k oav1PrsZIdfGZJgWScHC6Dmq9rgtf0Od8PRi0L+SrZRUlmfS2kMOuh9LdIdazP0Dxw9L dkbTaioQ+P6Jfm/w9Q/WE53mTfvQ6fLIcmq6YSmpf/VUf0M9LnbNQdkrVVLdf2WFr0Mu UGwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=V8gX6BLRp5VTtpTwGxCWHd1uYqGAa6Y56JCNNo50CEo=; b=WI1dShWkz+f6/7eybuDpj2ULNC1O5FkOOGOeVz6AKfqfzvDVNr7GbeyYABee+8Z3lm g+ST96iH4M9hYaxIiQF4GRY9T0+a2Kg7z18/lLWXe376KiuW8tzpKrcXY/9Al92tLon0 S9++Qc13lIWPFfjMhtJvlpYeLHlNoeId2RKne94TFvhLVYUvbJdTGpKvmDnzpJdrxtf/ o2Pv337DdYV+R2iy1ohXF7krg3iyxA3t32o8XSrNImg7krWFl6ZPcUSC8gJe1+E9tVIR UqG9lMQlYMqOqb2mGGxSUeaA/ISVPp5yl91hJ8sYF6DcTRkv4aszqeoSxCLFC8BvguVr UpPQ== X-Gm-Message-State: AOAM531hL3b1RxJ1qwhGICo+M5jddKoPp11Focf+98X31GsoP0FitCL8 kOcSY3TrcSZOZwzhbVpGaqRHtQ== X-Received: by 2002:a62:1e41:0:b029:1e6:fe13:b78e with SMTP id e62-20020a621e410000b02901e6fe13b78emr5177583pfe.26.1614885092044; Thu, 04 Mar 2021 11:11:32 -0800 (PST) Received: from xps15 (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id m12sm37318pjk.47.2021.03.04.11.11.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Mar 2021 11:11:31 -0800 (PST) Date: Thu, 4 Mar 2021 12:11:29 -0700 From: Mathieu Poirier To: Arnaud Pouliquen Cc: Bjorn Andersson , Ohad Ben-Cohen , Andy Gross , linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH v5 08/16] rpmsg: glink: add sendto and trysendto ops Message-ID: <20210304191129.GE3854911@xps15> References: <20210219111501.14261-1-arnaud.pouliquen@foss.st.com> <20210219111501.14261-9-arnaud.pouliquen@foss.st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210219111501.14261-9-arnaud.pouliquen@foss.st.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 19, 2021 at 12:14:53PM +0100, Arnaud Pouliquen wrote: > Implement the sendto ops to support the future rpmsg_char update for the > vitio backend support. Add a new line, otherwise it is very easy to read. > The use of sendto in rpmsg_char is needed as a destination address is > requested at least by the virtio backend. Same here and throughout the patchset. > The glink implementation does not need a destination address so ignores it. > > Signed-off-by: Arnaud Pouliquen > --- > drivers/rpmsg/qcom_glink_native.c | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c > index d4e4dd482614..ae2c03b59c55 100644 > --- a/drivers/rpmsg/qcom_glink_native.c > +++ b/drivers/rpmsg/qcom_glink_native.c > @@ -1332,6 +1332,20 @@ static int qcom_glink_trysend(struct rpmsg_endpoint *ept, void *data, int len) > return __qcom_glink_send(channel, data, len, false); > } > > +static int qcom_glink_sendto(struct rpmsg_endpoint *ept, void *data, int len, u32 dst) > +{ > + struct glink_channel *channel = to_glink_channel(ept); > + > + return __qcom_glink_send(channel, data, len, true); > +} > + > +static int qcom_glink_trysendto(struct rpmsg_endpoint *ept, void *data, int len, u32 dst) > +{ > + struct glink_channel *channel = to_glink_channel(ept); > + > + return __qcom_glink_send(channel, data, len, false); > +} Just rename send() to sendto() and trysend() to trysendto() and ignore the destination address. The same goes for the next patch. I would fold patch 08 and 09 into 10 to help get the big picture. > + > /* > * Finds the device_node for the glink child interested in this channel. > */ > @@ -1364,7 +1378,9 @@ static const struct rpmsg_device_ops glink_device_ops = { > static const struct rpmsg_endpoint_ops glink_endpoint_ops = { > .destroy_ept = qcom_glink_destroy_ept, > .send = qcom_glink_send, > + .sendto = qcom_glink_sendto, > .trysend = qcom_glink_trysend, > + .trysendto = qcom_glink_trysendto, > }; > > static void qcom_glink_rpdev_release(struct device *dev) > -- > 2.17.1 >